Page 1 of 1
Clip Video to circular area of interest
Posted: Tue Sep 12, 2017 12:33 am
by RobertoRD
Good Day
Toda y was muy first Day using Raspberry 3 and the raspberry camera (8MP). I have a project that I will used the camera with 720 x 720 resolution, and that was easy, but I didn't find information on how can I do to make the video on circle shape... I need the video in a circle or 720p of diameter, all the other will be ignored (black pixels), this is because where the camera will be installed it only see this shape (will be inside a tube) and I want this because maybe ignoring all the pixels that I doesn't need the process will be faster.... Some idea on how to kill all the pixels that I don't need? On how can I get a video in circle shape?
Re: Video
Posted: Tue Sep 12, 2017 6:39 am
by OutoftheBOTS
I would suggest in your software to only process the pixel area (region of interest) needed regardless what is coming from the camera
Re: Video
Posted: Tue Sep 12, 2017 8:14 am
by PiGraham
Simplest option - put a mask over the screen that has a circular cutout in it.You only see the circular image. If you have a tube anyway doesn't that mask out the corners?
You could create a mask graphic as a DispmanX layer above the camera preview.
You could look at picamera.
http://picamera.overlay.renderer:
readthedocs.io/en/release-1.10/api_renderers.html?highlight=overlay.renderer
You could paint the camera image a line at a time in a circle but that will most likely be slower than letting the GPU update the square.
Alternatively you could just snip off the corners with a sharp pair of scissors. [JOKE]
Re: Video
Posted: Tue Sep 12, 2017 8:37 am
by jamesh
I think you need to look at the region of interest flag. --roi in raspistill. See the docs.
Re: Video
Posted: Thu Sep 14, 2017 9:16 am
by PiGraham
jamesh wrote: ↑Tue Sep 12, 2017 8:37 am
I think you need to look at the region of interest flag. --roi in raspistill. See the docs.
That doesn't help with
circular area of interest, does it?
It seems -roi is already used:
RobertoRD wrote:
I will used the camera with 720 x 720 resolution, and that was easy, but I didn't find information on how can I do to make the video on circle shape...
Re: Video
Posted: Thu Sep 14, 2017 10:23 am
by jamesh
PiGraham wrote: ↑Thu Sep 14, 2017 9:16 am
jamesh wrote: ↑Tue Sep 12, 2017 8:37 am
I think you need to look at the region of interest flag. --roi in raspistill. See the docs.
That doesn't help with
circular area of interest, does it?
It seems -roi is already used:
RobertoRD wrote:
I will used the camera with 720 x 720 resolution, and that was easy, but I didn't find information on how can I do to make the video on circle shape...
I think the OP is simply using the x and y resolution at 720x720, so the output from the sensor is that (or near). Then he will need to use the -roi flag to clip that down to the area around the circle. If he is pointing down a tube, he already has the circular mask.
Re: Clip Video to circular area of interest
Posted: Thu Oct 12, 2017 5:21 pm
by RobertoRD
Thanks all for yours comments, sorry for the date that i'm responding, the program need to be on python. Can some one can give me an example of the -roi? I a newbie using raspberry, linux and python