First time here? Check out the FAQ!

Ask Your Question
0

Use GUI to display the images in C++

asked Dec 20 '17

mhdhmi gravatar image

hello dears please can use help me to display the image (after process in OpenCV v3.3) in GUI using Microsoft visual C++ language.

best regards

Preview: (hide)

Comments

what have you already try.? Have you read tutorials ?

LBerger gravatar imageLBerger (Dec 20 '17)edit

are you asking: "how to use winforms to draw an image" ?

(then the answer would be: please don't do that, because you would have to mix opencv code and managed c++, which is the straight road to hell, especially, if you're a noob !)

berak gravatar imageberak (Dec 20 '17)edit

yes I was tried car counting using openCV in c++ , but i want to display the picture and the counter in windows form.

mhdhmi gravatar imagemhdhmi (Dec 21 '17)edit

can we somehow convince you, just to use imshow() / waitKey() ? (at least for now.)

again, managed c++ uses an entirely different programming model, orthogonal to opencv's RAII concept.

there's a ton of subtle pitfalls, if you mix both,

save yourself the trouble, and build a nice car detection first. form follows function, right ?

berak gravatar imageberak (Dec 21 '17)edit
1

.my friend thank for you good advice. my car detection and counting program are complete, all I need now a way to display the result and some commands buttons to open the video.

mhdhmi gravatar imagemhdhmi (Dec 21 '17)edit

1 answer

Sort by » oldest newest most voted
0

answered Dec 21 '17

Shivanshu gravatar image

updated Dec 21 '17

You and use GTK+ UI library for developing UI along with c++ core logic. see here https://www.gtk.org/development.php To show image from opencv you can use pixleBuffer in GTK or either first you write opencv image to a directory then read the same via GTK ui .

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Dec 20 '17

Seen: 1,164 times

Last updated: Dec 21 '17