+ 2

Help required with raspberry pi 3 and processing

i am creating a project that requires image capturing from pi camera in processing. i know that normal video library doesn't work in raspberry so i downloaded opengl video library but it uses p2d or p3d. now the problem is that whenever i am using p2d or p3d, sketch output is a black screen it does not show anything but the program is running correctly (i know this because i m printing mousex value on change in console) i m out of options thanks in advance

14th Mar 2018, 3:36 AM
Gagan
Gagan - avatar
16 Answers
+ 14
did you google it?
14th Mar 2018, 3:55 AM
☆Sampath👻
☆Sampath👻 - avatar
+ 1
yes, but couldn't find anything
14th Mar 2018, 3:57 AM
Gagan
Gagan - avatar
+ 1
use stackeoverflow.
14th Mar 2018, 4:35 AM
shobhit
shobhit - avatar
+ 1
hmmm
14th Mar 2018, 6:27 AM
Gagan
Gagan - avatar
+ 1
For use with the Raspberry Pi camera, make sure the camera is enabled in the Raspberry Pi Configuration tool and add the line "bcm2835_v4l2" (without quotation marks) to the file /etc/modules. After a restart you should be able to see the camera device as /dev/video0. quoted from the simpleCapture.pde code found at: https://github.com/gohai/processing-glvideo/blob/master/examples/SimpleCapture/SimpleCapture.pde
29th Mar 2018, 3:48 PM
seamiki
seamiki - avatar
+ 1
have a look at this discussion it looks like your issue: https://github.com/processing/processing/issues/4818
29th Mar 2018, 4:21 PM
seamiki
seamiki - avatar
+ 1
apart from simple sketches, have you been able to run the example provided with the openGL video library? did the camera get detected? was the image black?
29th Mar 2018, 4:30 PM
seamiki
seamiki - avatar
+ 1
here are the installation instructions for OpenGL video playback https://github.com/gohai/processing-glvideo/blob/master/README.md
29th Mar 2018, 4:35 PM
seamiki
seamiki - avatar
+ 1
btw i had a similar issue on ubuntu due to the different version of GStreamer. replacing GStreamer fixed it.
29th Mar 2018, 4:39 PM
seamiki
seamiki - avatar
0
check below link how to captures image using pi camera https://youtu.be/3KlIV8y2oiM
18th Mar 2018, 6:31 PM
Manorama
Manorama - avatar
0
i am getting the image using python script but not with processing
18th Mar 2018, 6:34 PM
Gagan
Gagan - avatar
0
I already did that but its not working. The issue is not with the camera, issue is with P3D/P2D. If i run a normal processing sketch it runs successfully but if i add p3d/p2d to that same sketch the output screen becomes black. the sketch is running correctly, only the output screen is black
29th Mar 2018, 3:54 PM
Gagan
Gagan - avatar
0
the example specifies p2d. if you use p3d you should draw the image from the video stream as a background. you must save the current frame in a PImage object and use the background function to display it background(yourPImageFrame); Make sure to have the image size matching your sketch size.
29th Mar 2018, 4:02 PM
seamiki
seamiki - avatar
0
if a create a simple sketch which draws a simple rectangle on the screen it runs ok but if i add p2d/p3d to that sketch then output screen becomes black
29th Mar 2018, 4:04 PM
Gagan
Gagan - avatar
0
i cant use the opengl because it needs p2d/p3d and if i use that then the output is black
29th Mar 2018, 4:35 PM
Gagan
Gagan - avatar
0
thanks buddy i will try them tomorrow and see if that works
29th Mar 2018, 4:37 PM
Gagan
Gagan - avatar