How to make the raspberry pi camera work with imx8mm

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to make the raspberry pi camera work with imx8mm

3,143 次查看
anurag16doshi
Contributor III

I am working on an imx8mm evk board with a custom linux  bootloader and kernel. But the filesystem used is the same as the distributed version by nxp. I have previously made use of the MIMMINITOCSI camera by NXP for streaming and capturing images.

I use the following commands:

$ gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg

and

$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! waylandsink

 

I want to use the imx8mm evk board and the raspberry pi camera to stream and capture images. When I use the commands above I get the following errors

$ gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000215875
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

and a similar one stating internal data stream error for the other command.

 

Could someone direct me towards how do I go about achieving this?

标签 (1)
0 项奖励
回复
2 回复数

3,130 次查看
Hermanl
Contributor I

To attach a camera module to a Pi Zero:

  1. Remove the existing camera module’s cable by gently lifting the collar on the camera module and pulling the cable out.
  2. Next, insert the wider end of the adapter cable with the conductors facing in the same direction as the camera’s lens.
  3. Finally, attach the adapter to the Pi Zero by gently lifting the collar at the edge of the board (be careful with this as they are more delicate than the collars on the regular CSI ports) and inserting the smaller end of the adapter with the conductors facing the back of the Pi Zero.

You will need to reboot after doing this (but this is one-time setup so you won’t need to do it again unless you re-install your operating system or switch SD cards). Once rebooted, start a terminal and try the following command:

raspistill -o image.jpg

If everything is working correctly, the camera should start, a preview from the camera should appear on the display and, after a 5 second delay it should capture an image (storing it as image.jpg) before shutting down the camera.

0 项奖励
回复

3,135 次查看
igorpadykov
NXP Employee
NXP Employee

Hi anurag16doshi

 

this camera uses IMX219 sensor and one can try suggestions provided on

https://community.nxp.com/t5/i-MX-Processors/IMX8M-Mini-New-MIPI-CSI-Camera-Driver-Integration/m-p/1...

 

Best regards
igor

0 项奖励
回复