Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Processing Problem

Solved!
Go to solution

Hi, all.

I have a problem about image processing with FPGA.

 

I made programs that gets image from camera in HOST, then send it to FPGA and processes it to binary image, after that send it back to HOST.

 

These programs works without error, but the processed image is split wrongly.

(I attached the original and processed image, and you can find the image is split vertically then lined up wrongly.)

 

Also, I attached my programs.

 

Thank you for your attention.

Best regard.

cleska.

Download All
0 Kudos
Message 1 of 3
(1,225 Views)
Solution
Accepted by topic author cleska

It's just an alignment issue.  You are probably getting part of a line from a previous image, which shifts everything over half an image.  The lines wrap to the next line.  You could solve this by clearing the buffer somehow and making sure it was aligned at the start of each image.

 

Why are you spending the time of sending the image to the FPGA and then sending it back?  Your program would probably be much faster if you just do the binary operation on the host.  I have found that FPGA processing of images is usually only faster if the image is being acquired in the FPGA, then sent back to the host after processing.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 3
(1,190 Views)

Hi Bruce Ammons.

 

Thank you for your reply.

 

I checked my FPGA program again, and found that I missed the line from "ready for imput" in IMAQ FPGA Image Types VI to "ready for output" in IMAQ FPGA FIFO to Pixel Bus VI.

Finally, I got the desired image from FPGA.

 

Also, I thank you so much for your programming advice.

I would like to rewrite my program for better one.

 

Thank you again.

cleska.

0 Kudos
Message 3 of 3
(1,154 Views)