(still catching up on my email, sorry about that...)

Vojtech Pavlik wrote:

Hi!

I've got an OrangeMicro iBot2 camera and I want to use it in my robotic
project. You helped me to get it running somehow with the ovfx2 driver,
but it still was not satisfying.

As the project starts to get completed, I really really needed to get it
running, and so I sat for a day with an ov7620 and fx2 datasheets, some
papers about Bayer demosaicking, and I fixed the driver.



First of all, thanks for the patch!

The attached patch:

* Replaces the BGBR decoding with Bayer decoding, which is
correct for this type of camera. It uses a mix of bilinear
and nearest-neighbor approaches, which is fast and simple.



This seems like the best overall approach. I tried a full-quality Bayer decoder before, but it was noticeably slower.


Since format conversion is generally not allowed in the kernel anymore, I'll probably have to remove it eventually. No great loss though; the code should work just as well from userspace ;)

* Fixes the fact that in raw RGB progressive mode the ov7620
chip sends every pixel twice at two different positions in
the data stream. This is fixed by switching into interlaced
mode.



Seems correct.

* Uses the QVGA60 bit to turn the interlaced mode into a
progressive mode with half the data (the correct amount -
640x480 bytes, which is the number of pixels the camera has),
and twice the framerate.



Nice job. To be honest, I never realized that this could work at 640x480. I tried this in ov511 once but the camera froze up completely, which I assumed to mean that QVGA60 only supports QVGA resolution. It was more likely due to timing or memory limitations of the OV511.


* Suggests using "clockdiv=0" to achieve 60 Hz framerate.



I agree that the default should be 30 Hz for now. Some hosts might not be able to handle more data than that reliably (the camera has no frame buffer, so frames get corrupted if the host can't keep up). I encourage people to test 60 Hz though.


* Disables all kinds of image enhancement options which are
OK for YUV mode, but disturb raw RGB mode.



These look correct, though I'll have to take a closer look at some of them. The Windows driver uses the default values for digital and analog sharpness, for example (that's not to say that it's correct).


* Enables RGB matrix reweighing, since the colors "seep" into
each other and this undoes that effect.



You're right, that should have been enabled. AFAICT it should only be disabled for monochrome sensors.


* Removes the hardware image flip, since I was too lazy to
recompute all the Bayer decoding for a mirrored image.



I read somewhere that there's an undocumented vertical flip bit. It probably doesn't correct the Bayer order though. I'll have to investigate further.


All in all, it gives you a very nice smooth image with a very good
(30 Hz or 60 Hz) framerate.

Please test it, and if you're inclined to, merge into your ov511
driver suite.

By the way, I'd like to see the ovfx2 merged into the 2.6 kernel, do you
think it's a good idea now that it works rather well?



Yes, it's looking almost good enough to merge. I have some cleanups to do first, but I'll try to get a patch out within a few weeks.


Thanks again for your help!!

--
Mark McClelland
[EMAIL PROTECTED]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to