tsdconseil / opencv-demonstrator

OpenCV demonstrator (GUI)
http://www.tsdconseil.fr/log/opencv/demo/index-en.html
GNU Lesser General Public License v3.0
141 stars 57 forks source link

Simplify the way to change from default image to / from custom image / webcam stream / video stream #36

Open juliena82 opened 8 years ago

juliena82 commented 8 years ago

Currently, one has to open the global configuration dialog (for most of the demo), and for some démos (panorama, HDR), there is.the image selection dialog. This is not consistent and too complex.

Also, we must think too how to handle the case of 2 webcams (stereo vision), for which we could also have the option to use 2 images or 2 videos.

My idea for the moment would be to systemize the "image-selection" window (it would be always present), and it would be renammed as "input" or something similar.

From this window, the user could still select images files as now, and the default image(s) for the demo would appear too, but also, the user could select video file(s) or webcam Stream(s).

The number of images / videos / webcam selectable would be dépendent on the current demonstration requirements.

Any idea / remark / suggestion is welcome!

PS : note as proposed by @valera-rozuvan in issue #39, we could add support for IP camera in this new MMI (just by providing a way to specify a URL path).

valera-rozuvan commented 8 years ago

+1

shervinemami commented 8 years ago

I agree that it should be easy to change input sources. Some users will want to try one filter on a whole range of different images, so it would be nice to provide a menu option or persistent window so input source can always be changed easily.

juliena82 commented 8 years ago

Yes, I agree totally. That could be the role of the "image-selection" window, and it would be persistent.

juliena82 commented 8 years ago

Note: half way there since the last commit: now the image selector is always in use. But it only support one video for now.

valera-rozuvan commented 8 years ago

@juliena82 Keep up the good work!

juliena82 commented 8 years ago

@valera-rozuvan Thanks ;)

applemuncy commented 8 years ago

Yes, keep up the good work. It seems to me the "Media selection" window should ask for "Image source" Rather than "image type" and in the situation where 2 are required a second pane that asks for "image source 2" should show up.

juliena82 commented 8 years ago

@applemuncy Good ideas! Will fix the window name and try to go in this direction for the 2 images case (yet it is not so simple, as there can be in general as many input sources as possible).

applemuncy commented 8 years ago

Consider the use case of comparing a still image against a video stream, I think it would be wise to be as generic as possible in how we hold the media selection. Image files could be by way of URL as in FILE://C:/.... Or FILE:///home/apple/images/image.jpg

Webcam could be FILE:///dev/video0 under Linux even though OpenCV currently expects a cardinal number. In the future, maybe OpenCV will come to their senses and also us a URL.

So I'm suggesting a vector of URLs while in memory that get persisted directly in cfg.XML

Individual demos could ignore this and be hard coded to fixed media if the designer so desires.

juliena82 commented 8 years ago

Yes, in principle, you're right, but it's made that way to enable to generate automatically the MMI (it has constraints...). In the end, it will be almost as you say, only not a pure vector of URL, but between a tree and a vector...

valera-rozuvan commented 4 months ago

long forgotten - should close issue @juliena82 ping