Comments (2)
You could use the InRangeWithScalar function instead of the InRange function.
how to set the Mat for my lower- and upper bound to an HSV value?
You could create a mat from a scalar and use that. This is what is done in the Unit Test for InRange function:
func TestMatInRange(t *testing.T) {
mat1 := NewMatWithSize(101, 102, MatTypeCV8U)
defer mat1.Close()
lb := NewMatFromScalar(NewScalar(20.0, 100.0, 100.0, 0.0), MatTypeCV8U)
defer lb.Close()
ub := NewMatFromScalar(NewScalar(20.0, 100.0, 100.0, 0.0), MatTypeCV8U)
defer ub.Close()
dst := NewMat()
defer dst.Close()
InRange(mat1, lb, ub, &dst)
if dst.Empty() {
t.Error("TestMatAddWeighted dest mat3 should not be empty.")
}
}
from gocv.
Looks like this question was answered, so now closing. Thank you everyone!
from gocv.
Related Issues (20)
- This issue occurred when I was cross compiling HOT 3
- opencv4.8.1 has been compiled and installed, but an error occurred when running gocv HOT 3
- How to parse blob?
- Memory leak in ORB detector
- triangulatePoints
- Error installing OpenCV libtbb2 and libdc1394-22-dev not found HOT 1
- Issue using gocv 0.35.0 in combination with opencv 4.8.1 in docker HOT 1
- Update to Support Additional Fonts from HersheyFont HOT 1
- MinMaxIdx function does not return the correct index. HOT 2
- BoxPoints, MinAreaRect inconsistent with C++ version of OpenCV, causing precision issues HOT 2
- Consider adding VideoWriterFileWithAPI?
- Compilation yields "/bin/sh: line 0: cd: OLDPWD not set" on MacOS HOT 2
- Severe Memory Leak During Conversion between Image and gocv.Mat HOT 1
- go run . doesn't work on macos sonoma 14.2.1 (23C71) HOT 3
- Missing ArUco when installing OpenCV Debian Repository HOT 2
- building a static binary with ` gocv/opencv:4.9.0-static` fails HOT 3
- Not able to run simple example HOT 1
- Skew Correction
- Unable to complete install with CUDA (make install_cuda) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocv.