Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upselectROI pointer almost invisible on certain colours #1719
Comments
Mentioned code is here. |
That code seems to apply to the "crosshair in the middle of bounding box", not to the mouse pointer? Maybe the code setting the mouse pointer appearance is in cv2.imshow? |
Hi @JeongJuhyeon! I am unable to find the code for the cross-hair pointer adapting color depending on the background. Can you please include a reference for the code snippet which is responsible for this behavior besides the one which @alalek has referenced above? :) |
let me clarify: by default, the "precision selection" cursor is used on windows, and this tries to invert the colors beneath it, which obviously works bad, for a uniform gray surface. to change that, you'd have to work on highgui/src/window_w32.cpp, and add an option to change the mouse cursor there. but i think, this is clumsy. maybe we can just add documentation, how to change the cursor from the user's system panel (manually) instead. |
@berak I'm interested in solving this problem. How can I start working on this version? |
hi, @hkhojasteh : let me be honest: i don't think, it's a good idea to change the library code here. (as in: window_w32.cpp) (nice, though, that you're trying to help, !) |
@hkhojasteh you can try to add an horizontal and vertical (w=img.cols h=img.rows ) line which its center is the mouse pointer. i think it will be helpful. |
@sturkmen72 Can you suggest me the related file to start fixing this issue? |
as mentioned before the code is here also see my crude attempt to improve
|
@hkhojasteh @berak how can we work collaboratively on improving the code? |
@hkhojasteh @berak @sovrasov i updated the code here. lines are visible when the Shift key is pressed. any remark ? |
@sturkmen72 -- perfect ! |
I believe we can draw lines without pressed Shift key (and hide them when Shift key is pressed) |
System information (version)
Detailed description
When using selectROI you get a crosshair pointer that seemingly changes colour depending on the background behind it. Problem is that with certain background colours it's almost impossible to see.
The pointer is inside the circle, you might have to zoom in to even see it.
Steps to reproduce
Use the selectROI function. Mouse over a greyish background.