Ask Your Question
1

HSV Thresholding Difference between ImageJ and OpenCV

asked 2015-09-30 11:46:57 -0600

evoclue gravatar image

updated 2015-09-30 11:51:22 -0600

I use ImageJ before using OpenCV functions because in ImageJ I can use their interactive HSV thresholding tool to get the HSV parameters I want to threshold using OpenCV functions. After using ImageJ and after converting a pic from BGR to HSV, I use the parameters from ImageJ in the cv2.thresholding function with cv2.THRESH_BINARY. However, when I look at my mask derived from the thresholding using OpenCV, it is close, but not the same as the one I obtained with ImageJ.

  1. Is there a reason for this? Am I doing something wrong?

  2. Is there an interactive thresholding script in Python that uses OpenCV functions?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2015-10-02 21:00:08 -0600

evoclue gravatar image

In OpenCV, the hue range 0-179 while in ImageJ it's 0-255.

edit flag offensive delete link more

Comments

Since you solved it yourself, do mark your answer as correct :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-05 06:47:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-30 11:46:57 -0600

Seen: 411 times

Last updated: Oct 02 '15