Before openning the image using OpenCV, I'm trying to create a region groing algorithm using OpenCL. The problem is to find how i can fix the starting point pixel (germ) in this image and transform these steps in OpenCL. Thanks in advance

asked 2017-07-17 09:12:39 -0600

dab gravatar image

For each pixel I (i, j) do

If I (i, j) has not already been processed

Then Save (i, j), Growth (i, j),

Increment Region

end for

Growth (i, j)

For any Pixel (k, l) adjacent to I (i, j)

% For all 8-pixels If (Pixel (k, l) not already processed)

AND (Criterion (Pixel (k, l)) = Criterion (I (i, j))

Then Growth (k, l)

end for

edit retag flag offensive close merge delete

Comments

this looks like it's mostly a "random access" based algorithm. can you explain, why you think it would improve using opencl ?

berak gravatar imageberak ( 2017-07-17 11:58:47 -0600 )edit
1

are you aware, that opencv does not have a similar opencl implementation of connectedcomponents or findcontours ? guess, why.

berak gravatar imageberak ( 2017-07-17 14:13:25 -0600 )edit

Hi berak, i'm trying to make a region growing segmentation for my project in OpenCL, the algorithm is as follows: 1. seed the first pixel(seed) manually 2. get the value of the seed 3. compare it with its 4-neighbors or 8-neighbors(i dont know which is better) 4. if the neighbors have the same value then they are in region 5. compare these neighbors with there other neighbors and so on until it finds a boundary, then stop

dab gravatar imagedab ( 2017-07-17 15:31:43 -0600 )edit

@dab so if I get it correct, you want the community to translate your assignment into OpenCL code? Any reason why we would do that?

StevenPuttemans gravatar imageStevenPuttemans ( 2017-07-18 08:03:10 -0600 )edit
1

@dab, seems you misunderstood, what i'm saying: there are algorithms that are easy to parallelize, and thus work nice on the gpu, your idea does not look like that at all, it may be simply not feasible to do so.

berak gravatar imageberak ( 2017-07-18 08:06:55 -0600 )edit

StevenPuttemans sorry for the question

dab gravatar imagedab ( 2017-07-18 12:33:26 -0600 )edit

you do not have to be sorry, I just never get how students expect that others will solve their projects for them :)

StevenPuttemans gravatar imageStevenPuttemans ( 2017-07-20 03:04:18 -0600 )edit