GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Filter strokes less than a certain size

Open StakshiGarg opened this issue 12 years ago • 3 comments

Hi,

I am trying to figure out way by which i can filter strokes/lines(output of canny edge detection filter) based on stroke length(say have all strokes with length greater than 15 pixels else ignore them). Is there a filter that does that. Any guidance on how to achieve same will be great!!!

Thanks

StakshiGarg avatar May 13 '14 11:05 StakshiGarg

I don't know that there is a great way to handle this within the framework right now. Opening and closing filters help eliminate small features overall, but what you want is a line length, which is not entirely in the X or Y directions. You might be able to come up with a stepwise reduction filter that eliminated features below a certain size within a moving rectangle, but that might not work for picking out all varieties of lines.

BradLarson avatar May 13 '14 18:05 BradLarson

hi Brad,

I was thinking of having a matrix of (2n+1)*(2n+1) of texture coordinates and then iterate over it starting from centre to get stroke length. Can you suggest how best to get vertex shader to give me such matrix. i have not seen any array of texture points.

Thanks

StakshiGarg avatar May 16 '14 08:05 StakshiGarg

I think i dont need above info. I implemented by moving around image texture in fragment shader upto say n connected points are reached. If so show that point else remove it. Thanks.

StakshiGarg avatar May 20 '14 05:05 StakshiGarg