How Edge Detection In Images Work

View Reddit by aryamanshardaView Source



ofNoImportance · August 30, 2020 at 3:24 am

Sobel filters are used in video games to achieve a ‘cartoon outline’ effect (like in the Borderlands franchise). The filter is used not on the game’s visual information but instead on its [depth buffer]( The depth buffer stores information about how far away things in the game are from the camera, so when an edge detection algorithm is used it will _generally_ highlight the edges between different objects. The edge is then given a black colour and you will have something that resembles a hand drawn cartoon.

butt_fun · August 30, 2020 at 6:05 am

tldr high pass filter

mb862 · August 30, 2020 at 10:09 am

Fun fact: the expression for determining greyscale intensity there is the one actually used to compress video basically since the advent of colour TV. It’s been tweaked a few times for HD, 4K, and HDR, but the concept remains the same. You split the colour information into luminance, red, and blue (green is inferred), and only store red and blue at half or quarter resolution. This reduces bandwidth whilst preserving details that your puny human eyes care about, very important in the early age of broadcast television. But I think the most entertaining side effect of transmitting video this way is that it separates luminance from colour, meaning if you popped that signal into a device that didn’t understand colour – like the scores of black and white televisions already in people’s homes across the world – it would just ignore the colour and show the greyscale image they would have otherwise gotten with a black and white signal. Despite this feature being unnecessary for the last few decades it so, it continues to be the system we use to transmit video today (look for yuv422 or yuv420p in ffmpeg or Plex).

angeal98 · August 30, 2020 at 11:59 am

So if the image is like 8k, the 3×3 grid might not see any edges, right?

aazav · August 30, 2020 at 1:11 pm


it works

That’s how it works in English.

AggravatingReindeer8 · August 30, 2020 at 5:07 pm

Can also use the Laplace filter

Leave a Reply

Your email address will not be published. Required fields are marked *