Can I run Opencv in tflm_cifar10 with MIMXRT1060-EVKB?

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

Can I run Opencv in tflm_cifar10 with MIMXRT1060-EVKB?

Jump to solution
319 Views
nnxxpp
Contributor III

My question is in the title. I want to use some built-in method in Opencv but I am not sure, whether I can run Opencv on MIMXRT1060-EVKB.

If so, please help me to config it. Where I need to put source code and config to build and flash to the board.

Thank you.

Labels (1)
0 Kudos
1 Solution
224 Views
nnxxpp
Contributor III

@Sam_Gao @Dennisleon 

Thank you for useful information. 

OpenCV is the powerful tool. In my case, I want to use some resizing methods in OpenCV. 

Due to memory constraits and more complex compilation procedure, I want to get another solution. I found that this repo https://github.com/nothings/stb/blob/master/stb_image_resize2.h . It is easy for me. Simply, I put .h file to the source code and run it without changing any configs.

View solution in original post

0 Kudos
3 Replies
225 Views
nnxxpp
Contributor III

@Sam_Gao @Dennisleon 

Thank you for useful information. 

OpenCV is the powerful tool. In my case, I want to use some resizing methods in OpenCV. 

Due to memory constraits and more complex compilation procedure, I want to get another solution. I found that this repo https://github.com/nothings/stb/blob/master/stb_image_resize2.h . It is easy for me. Simply, I put .h file to the source code and run it without changing any configs.

0 Kudos
304 Views
Sam_Gao
NXP Employee
NXP Employee

Hi @nnxxpp 

Thanks for your question, many OpenCV examples running on PC or other MPU/SoC/AP platform mostly, there is some referece application note about how to build an openCV library with GCC/ARMClang and run it on our RT-series MCU Platform (e.g. RT 1170 EVKB board), I strongly recommand to get more from this AN which base on our XPresso IDE: https://www.nxp.com/docs/en/application-note/AN13753.pdf, also example to deploy on the 1170 EVK https://www.nxp.com/docs/en/application-note/AN13725.pdf

 

Have a nice day!

Sam

0 Kudos
305 Views
Dennisleon
Contributor I

Hello @nnxxpp ,

The i.MX RT1060 Evaluation Kit (MIMXRT1060-EVKB) is a powerful platform for evaluation and prototyping using the MCUXpresso suite of software and tools. It features the i.MX RT1062DVL6B processor, which is a Cortex-M7-based crossover MCU. Here are some details about the board:  

Processor: The MIMXRT1060-EVKB is equipped with the i.MX RT1062DVL6B processor.

Memory: It has 256 Mb SDRAM memory, 512 Mb Hyper Flash, and 64 Mb QSPI Flash.

Interfaces: The board includes various interfaces such as USB host and OTG connectors, Ethernet (10/100M) connector, CAN transceiver, and an Arduino® interface.

Display and Audio: It features a parallel LCD connector, camera connector, audio codec, 4-pole audio headphone jack, external speaker connection, and a microphone.

Software Support: You can develop applications using the MCUXpresso SDK with optional FreeRTOS support and the MCUXpresso IDE. Additionally, it is supported by Zephyr OS.

To get started with your MIMXRT1060-EVKB, follow these steps:

Configure Boot Mode:
The board has four boot modes, with one reserved for NXP use. To boot from the QSPI flash, ensure that SW7 is set to 0010.

Attach the USB Cable:
Connect the MIMXRT1060-EVKB board to your PC using the included micro-USB cable (connector J1).

Run the Out of the Box Demo:
Your MIMXRT1060-EVK comes preloaded with a “LED blinky” demo that uses the onboard LED. When the board is powered, the Green LED should flash on and off.

Regarding OpenCV, the MIMXRT1060-EVKB is primarily designed for embedded applications, and running full-fledged OpenCV might be challenging due to resource constraints. However, you can explore using OpenCV Lite, which is a lightweight version optimized for embedded platforms. Here are some steps to consider:

Cross-Compilation:
Set up a cross-compilation environment for the MIMXRT1060-EVKB. You’ll need a toolchain compatible with the Cortex-M7 architecture.

Build OpenCV Lite:
Obtain the OpenCV Lite source code and configure it for your target platform. Compile it using the cross-compiler.

Integration:
Integrate the compiled OpenCV Lite library into your application project.

Test and Optimize:
Develop a simple OpenCV application (e.g., image filtering) and test it on the board.

Optimize your code for memory and performance constraints.

Keep in mind that you’ll need to manage memory carefully, as the MIMXRT1060-EVKB has limited resources compared to desktop systems. Additionally, consider using hardware acceleration (if available) to improve performance.

I hope the information may helps you. 

0 Kudos