caij
Posts: 5
Joined: Tue May 28, 2019 6:37 am

Problem with video capture

Tue May 28, 2019 8:34 am

when I capture the video then I always get the video like that one? anyone knows what's the problem with camera? the light works 200hz
Camera.jpeg
Camera.jpeg (40.34 KiB) Viewed 835 times

User avatar
HermannSW
Posts: 1235
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Problem with video capture

Tue May 28, 2019 12:27 pm

Raspberry camera?
If so, v1 or v2?
What is the command [line] you use to capture the video?
bookmark list: https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/fork-raspiraw
https://github.com/Hermann-SW/userland
https://twitter.com/HermannSW

caij
Posts: 5
Joined: Tue May 28, 2019 6:37 am

Re: Problem with video capture

Tue May 28, 2019 1:19 pm

Hi HermannSW,
it's V2. the python code is

Code: Select all

# -*- coding:utf-8-*-
import numpy
import cv2

cap=cv2.VideoCapture(0)

fourcc=cv2.cv.FOURCC(*'XVID')
out=cv2.VideoWriter('/home/pi/Documents/output.avi',fourcc,90,(640,480))

while(cap.isOpened()):
    ret,frame=cap.read()
    if ret==True:
        frame=cv2.flip(frame,0)
        
        out.write(frame)
        
        cv2.imshow('frame',frame)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
    else:
        break
cap.release()
out.release()
cv2.destroyAllWindows() 
then use command:

Code: Select all

$ sudo modprobe bem2835-v4l2
$ python2 VideoCapture.py

_______________________________________________________________
today I try just to capture a photo with decreased exposure time:

Code: Select all

$ raspistill  -w 640 -h480 -ISO 100 -ss 1-out2.jpeg
the photo is still with this black streak.
out2.jpeg
out2.jpeg (112.65 KiB) Viewed 795 times

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Problem with video capture

Tue May 28, 2019 2:05 pm

That looks like corruption from the sensor.

Please run

Code: Select all

raspistill  -w 640 -h480 -ISO 100 -ss 1-out2.jpeg -r
and post the resulting file to somewhere like Dropbox and Google to share it. The file will be 8-11MB as it includes the raw data off the sensor. That enables us to analyse whether it is the sensor or the Pi at fault.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

caij
Posts: 5
Joined: Tue May 28, 2019 6:37 am

Re: Problem with video capture

Tue May 28, 2019 2:33 pm

so I have done this command

Code: Select all

raspistill  -w 640 -h480 -ISO 100 -ss 1-out2.jpeg -r
the result can be downloaded under this link
https://drive.google.com/file/d/1dbCI0F ... sp=sharing

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Problem with video capture

Tue May 28, 2019 3:44 pm

So the corruption is on the data coming off the sensor. I'd put that down to either a faulty sensor, or interference on the CSI2 bus (the ribbon cable).

I do note that this is an OV5647 5MPix sensor. Raspberry Pi haven't sold that sensor since 2016, so I suspect that it is from some other supplier. Sorry, but you really need to raising this with them.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

caij
Posts: 5
Joined: Tue May 28, 2019 6:37 am

Re: Problem with video capture

Wed May 29, 2019 6:35 am

Thanks a lot 6by9! I did not know that it is actually a V1... Okey I am going to change this with V2. But by the way is there any codes that I can solve this date corruption on software?

caij
Posts: 5
Joined: Tue May 28, 2019 6:37 am

Re: Problem with video capture

Fri May 31, 2019 11:46 am

when I turn down the light, that problem will disappear... Now I am being more confused... :?: :?: :?:

Return to “Camera board”