Lattice ICE40 UltraPlus FPGA (Image Processing Average of two input images Demo Part 5)

This part 5 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 in this image processing series, part1, part2, part3, part4. The following function is used to process the same image twice. So we created two independent header files from the same image in this case as cup.h and cup2.h and used the following process,

void test_images_average(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->send_mult(0.5f, true);
   img_proc->wait_end_busy();

   img_proc->switch_buffers();

   img_proc->send_mult(0.5f, true);
   img_proc->wait_end_busy();

   img_proc->send_binary_add(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 average both and creating the following output,

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