imxRT1060 evk camera image capture and transfer.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imxRT1060 evk camera image capture and transfer.

1,345 Views
niketsarda
Contributor II

Hi,

We are working on the imxRT1060 evk.

In our application, we have to capture an image and send RAW data to mobile device.

We have taken CSI example code and able to start camera.

And according to the camera flow, we understand that 

CAMERA_RECEIVER_GetFullBuffer() function will give full camera FB image for that instance in inactiveFrameAddr variable.

For our application for image data transfer, we have taken value from inactiveFrameAddr and assign to the char pointer, and we took the strlen of those data to manage the raw data transfer(RGB565) and send those data to the mobile in from of chunk of 244 bytes packet.

Once mobile receive the data and convert the RAW data to any format to show the image on mobile, we not able to display the same image as we show on the imxRT1060 LCD. Image shown on mobile is not in proper pixel format.

Can you please help us to make the image steady.

Is our flow for image capture is right?

What will be the total size of Frame Buffer of single image frame (inactiveFrameAddr)?

Please let me know if something misses here.

Thank you 

4 Replies

359 Views
110062131
Contributor I

Hi,

I am working on trash classification with imxrt1060 board.

I need to capture an image of the trash with maybe a camera on the board and send the image data to my PC.

To be more specific, what I hope is actually let a python code on my PC get the image data as the input and output the result of classification to the board.

So my question is, how do I achieve the goal of transferring image data from board to my python code on PC?

So far I have run 2 examples that I think are crucial: csi_rgb565 and usb_dev_virtual_video(or virtual camera).

My thought is that I might be able to transfer data through COM port? But I have no idea how to modify csi_rgb565 code neither the virtual camera example seems no help towards real object capturing.

Thanks.

 

0 Kudos

270 Views
110062131
Contributor I

Ugh a quick update. 

We fail to transmit image data either from modifying csi_rgb565 or usb_dev_virtual_video.

However, we somehow find another sample code to achieve char by char transfer: luart_interrupt.c, which helps us send the result of trash classification from PC to the board.

And we actually cheat it by not using the camera module associated with the board. Instead, we simply use a webcam and send image into python code directly 0.0

0 Kudos

1,065 Views
niketsarda
Contributor II

HI Carlose

Thank you for updated,

I am able to send image to my mobile device and on mobile device i am able to show correct image, our issue is related to storing the received data in proper formate on mobile device.

Now, I have face some other issue, in MCUxpresso default CSI camera example has 272x480 resolution setting.

When i change it to 480x640 then camera example stop working.

Can you please suggest what all other changes required to make my CSI camera with 480x640 resolution .

Thank you

1,065 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi niket,

You should verify the color format since the camera output. The CSI camera could be configured with I2C commands, you should ensure the colors order (Red-Green-Blue or Blue-Green-Red), besides of the number of bits and the alignment.

Then, when creating the buffer, verify the endianness of the transfer, ensuring proper LSB or MSB transfer first according with the expected format of the mobile application.

You should also verify the packet size and format of the transport layer used to transfer the buffers from the i.MXRT device to the mobile application.


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------