Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access Scalar value #34

Open
drhouse82 opened this issue Sep 4, 2017 · 1 comment
Open

Cannot access Scalar value #34

drhouse82 opened this issue Sep 4, 2017 · 1 comment

Comments

@drhouse82
Copy link

When I try to calculate the mean value of an image like this:

data = new cv.Mat.zeros(10,10,cv.CV_8S)
mask = new cv.Mat.ones(10,10,cv.CV_8U)
mean = cv.mean(data,mask)

the returned mean value is of type cv Scalar and I either cannot access its value or its value is wrong.

mean.$$.count.value returns 1, whereas the mean of a zero-image is obviously 0.

Any help?

@drhouse82
Copy link
Author

Update:
Accessing scalar values is provided with PR #20 through cv.Scalar.get(index).
Please accept PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant