Lattice ICE40 UltraPlus FPGA (Image Processing Difference of two input images Demo Part 6)

This part 6 in a series of articles related to a demo that will perform classical image processing in the Lattice ICE40 UltraPlus FPGA. The system that will be used is the Lattice ICE40 FPGA UltraPlus Breakout Board.

image

Please refer to the previous articles part 1, part 2, part 3, part 4, part 5 in this series. The following function is used to process the same input image twice. So two independent header files were created from the same image in this case as cup.h and cup2.h and used the following image processing difference process,

void test_images_diff(uint8_t *image_input1, uint8_t *image_input2, uint8_t *image_output, Image_processing *img_proc){
   img_proc->send_params(image_width, image_height);
   img_proc->send_image(image_input1); //in input buffer

   img_proc->switch_buffers();

   img_proc->send_image(image_input2);
   img_proc->switch_buffers();

   img_proc->send_binary_sub(true, true);
   img_proc->wait_end_busy();

   img_proc->switch_buffers();
   img_proc->read_image(image_output);
}

This image processing demo takes these two identical images and performs the difference between both with the following output,

As expected, the output image (cancellation) is as follows,

In the next article we will be describing more image processing demos in this platform as well as more details, stay tuned. The Lattice ICE40 FPGA UltraPlus Breakout Board is an excellent, low cost, but powerful enough to even tackle image processing applications and is available at DigiKey.

Have a wonderful day!

This article is available in spanish here.

Este artículo está disponible en español aquí.

1 Like