Page 2 of 4
Re: Raspberry Pi camera module
Posted: Saturday 14th October 2017 10:54am
by stevedee
I don't have any time this weekend to look at this, but I wonder whether you should be using v4l to get images from RaspiCam (via /dev/video0) rather than using Raspistill or Raspivid in a Shell.
I think there are Gambas components for both v4l and gstreamer that might be worth exploring.
Re: Raspberry Pi camera module
Posted: Saturday 14th October 2017 1:46pm
by sony
Hi Steve,
Sorry I'm not use v4l for picamera but v4l for usb webcam.
Re: Raspberry Pi camera module
Posted: Saturday 14th October 2017 3:27pm
by cogier
I am trying to understand what you are trying to do, can you explain what you hope to achieve.
Are you using the Pi and a USB camera or a Pi Camera?
Are you trying to capture the video on the Pi or stream it to another computer?
Re: Raspberry Pi camera module
Posted: Saturday 14th October 2017 9:40pm
by sony
Sorry I'm slow in english
....
I only using RPi.
By using my latest program, I use picamera and RPI but I can not copy the video into drawingarea as picture when a button pressed.
If I have a picture (gray scale/black white) inside drawing area I will count the pixel and compare the pixel value with my reference.
Re: Raspberry Pi camera module
Posted: Sunday 15th October 2017 3:45pm
by cogier
OK let's see if I have got this right. Attached is my PiCam software with a additional Form and Class.
Run the program. Take a picture with the size at 800 x 800 then click on the 'Sony' button and you will see the picture you took in a DrawingArea.
Is this what you are looking for?
This will only work on a Raspberry Pi using the picamera
Re: Raspberry Pi camera module
Posted: Sunday 15th October 2017 5:12pm
by sony
Hello,
I run your program, but that is not I mean. I mean just click the "Sony" button the current running video is show in drawingarea as picture. I do not need read jpg file to visualize into drawingarea, because in the next time I will do million times to take the current running video is show in drawingarea as picture.
regards
Sony
Re: Raspberry Pi camera module
Posted: Monday 16th October 2017 1:59pm
by sony
Hello,
Today I read your program carefully and now I understand about using ram drive
I assume read / write into ram million times is not to make ram damage. So with raspstill command to save image *.jpg file into ram drive and read again then place into drawingarea.
Thank you very much for helping me.
Best regards
Sony
Re: Raspberry Pi camera module
Posted: Monday 16th October 2017 2:40pm
by cogier
Hi Sony,
You cannot see the 'raspistill' output over SSH so the program takes a photo 75 times a minute that is stored in RAM which is quicker and does no damage to the SD card. The picture can then be seen over a SSH link.
Glad it helped,
Charlie
Re: Raspberry Pi camera module
Posted: Thursday 8th February 2018 6:19am
by sony
Here my code,
sorry for the messy code
Re: Raspberry Pi camera module
Posted: Thursday 8th February 2018 3:28pm
by cogier
Hi Sony,
I got the LibWiringPi sorted
Then at line 78 I got error 'File of directory does not exist'
nf = "~/param.par"
hfile = Open nf for Input
I REMed that out then I got another error at Line 180, 'Unable to load picture'
hMyPic = Picture.Load("/var/tmp1/sample.jpg")
What am I missing?