Ask Your Question
0

Interaction with a kernel?

asked 2019-04-04 12:50:34 -0600

ThePromenader gravatar image

I would like to detect and isolate shapes, and for that would like to run a series of tests on a given x,y location to test for shape edge location/direction (to later follow it, even predict the direction (eventual line gaps, etc.)).

Does a cv2.kernel have to sweep the entire image, or is there some means of communicating with it with every pixel move? Is it possible to 'direct' a kernel (along a vector path, for example)?

edit retag flag offensive close merge delete

Comments

it is a bit unclear here, how kernels and shape detection are related. can you try to explain ?

berak gravatar imageberak ( 2019-04-05 07:52:41 -0600 )edit

Sorry about that... my basic question is: can an openCv kernel be 'directed' (to stop, change direction, follow paths, etc.)?

ThePromenader gravatar imageThePromenader ( 2019-04-05 09:43:31 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-04-14 09:39:33 -0600

ThePromenader gravatar image

Answering my own question, as I've learned to re-model my thinking around a better understanding of what openCv does, since. Short answer: no, one cannot interact with/control a kernel.

The challenge that motivated this question was treating an image with varying lighting, contrast and detail: the only ready-made function that does this, to my (still-limited) knowledge, is the 'adaptiveThreshold' function.

So if one has only an image with varying contrast, lighting, etc., to work with, and the analysis process is complex (beyond threshold finding: smoothing, filling gaps, finding lines and/or edges, etc.), one must first isolate that part of the image, then work on it (and paste the result to a 'processed' output image): this is basically akin to 'controlling the kernel'.

edit flag offensive delete link more

Comments

Well what you say is not really true, you can still apply everything you want (stop, change direction, follow paths, ...) if you separate the action from the kernel applying, and use each location where the kernel needs to be applied as some sort of sub window on which you apply the kernel.

StevenPuttemans gravatar imageStevenPuttemans ( 2019-04-15 04:42:18 -0600 )edit
1

Thanks for your reply, but that is what I meant: sorry if I wasn't clear. For clarification:

one must first isolate that part of the image, then work on it == separate the action from the kernel applying, and use each location where the kernel needs to be applied

ThePromenader gravatar imageThePromenader ( 2019-04-15 05:24:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-04 12:50:34 -0600

Seen: 283 times

Last updated: Apr 14 '19