Prayuktibid
Posts: 11
Joined: Wed Aug 30, 2017 10:08 am

How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera mod

Mon Aug 12, 2019 7:47 am

I want to read the camera hardware spec to ensure which type camera sensor (like imx219 or OV5647) is being used in the rPi camera module for camera module v1 & v2.

Is there any method to read that hardware information from the camera module?

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

Re: How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera

Mon Aug 12, 2019 7:50 pm

camver script determines camera version:
https://www.raspberrypi.org/forums/view ... 9#p1277731
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW


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

Re: How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera

Thu Aug 15, 2019 3:03 pm

Store camver script from the pointed to posting and execute, it will output the camera version.
It does so by querying i2cdetect output, v1 camera runs on 0x36, v2 camera on 0x10.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Prayuktibid
Posts: 11
Joined: Wed Aug 30, 2017 10:08 am

Re: How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera

Fri Aug 16, 2019 3:08 pm

Thank you very much for your answer and clarification but my main objective is to know which camera sensor is used in that camera module for both v1 & v2. Is this script return the camera sensor name? Normally, the Rpi camera modules are made using two camera sensor either imx219 or OV5647. My objective is to know only the camera sensor name. Than you.


Prayuktibid
Posts: 11
Joined: Wed Aug 30, 2017 10:08 am

Re: How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera

Fri Aug 16, 2019 3:26 pm

Yeah, it is true for the raspberry pi official camera module but it's not true for other RPI compatible chines camera module manufacturers. They have written something on their datasheet and given another thing on their camera module. We have seen that mismatching that's why I asked this question.
This code gives a camera sensor name but I am not sure it is giving a true result or not. here the code below.

Code: Select all

import picamera

with picamera.PiCamera() as cam:
    print(cam.revision)
   

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

Re: How to read picamera hardware information that which type of camera sensor(imx219 or OV5647) is being used in camera

Fri Aug 16, 2019 5:26 pm

V1 is ov5647
V2 is imx219
https://picamera.readthedocs.io/en/rele ... a.revision is valid. It reads the string as returned by the firmware for the sensor driver in use.
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.


Return to “Camera board”