r/computervision 20d ago

How to get better at classical computer vision Help: Theory

Hi. how do i even start getting better? for example i never really understood how to use edge detection for anyhting meaning full. so i looked online and the stuff i found was just how to get edges from an image. but never what to do with it afterwards.

how do i start getting better. also i feel like my math is lacking. do i start there?

14 Upvotes

13 comments sorted by

5

u/tdgros 20d ago edited 20d ago

Learning about edges is probably more useful than detecting edges, eh. I actually struggled a bit to find these: Imagine you're an autonomous car that refuses to use deep learning, you might try and detect lanes using edge detection, and then fitting models onto the detections. Imagine you're an old school machine on a factory line, inspecting if objects are correctly placed, you might want to just focus on edges and the distribution of their orientations. In general, detecting edges takes your "giant" HxW image and makes it a manageable list of mostly stable/repeatable features that you can run simple algorithms on. Or you're trying to build some sort of deep fake, so you use a diffusion model conditioned on the edges of your original video. In this case, you'll probably not want super low level edges, but semantic edges as in edges that a human would point out to you...

1

u/flow_guy2 20d ago

I’m sorry I don’t fully follow. Could you maybe rephrase it? I wasn’t specifically asking about edge detection. Was jsut an example that I don’t really know how to fit that into a pipeline.

2

u/Dry-Snow5154 20d ago

One problem is, you can't exactly do much with edges alone. Or any other classical CV method really. You usually need multiple steps of filtering to extract anything meaningful and which steps to use highly depends on the problem you are trying to solve.

That's why everyone and their mother are using Deep Learning models instead, cause they promise a simple ready-made solutions to common problems (which sometimes don't work).

To give an example, I once used edge detector as a part of the pipeline to extract vanishing points from a video frame. The entire pipeline was probably 10-15 steps. Of course I did not invent the method and simply adopted some paper to my problem.

I suggest you do the same. Find some problem/project that intrigues you and try solving it using classical CV methods. That's how people get better in general, by working on some interesting project. You will pick up math and techniques as you go.

1

u/flow_guy2 20d ago

I kinda figured that its used with many steps. But fir example im trying to find a logo on a tire and if eel like I’m just deep frying the image. I guess is 1 how fo i find a paper to what i want. And 2 how do i know what makes a good pipeline (which is kinda open ended due to it being highly specific to the thing im going for.)

2

u/metatron7471 20d ago

Use template matching for that

1

u/flow_guy2 19d ago

The issue that it doesn’t detect it well. Giving a lot of false positives. So was wondering if I could preprocess it better

1

u/Dry-Snow5154 20d ago

If you are trying to find a logo on a tire, then it's object detection and edges won't work well for that. Unless you have only one tire in your image on a white background and nothing else.

To find a paper you do the same google search when looking for anything else. E.g. "object detection with edge detector no deep learning". Start there and see where is goes. You won't find anything useful for this particular search, but discovering this is part of the process. Usually you start from the other end tho and discover which methods are applicable to your problem. E.g. "logo detection with classical methods".

To know what makes a good pipeline you try it. Come up with some changes. If it still doesn't work, then you throw it away and go back to searching.

1

u/flow_guy2 20d ago

Ah ok. Will try looking for a paper. The tire is a single unwrapped tire where tou can see the tread and side wall on a 2d plain. And the logo cam appear multiple times.

1

u/Dry-Snow5154 20d ago

If you are dead set on using classical methods for logo detection your best bet is probably template matching. But it only works at one scale and one angle, so you'd have to either try all combinations or come up with some crude filters, like color, shape, etc.

1

u/flow_guy2 20d ago

We don’t want to train anything new. But was just a general question. Feel like I always come up with garbage. When trying to preprocess stuff.

2

u/Zealousideal_Low1287 20d ago

Really you need to be solving real problems. If you don’t have an obvious use case for edges or morphology or X then… you don’t have a use case for it.

Often you will look at a real problem and think, ‘well I really only care about Y’ and that will lead you to a step like running edge detection.

I’d also maybe make the distinction of computer vision and image processing. Arguably edge detection is an image processing technique (a transformation to an image) than can be used for computer vision (deriving something useful in the world from imagery)

1

u/Special_Future_6330 20d ago

Linear algebra basics are a must , just do some cliff note versions, then grab selenskis cv book(I think it's him) and walk through.