Here's a sample image of my experiment which is to be processed for finding the information of all the blobs (centre, dimension etc.). Basically the image contains some noise, few bold lines, and of course few blobs.
My aim is to program a FPGA using an image processing package "Sapera APF". Sapera APF is an application for programming Teledyne DALSA frame grabbers to perform image processing. And unfortunately it doesn't allow us to write code in conventional way, neither allows to use basic coding features (if else statements, loops etc.) but only supports some inbuilt functions in form of code blocks, and we can only arrange these blocks. FYI, Here's a link to a list of functions supported by Sapera: https://www.dropbox.com/s/9f5qc9uki0lsalu/sapera_functions.docx
Now my first objective was to test my algorithm on matlab thereafter implementing it on Sapera. Here is my approach in matlab:
- Applied mean filter (for step 3)
- Thresholded image using adaptive thresholding (returning a binary image)
- Removed lines by checking connectivity, all lines are connected with above 100 pixels (for better connectivity mean filter was applied first)
- Now since only blobs were remaining, their locations were identified (with grayvalue=255) and corresponding pixels were taken in original image.
This is a simple algorithm which works fine in matlab. But the real problem is that for step 2 (i.e. connectivity) of course I had to write loops going to each pixel checking for connectivity, which can't be done in Sapera. So I am looking for some other simpler algorithm to separate blobs in my images, without using loops and conditional statement, so that it can be implemented in Sapera, but now I just need its matlab code or algorithm.
Edit: I cannot crop out strip containing blobs because other images may contain lines very close (maybe overlapping) to blob. For example, https://www.dropbox.com/s/m2j5pqo6stg4s1z/h125_s_-30.bmp