What is the difference between the InRange method in opencv with python/cv2 and c#/emgu? -
I'm trying to convert a small opencv dragon script to emgu with c #.
Code in Python
COLOR_MIN = np.array ([104, 34, 255], np.uint8) COLOR_MAX = np.array ([124, 34, 255] ], Np.uit 8) frame_ thrashed = cv2.inRange (hsv_img, COLOR_MIN, COLOR_MAX) cv2.imshow ("frame threshold", frame_ threaded) correctly image threshold Which is displayed by cv2.imshow.
I changed the code to C # as:
var min = new HSV (104, 34, 255); Var max = new HSV (124, 34, 255); Var thresh = hsvImg.InRange (minimum, maximum); CvInvoke.cvShowImage ("thresh", thresh); Here only one black image has been created - nothing seems to match that threshold.
In both cases, I am using the same PNG file as input. I have written the Python Code on the OSX and the .net code is running inside the win8 VM - can this be something with Color Profiles?
Any tips or tricks to try working .net version is very much appreciated !! Thanks!
The issue seems to be that I am using the old version of Iguu,
103, 33, 254); Var max = new HSV (125, 35, 256); Var thresh = hsvImg.InRange (minimum, maximum); CvInvoke.cvShowImage ("thresh", thresh);
Instead, & lt; = And & gt; Used by & lt; And & gt;
My mistake is to accidentally click on the wrong package in NuGet ... more reasons to always use the command line;).
Comments
Post a Comment