Good morning to all,
I'm developing a camera viewer displaying the camera frames on a QLabel.
I need to draw some circle over the camera frames before display them how can I do?
Best Regards,
Franco
Good morning to all,
I'm developing a camera viewer displaying the camera frames on a QLabel.
I need to draw some circle over the camera frames before display them how can I do?
Best Regards,
Franco
Franco Amato
I'm in sud America ;-)
I get images from the camera as char aray, then I pack the array into an IplImage (OPenCV) for further processing and then I convert to a QImage to display it.
What I would do is this:
after the processing I convert to a QImage -> at this point I would draw the result of the processing ( some circles ) over the QImage so the user can see it.
Regards,
Franco
Franco Amato
or take a view at the QGraphicsView framework...
Greetz Yakin
I tried this code as suggested by you:
Qt Code:
int rx, ry; //// processing p.end();To copy to clipboard, switch view to plain text mode
and I got the following error:
I can not draw on a image with the QImage::Format_Indexed8 format.
How can I do?
Best Regards,
Franco
Last edited by franco.amato; 23rd August 2010 at 17:36.
Franco Amato
Transform it to a pixmap or to a different format on which you can paint. Sorry but I don't have the time right now to determinate on wich format one can paint. But if you transform better check if a overlay widget is not faster. I assume your images have always the same size, then you should probably better overlay your label with a normal transparent widget and do the painting there.
But do both variant and benchmark them.
Yes, because a QWidget is lighter then a QLabel. What's about making a complete custom viewer widget?Qt Code:
{ m_image = newImage; m_circles = CircleInformations; // set size policies of your window according to the image size, of if you sure it will not change then leave it. update(); } { p.drawImage(m_image); // here do your circle painting according to m_circles. }To copy to clipboard, switch view to plain text mode
Hi,
thank you.
Is possible in a QWidget ( or another widget ) to display more than 1 image orizontally?
For example at position 0 I display image_1,
at position ( 0 + width_of_image_1 + 20px ) I display image_2,
at position ( 0 + width_of_image_1 + 20 px + width_of_image_2 + 20 px ) I display image_3?
Best Regards,
Franco
Franco Amato
Yes,, why not.. its same as fitting three rectangles inside one big rectangle... isnt itIs possible in a QWidget ( or another widget ) to display more than 1 image orizontally?
Bookmarks