4 ms·
Ask HN: Digital Image Stabilization Techniques
I'm currently using processing to mess around with motion tracking and pattern recognition and I would like to use image stabilization of my live video stream to improve on my current results.
The only problem is that some extensive googling hasn't turned up any practical info on implementing this. I understand the basic principles of determining a global motion vector and offsetting the current frame in relation to the last to compensate for camera motion, but elegant ways to implement this are escaping me.
Does anyone have any suggestions or sources that could help light the way?
- brk 17y agoIs the camera in motion or steady? It's somewhat easy to do if it's steady (pick a couple of reference points). Harder to do in-motion if you did not capture accelerometer data with the video feed.
- aarongough 17y agoIt's generally fairly steady at the moment, but I would like it to be able to handle motion in the future. I'm using the built-in iSight on my macbook as the camera, so theoretically I should be able to get some data from the macbook's built-in accelerometers, but I'm not sure that they would be accurate enough for this purpose. Do you know of any sources for example code dealing with image stabilization?
- brk 17y agoI don't have any sources, I only know how it has been implemented by various companies. Pentax, for example, offers some very powerful zoom lenses for CCTV cameras. They have an image stabilizer box that goes between the cameras output, and the viewing device. That box picks 4 points in the video and uses those 4 points as its reference. If you zoom in or out, the points move diagonally in unison. Any other movement left/right/up/down indicates camera shake and is compensated for. To do this, you have to start with an image that is slightly scaled down or cropped so that you have have some buffer room all around the frame.
- aarongough 17y agoYeah, it's starting to sound like something I'm going to just have to muddle through. The main reason I'm embarking on this project is just as a learning expedition more than anything else. So implementing everything from scratch is not necessarily bad.