soc_camera dynamically cropping and scaling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am using a PXA270 board running linux 2.6.37 equipped with an ov9655
Image sensor. I am able to use the cropping and scaling capabilities
V4L2 driver.
The question is :

Is it possible dynamically change the cropping and scaling values
without close and re-open  the camera every time ?

Now I am using the streaming I/O memory mapping and to dynamically
change the cropping and scaling values I do :

1) stop capturing using VIDIOC_STREAMOFF;
2) unmap all the buffers;
3) close the device;
4) open the device;
5) init the device: VIDIOC_CROPCAP and VIDIOC_S_CROP in order to set
the cropping parameters. VIDIOC_G_FMT and VIDIOC_S_FMT in order to set
the target image width and height, (scaling).
6) Mapping the buffers: VIDIOC_REQBUFS in order to request buffers and
mmap each buffer using VIDIOC_QUERYBUF and mmap():

this procedure works but take 400 ms.

If I omit steps 3) and 4)  (close and re-open the device) I get this errors:

camera 0-0: S_CROP denied: queue initialised and sizes differ
camera 0-0: S_FMT denied: queue initialised
VIDIOC_S_FMT error 16, Device or resource busy
pxa27x-camera pxa27x-camera.0: PXA Camera driver detached from camera 0

Do you have some Idea regarding why I have to close and reopen the
device and regarding a way to speed up these change?

Thanks in advance

Paolo Santinelli

-- 
--------------------------------------------------
Paolo Santinelli
ImageLab Computer Vision and Pattern Recognition Lab
Dipartimento di Ingegneria dell'Informazione
Universita' di Modena e Reggio Emilia
via Vignolese 905/B, 41125, Modena, Italy

Cell. +39 3472953357,  Office +39 059 2056270, Fax +39 059 2056129
email:  <mailto:paolo.santinelli@xxxxxxxxxx> paolo.santinelli@xxxxxxxxxx
URL:  <http://imagelab.ing.unimo.it/> http://imagelab.ing.unimo.it
--------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux