Digital Image Stabilization - page 2 - General Discussion and Assistance - CHDK Forum

Digital Image Stabilization

  • 21 Replies
  • 13419 Views
*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: Digital Image Stabilization
« Reply #10 on: 24 / June / 2008, 17:49:54 »
Advertisements
NO ACTIVITY = TAKE SNAP!...anyone?

Great, thanks :)

What could be done, in theory, is get the motion vectors, then do some intelligent image reconstruction based on that. You don't need too much memory for it, so long as you can read and write in the raw buffer. Of course, it might take forever to do on a low speed ARM processor, and it's not easy to implement, but it should be possible.

This is a great idea! In theory we have access to a 30fps LCD viewfinder, so if we could record them while the shot is taken, we could then use them to compute the motion vectors and the Point Spread Function to help a deconvolution program (can be done on your computer afterward). Unfortunately I doubt the LCD viewfinder buffers are updated while the shot is taken :(.

I think on the cheaper Nikon cameras there is a mode which retains the sharpest picture. So you keep the shutter pressed, it works like burst mode and the camera retains what it thinks is the sharpest picture.
Yep, and I think this can already be found in the feature requests section somewhere... at least it was discussed a while back.

Yep: Best shot selector mode (Poor man's IS), listed as feature #41 in for devs: vacant jobs, must-have features, status & overview / for users: a poll

*

Offline RaduP

  • *****
  • 926
Re: Digital Image Stabilization
« Reply #11 on: 26 / June / 2008, 22:22:06 »
Maybe I am wrong, but I think that the motion vector might be accessible from the camera orientation sensor?
I am not sure how it operates, for example does it just return 4 orientation values? Or does it return some larger range, such as an integer/float?
Is it 2d or 3d? And how fast is that updated?
If the sensor returns a large range of values, and if it is 3D (although 2d should work to some extent as well), and if it is updated fast enough, then this data could be saved along with the picture (perhaps in a text or binary file), then have a PC program that enhances the image. Doing it on the camera might be too slow and too difficult.

Another idea is to get the data from the IS sensor. This should be much better data, but only limited to the IS cameras.

There is a Photoshop plug in (forgot the name) that can do some image reconstruction if the motion vector is known (you enter it manually). But if you know multiple motion vectors (for example, 1 vector per milisecond), and if someone builds a program to use that data, I think the image blur resulted from camera shake could be almost entirely eliminated.

*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: Digital Image Stabilization
« Reply #12 on: 26 / June / 2008, 22:55:35 »
Maybe I am wrong, but I think that the motion vector might be accessible from the camera orientation sensor?
I am not sure how it operates, for example does it just return 4 orientation values? Or does it return some larger range, such as an integer/float?
Is it 2d or 3d? And how fast is that updated?
If the sensor returns a large range of values, and if it is 3D (although 2d should work to some extent as well), and if it is updated fast enough, then this data could be saved along with the picture (perhaps in a text or binary file), then have a PC program that enhances the image. Doing it on the camera might be too slow and too difficult.
I did not study precisely the orientation sensor, but I think it is 1D, and not precise at all (there is a propcase that just provides an angle 0/90/270). We could try to find a memory address with the full info of the sensor, but I seriously doubt that it is a lot more precise than what it was designed for, that is horizontal/vertical... (nor updated very fast)

Quote
Another idea is to get the data from the IS sensor. This should be much better data, but only limited to the IS cameras.
Yes, the IS sensor provides perfect data... and is already used to prevent image blur in the camera, it is its purpose ;).

Quote
There is a Photoshop plug in (forgot the name) that can do some image reconstruction if the motion vector is known (you enter it manually). But if you know multiple motion vectors (for example, 1 vector per milisecond), and if someone builds a program to use that data, I think the image blur resulted from camera shake could be almost entirely eliminated.
Yes there are several known algorithms to correct the image when the point spread function is known, and knowing the motion vector with time allows to build this point spread function. Damn motion vector... :(

Another idea: maybe just one motion vector is better than nothing, so we can get the viewport image right before the shot and right after the shot. The problem is that the screen is dark longer than the exposure time, so it's not very precise. And some denoising algorithms can estimate the motion vector only with the image, so I'm not sure it would really be better than that.

*

Offline RaduP

  • *****
  • 926
Re: Digital Image Stabilization
« Reply #13 on: 27 / June / 2008, 01:23:37 »
I don't think the screen is a viable option, for any reasons:
1. As you mentioned, it goes dark for a long period of time after the shot is taken.
2. Does not provide more than 1 vector.
3. Complicated algorithm.
4. Impossible to get too much accuracy.

Now, after some reading online, it seems that, as I suspected, the orientation sensors in cameras use accelerometers or magnetometers. I guess that can be tested with a magnet, but I would guess that most of them use accelerometers. So this MIGHT work, provided that there is a way to read the raw sensor data, rather than just some angle. Maybe some hardware dissasembly is required to find out what kind of chip is used, then maybe see if there is any documentation online and stuff.

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Digital Image Stabilization
« Reply #14 on: 04 / July / 2008, 08:30:52 »
I think the data from the various sensors is shown quite raw in this build.

Re: Digital Image Stabilization
« Reply #15 on: 23 / July / 2008, 08:14:33 »
Hi folks,
  First of all I want to say hello to everybody, give you thanks for your great effort, and say that this is amazing for me.

  I am new on this and I have just installed the last Allbest's version in my Canon A620 and I have just take a little look over it... Great!!! ::)

  About my answer in this thread is for giving an idea (I think maybe is not useful but...).
  The camcorders use an extra border image for making the digital stabilization, so...
   can you activate digital zoom over 1.0x optical zoom and with the borders you leave without use, maybe you can play for stabilizing image?

   I know that we will lose +-2Megapixels but it could work.

   I don't know if you can activate digital zoom and if you can move the image as you want, but is only an idea.......
   again, thanks a lot for all.....

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Digital Image Stabilization
« Reply #16 on: 23 / July / 2008, 08:32:31 »
Or you could just crop.

The main problems are still 1) avoiding all unnecessary processing (JPEG), to speed up image aquisition by many orders of magnitude, and 2) actually implementing a fast algorithm to find alignment.

Deshaker uses an algorithm that seems to be remarkably fast (but I'm still using it on a 2500MHz processor, not on Canon's ARM!), I don't believe it's open source, though.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Digital Image Stabilization
« Reply #17 on: 23 / July / 2008, 14:37:16 »
I believe javsaca's suggestion is physically possible only for video, which in turn requires cropping the end result. Now, one thing that would probably be possible is to log the IS sensor data into a file while recording video, then taking the AVI file and use this IS sensor log to determine how to crop.

Probably too much trouble for the gain...

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Digital Image Stabilization
« Reply #18 on: 23 / July / 2008, 15:33:04 »
But then again, if you have an IS sensor, then your camera is already stabilizing the video optically (and without cropping, as it actually moves the lens)... am I missing something?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Digital Image Stabilization
« Reply #19 on: 23 / July / 2008, 15:47:26 »
But then again, if you have an IS sensor, then your camera is already stabilizing the video optically (and without cropping, as it actually moves the lens)... am I missing something?

I was thinking this would help with video record when the shake goes beyond the optical IS limits. Shooting while walking or riding a bike on a bumpy road, for instance.


 

Related Topics


SimplePortal © 2008-2014, SimplePortal