lucasw / image_manip

ros image manipulation nodelets
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Stop motion example #11

Open lucasw opened 5 years ago

lucasw commented 5 years ago

Follows stop_motion.launch from vimjay.

Use imgui_ros

Probably need to bring in some new nodes from vimjay and from ros1 image_manip.

lucasw commented 5 years ago

The basic design it to use usb_cam to get images at high resolution, then resize those down for thumbnail previewing and processing.

A service call or topic needs to trigger saving of the current live image to disk in a sequentially named file.

The current live image is diffed with the last saved image- if there is no change the output is gray (this is accomplished by adding the difference to a gray image which needs to be generated/loadded and published somewhere).

The current live image is also blended with the last saved image, if there is no change the image is clear otherwise blurs appear where there are differences.

Every image that is saved also needs to go in thumbnail form into a growing buffer. This buffer is constantly being looped through at a configurable rate. The start frame index can also be adjusted live. This will also append the currently live image to the preview loop- every loop the final image will be the current live image.

A single screen will tile all the images - the live camera image, the last saved image, the diff and blended images, the buffer animation preview. There will also be controls to save a new image (this ought to be a big button), and change the playback speed and playback start index.

A nice future addition would be to be able to remove older images from the preview loop (and perhaps also move them into a subfolder named 'discarded')

lucasw commented 5 years ago
ros2 launch image_manip stop_motion_launch.py -d /dev/video1 -wd 1920 -ht 1080

The g and r colors on the c920 are flopped, fix that in usb_cam.

lucasw commented 5 years ago

The start index control could be re-made every new frame, so the max wouldn't go beyond the number of current frames.

lucasw commented 5 years ago

Make this use internal_pub_sub currently in the imgui_ros git.

lucasw commented 5 years ago

Also trying out imgui docking branch, and save/reloading the imgui.ini config.