Hide mouse cursor in OpenCV - c++

I need to hide the cross-shaped cursor that OpenCV shows when moving the mouse over an image window. Does anybody know if it is possible?
I wanted to add a screenshot, but unfortunately the mouse cursor is not shown in screenshots.
Thanks!

I don't think it's possible with only OpenCV, you have to use OS API or eventually you may use QT(http://www.codeprogress.com/cpp/libraries/qt/QtHideMouseCursor.php#.UjGpZD-rGoE) - it's quite easy to use it with OpenCV.

Related

How to zoom in/out a selected part of an image in Qt?

I'm working on a Qt class project. We're supposed to develop an application like Microsoft Paint. Now I don't know how to enlarge a selected part of an image. Actually I don't even know how to "select" an area. You know, just like that on the desktop of Windows, you press the left button of the mouse and than move it, a dashed-line rectangle will show up. I hope to move or zoom in/out this particular area.
Any help will be appreciated, thanks!
It could be done by using mouse events. Here's example that might be useful to you:https://doc.qt.io/qt-5/qtwidgets-widgets-scribble-example.html

wxWidgets - remove the frame around a Bitmap Button

I'm just getting started with wxWidgets, so please be kind on me.
How can i disable, that a frame appears around a Button, when the mouse enters the Button. Or is the another/easier way to make a Picture click-able ?
You might be looking for wxBitmapButton which allows you to set different bitmaps for its different states (focused, pressed, ...).
If not, then you really need to explain more clearly what are you after.

How to move a mouse using the concept of object tracking in opencv?

I was looking online and how people created this virtual mouse application using different principles such as color detector, object tracking, convexity defects etc etc. I wrote this program which actually tracks a single object from a webcam and its actually working really well. Now, the idea is to use this moving object which is being tracked and i want to control my mouse using this application. I dont want the source code and i want to do it myself. But i dont have any clue how to start it. I just hope if you guys can give me some clue or some ideas which can help me to connect my mouse to my program? I want to be able to do left click, right click, double click . Thanks
If you are able to track an object in the screen then you will get the object co-ordinates & set that as your target co-ordinate. I assume you already did that.
Now set the mouse cursor to that target co-ordinate refer this thread.

what's the best way to display images in qt? also I would like to zoom in to particular areas as well

I've been using label to display images. I'd like to be able to click and create a bounding box then be able to drag the cursor to move around in the image. What would I need to do this? Thanks.
I'm not 100% sure I understand what you are trying to do, but I think the QGraphicsScene is what you are looking for. You can (among many other things):
Render images (QGraphicsPixmapItem, for example)
Change the zoom level when rendering the scene on a QGraphicsView.
Select things using a "rubber band"
Move items around with the mouse (see QGraphicsItem::ItemIsMovable)
etc.
You may need to get familiar with Qt's graphics view framework.

How do I display dynamic text at the mouse cursor via C++/MFC in a Win32 application

I would like to be able to display some dynamic text at the mouse
cursor location in a win32 app, for instance to give an X,Y coordinate that
would move with the cursor as though attached. I can do this during a
mousemove event using a TextOut() call for the window at the mouse
coordinates and invalidate a rectange around a stored last cursor position
to clear up the previous output. However this can suffer from flickering and
cause problems with other things being drawn in a window such as tracker
boxes. Is there a better way to do this, perhaps using the existing cursor
drawing/invalidating mechanism ?
You can do this via ToolTips - check out CToolTipCtrl.
If you want flicker free tracking ToolTips then you will need to derive your own classes from CToolTipCtrl that use the trackActivate messages.
You may want to consider a small transparent window that you move to follow the mouse. In particular, since Windows 2000, Layered windows seem to be the weapon of choice (confession: no personal experience there).
You can overwrite OnSetCursor to get a dynamic mouse cursor. I just found a German tutorial.
German tutorial
English translated tutorial