Finding the Edges (Sobel Operator) - Computerphile

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น •

  • @Jonas-mg5wx
    @Jonas-mg5wx 8 ปีที่แล้ว +151

    The sobel filter actually already includes a Gaussian filter. The "2"s in the filter kernel are not meant to preserve pixels in the centre but to smooth the image and reduce the noise in the output. The sobel filter in x-direction includes a Gaussian filter in the y-direction and the other way round. The sobel filter is basically a combination of the prewitt and Gaussian filter.

    • @shiphorns
      @shiphorns 8 ปีที่แล้ว +6

      Yep. Even the Prewitt operator reduces noise a little bit, since it is a 3-row (or 3-column) mean.

    • @kukuster
      @kukuster 4 ปีที่แล้ว +6

      In my humble personal experience recently, weighting central pixels more improves the quality of diagonal edges extraction (those that are not straight x-direction or y-direction)

    • @yashgupta3127
      @yashgupta3127 4 ปีที่แล้ว +2

      I actually opened this video to get this answer only my proff said that shobel also gives averaging effect and I was all confused that how,Can you explain briefly cuz it's quite hard to visualise what you have written that guassian filter is there.

    • @mich2k1
      @mich2k1 ปีที่แล้ว

      I came here for this, and after 6 years still no answer on how these 2 are gaussian filters

    • @Frumpbeard
      @Frumpbeard ปีที่แล้ว +1

      ​@@mich2k1 a 3x3 Gaussian filter is:
      [1, 2, 1;
      2, 4, 2;
      1, 2, 1]
      A Prewitt operator is:
      [1, 0, -1;
      1, 0, -1;
      1, 0, -1]
      And:
      [1, 1, 1;
      0, 0, 0;
      -1, -1, -1]
      What do the Sobel operators have in common with the Gaussian filter that the Prewitt operators do not?

  • @TechyBen
    @TechyBen 9 ปีที่แล้ว +210

    When I was a kid, I saw edge detection in software as some sort of magic. I just could not figure out how it was possible. Though I never did try to think of the maths involved.
    Thanks for making such a hidden world come to life and make sense and reality. :)

    • @TheGrandexeno
      @TheGrandexeno 9 ปีที่แล้ว +1

      +David Last Nerd kids on yt are the worst, I swear...

    • @KabooM1067
      @KabooM1067 9 ปีที่แล้ว

      +David Last
      I don't get why you're showing off.... To whom?

    • @official-obama
      @official-obama 3 ปีที่แล้ว

      @@TheGrandexeno huh?

    • @TheGrandexeno
      @TheGrandexeno 3 ปีที่แล้ว

      @@official-obama why are you here and not on TH-cam kids?

  • @towaly3
    @towaly3 5 ปีที่แล้ว +36

    This is brilliant. This stuff seems so abstract and hand wavy when you see it in action but then when you get to the low level of it its really quite simple. Amazing

  • @LovePeace2025
    @LovePeace2025 8 ปีที่แล้ว +590

    My computer vision professor should be fired...

    • @khaldrogo9451
      @khaldrogo9451 6 ปีที่แล้ว +13

      same here lol

    • @ajinkyarathod5180
      @ajinkyarathod5180 4 ปีที่แล้ว +5

      This made me laugh so hard

    • @CatJell
      @CatJell 4 ปีที่แล้ว +3

      same

    • @MusicToTheWolf
      @MusicToTheWolf 4 ปีที่แล้ว +3

      This is such basic stuff, if you study computer science you should understand it anyway really..

    • @ashley-rh9wj
      @ashley-rh9wj 4 ปีที่แล้ว +7

      i guess i just hate powerpoint lectures

  • @msdfsdfe2533
    @msdfsdfe2533 8 ปีที่แล้ว +3

    Thank you so much.
    You explain how sobel works better in a 7 min video, than in an entire course over the semester at the college where I study.

  • @bowi1332
    @bowi1332 3 ปีที่แล้ว +1

    This is the best channel to explain to people why mathematics can be useful and fun.

  • @nikhilrout3287
    @nikhilrout3287 9 หลายเดือนก่อน +1

    this is beautiful. watched it about a week ago and finally implemented a real time sobel filter in verilog for FPGAs today

  • @scriptkiddie7485
    @scriptkiddie7485 7 ปีที่แล้ว +2

    This is probably my favorite youtube video I have every seen in my life.

  • @coemgeincraobhach236
    @coemgeincraobhach236 3 ปีที่แล้ว

    from unnecessarily complicated math notation to cut outs of printer paper from the 80's, delighted i found these videos! thanks!

  • @myrixtyzm3524
    @myrixtyzm3524 9 ปีที่แล้ว +91

    love this guy.

  • @joejamesusa
    @joejamesusa 2 ปีที่แล้ว +4

    Excellent explanation of the Sobel edge detection algorithm in easy-to-grasp terms. Love it!

  • @HazardousMoose
    @HazardousMoose 9 ปีที่แล้ว +5

    I love how these videos match up with my curriculum:D Had to program an application that takes an image, converts it to grayscale, smooths it with a mean blur, then applies a sobel filter. And based on the results it would find the chain of pixels crossing the least edges, and would remove it from the image. A.k.a. content aware resizing...

  • @DeJayHank
    @DeJayHank 9 ปีที่แล้ว +7

    Excellent video about this! I never thought about extracting the edge angle before. This might come in handy in combination with a Hough Line transform.

  • @U014B
    @U014B 9 ปีที่แล้ว +110

    C#? You mean Db?

    • @MrAkpla
      @MrAkpla 6 ปีที่แล้ว +33

      Three years you waited, and your musical pun has finally been appreciated

    • @grn1
      @grn1 3 ปีที่แล้ว +2

      @@MrAkpla 2 more years and they got a chuckle out of me.

    • @bruhmoment5227
      @bruhmoment5227 3 ปีที่แล้ว

      @@grn1 and 2 months

  • @AdeonWriter
    @AdeonWriter 9 ปีที่แล้ว +42

    As a C++ programmer, I'd love a why C# rocks rant. I like having my eyes opened!

    • @Spongman
      @Spongman 9 ปีที่แล้ว +9

      +Adeon Writer looking at his code i'm guessing a C++ programmer wouldn't be blown away at his rant. but i'd take a look at 'Expression', 'yield return', PLINQ and 'async/await' for some killer c# features.

    • @AximVidya
      @AximVidya 9 ปีที่แล้ว +1

      +Spongman S I'm guessing that the code is deliberately verbose, in order to be as understandable with as little programming knowledge as possible, and I would say it's pretty good at that.

  • @Roxor128
    @Roxor128 9 ปีที่แล้ว +5

    To all those complaining about the example being in C#, man/woman up and just convert it to your language of choice! I haven't used it, but I imagine it's going to be very similar to C++, Java, or HLSL, none of which are difficult to convert to each other.

  • @ainymunnee7780
    @ainymunnee7780 8 ปีที่แล้ว

    if I had to name a super hero, it would be you! you saved my day I have an exam tomorrow and I was on the verge of nervous breakdown, you saved me! thanks a million

  • @firstnamelastname4752
    @firstnamelastname4752 9 ปีที่แล้ว +1

    I don't code, so as an off-topic aside you can create a cheap edge-map in Photoshop by duplicating an image into another layer, gaussian-blurring the top one slightly, then setting its blending mode to negative. You might need to fiddle with the blur size and also dump a curves layer on top to brighten/darken it.

    • @Roxor128
      @Roxor128 9 ปีที่แล้ว +1

      +Firstname Lastname Congratulations. You've independently recreated the Unsharp Mask algorithm. No, seriously. That's how it works. It's the difference between the original image and a blurred copy, though I can't remember which order you're supposed to put the two in the subtraction stage.

    • @firstnamelastname4752
      @firstnamelastname4752 9 ปีที่แล้ว

      Oh. Well that's cool. Yeah I can't remember the order either, I just assumed blurred on top.

    • @MAP233224
      @MAP233224 ปีที่แล้ว

      you can look into "the difference of gaussians"

  • @bdulagadadasev6495
    @bdulagadadasev6495 6 หลายเดือนก่อน

    Thank you, really. Your explanation is easily understandable and comprehensive.

  • @RacingRalphEVO
    @RacingRalphEVO 3 ปีที่แล้ว +1

    This guy is so amazing that I even won't be complaining about the code being in c# :D

  • @tastelesstouch
    @tastelesstouch 9 ปีที่แล้ว +1

    Perfect timing! Keep the image processing videos coming!!!

  • @usama5015
    @usama5015 5 ปีที่แล้ว

    excellent teaching . Answer to the counter question are clearly demonstrated.

  • @emneemne
    @emneemne 6 ปีที่แล้ว

    Best teacher ever! (just passed my computer vision class - thank you!)

  • @hadirotafoua5381
    @hadirotafoua5381 6 หลายเดือนก่อน

    love such confidence in speaking .. thanks big prof

  • @squidcaps4308
    @squidcaps4308 9 ปีที่แล้ว +1

    Good timing, just modifying Sobel edge detection shader code, trying to figure out something neat out of it, maybe playing around with z buffer.

  • @anteconfig5391
    @anteconfig5391 6 ปีที่แล้ว +2

    I gotta re-watch some numberphile or PBS Infinity Series videos. It took me a while to understand why the Pythagorean theorem works here. I'm starting to realize things I should've realized before and it's making me wonder how much more I didn't understand the first time through.

  • @boratsagdiyev3936
    @boratsagdiyev3936 5 ปีที่แล้ว

    this really helped with my digital signal processing lab today. thanks

  • @markurban9113
    @markurban9113 8 ปีที่แล้ว

    You can run Sobel on color, you will get three X,Y gradients one for each channel, sometimes objects are visible better in just R or B... or you can do a weighted average of all three which might sometimes give a better result than just running it on grayscale.

  • @SO-dl2pv
    @SO-dl2pv 5 ปีที่แล้ว

    in 5:37 you mean atan2 instead of atan because atan function will have a problem when Cx = 0 or when both Cx and Cy are equal to 0.

  • @isaacaskey1410
    @isaacaskey1410 4 ปีที่แล้ว

    Great video, straightforward and easy to understand!

  • @LeifPeterson3D
    @LeifPeterson3D 9 ปีที่แล้ว

    I've used Sobel Edge detection to make a video game render post-process, well, I multiply a crunched (black and white) and clamped (0-1 scalar), then inverted to get nice black edges.

    • @Roxor128
      @Roxor128 9 ปีที่แล้ว

      +Leif Peterson I've done something similar in HLSL to make a sort-of toon shader for video playback. I only used a single kernel with different weights, though. 5*5 kernel with -24 in the centre and 1 everywhere else.

    • @LeifPeterson3D
      @LeifPeterson3D 9 ปีที่แล้ว

      +Roxor128 doing the game post-process involved jittering the depth buffer, or, the World Normal, which can allow you to get interior edges

    • @eideticex
      @eideticex 9 ปีที่แล้ว +1

      +Leif Peterson Sounds like the technique I've used for edge detection in a deferred renderer. I started with a sobel filter but found it too noisy and didn't like the idea of blurring to solve the noise since that would kill some of the desired edges. Then incorporated view space normals by analyzing the trend of the normals. Flat out multiplied the trend by the sobel result and it produces very nice edges that mimic the style you see in old Japanese ink drawing. It really didn't matter if the normals were view or world space since all I analyzed them for was trends along the surface.

    • @Roxor128
      @Roxor128 9 ปีที่แล้ว

      +Leif Peterson I've done that, too. Just not in a shader. Pure CPU implementation with a raytracer. Build depth and normal buffers while doing the main rendering, then process them to get edges. Even got the edges in reflections.

  • @AlexanderTrefz
    @AlexanderTrefz 9 ปีที่แล้ว +71

    DO THE WHY C# ROCKS RANT! C# is just great.

    • @Jet-Pack
      @Jet-Pack 9 ปีที่แล้ว

      +Alexander Trefz I love it, too :D

    • @zik2000
      @zik2000 9 ปีที่แล้ว +21

      hahahahah! nice try microsoft!

    • @AntiHeadshot
      @AntiHeadshot 9 ปีที่แล้ว

      +Alexander Trefz Get this guy to the top :D

    • @Lvl100Boss
      @Lvl100Boss 9 ปีที่แล้ว +3

      +Alexander Trefz C# is trash

    • @AlexanderTrefz
      @AlexanderTrefz 9 ปีที่แล้ว

      Tard Al Yes, please give him more reasons to stuff you up with all the objective facts why C# is most certainly among the best languages available, if not the best. Please.

  • @b.b.4969
    @b.b.4969 5 ปีที่แล้ว +1

    I:m SO glad i found this channel THANKYOU!

  • @bekay7663
    @bekay7663 ปีที่แล้ว

    OMG TYTYTY. Im doing this right now for cs50x and I got kicked out of highschool during covid, so this helps me a lot.

  • @dougsmith3372
    @dougsmith3372 6 ปีที่แล้ว +1

    At 1:28 he points to the paper and says "this location here." What location? I cannot see it. His hand is in the way. Use a pointer and make sure the viewer can see what is being pointed at.

  • @MrBoobcube
    @MrBoobcube 8 ปีที่แล้ว +3

    I like your choice of shirt given the content.

  • @manon-gfx
    @manon-gfx 9 ปีที่แล้ว

    Really helpful video for getting edge detection in my toon shader to work! thanks!

  • @rosssharma542
    @rosssharma542 9 ปีที่แล้ว

    Nice video, as always. But here's a little tip. If you're shooting a person writing with their right hand, shoot them from the left. And vice versa if they're left-handed.

  • @rayanemesbah7815
    @rayanemesbah7815 ปีที่แล้ว

    The sound of marker (pen) is painful but the video is so appealing I couldn't stop watching

  • @SuperDayv
    @SuperDayv 7 ปีที่แล้ว

    Can you explain what you said at around 5:18? If there is a strong horizontal edge but no vertical edge this would correspond to a medium value when they're combined. But isn't this a genuine edge? Shouldn't this have a large value? Also, how could there be a strong horizontal and vertical edge in the same location? Would that be a diagonal?

  • @mfaraday4044
    @mfaraday4044 4 ปีที่แล้ว

    Thank you wonderfull explaination .
    Finally I found this channel.

  • @juanrada1040
    @juanrada1040 8 ปีที่แล้ว

    What a great explanation, thanks for this material.

  • @rikvandenreijen
    @rikvandenreijen 6 ปีที่แล้ว

    Awesome video, you have a very nice way of teaching!

  • @Caboom11
    @Caboom11 2 ปีที่แล้ว

    These videos helped me SO much! Thanks heaps

  • @uniquehandle767
    @uniquehandle767 7 ปีที่แล้ว

    These are the coolest videos.

  • @saivenkat5125
    @saivenkat5125 6 ปีที่แล้ว

    good explanation....can you also explain about the gabor filters too??

  • @bilbopraktikums509
    @bilbopraktikums509 7 ปีที่แล้ว +1

    Dude, I love you. Seriously, I do.

  • @p4radox0
    @p4radox0 9 ปีที่แล้ว

    Please, more of this guy!!

  • @sprites
    @sprites 9 ปีที่แล้ว +4

    Fascinating. After watching all of computerphile's edge detection videos I'm really interested to learn more about computer vision and how it uses these edges.
    How would you avoid processing a larger image for edge analysis? Keypoints? Is there an algorithm that can skim an image for just the main edges?

  • @mailoisback
    @mailoisback 4 ปีที่แล้ว +2

    Where can I find the code he is talking about? The link seems to be broken.

  • @airjuri
    @airjuri 8 ปีที่แล้ว +1

    thank you, we made bounce angle calculations using sobel operator :D

  • @MrTridac
    @MrTridac 9 ปีที่แล้ว +126

    I like Mike. I dislike C# but I'd still like to have the "Why C# rocks" rant.

    • @ihrbekommtmeinenrichtigennamen
      @ihrbekommtmeinenrichtigennamen 9 ปีที่แล้ว +14

      +MrTridac
      I'd like to know why you dislike C#. Not to start a flamewar or anything but just to hear different opinions on it.

    • @PapoochCZ
      @PapoochCZ 9 ปีที่แล้ว +12

      +Ihrbekommtmeinen Richtigennamennicht : Bad portability

    • @ihrbekommtmeinenrichtigennamen
      @ihrbekommtmeinenrichtigennamen 9 ปีที่แล้ว +7

      +Papooch
      What kinds of programs are you writing? For what kinds of clients? I'd like to know why portability is important for you.
      Aside from that: Mono can do quite a lot and it supports WinForms. Unfortunately though it does not support WPF, but that would also be really hard to do.
      Edit: Also this is not a problem with C#, it's a problem with .NET in general.

    • @derstreber2
      @derstreber2 9 ปีที่แล้ว +5

      +MrTridac
      I agree the rant would be insightful.

    • @MrTridac
      @MrTridac 9 ปีที่แล้ว +4

      Ihrbekommtmeinen Richtigennamennicht
      It's meant to be used with/for .net programs and I'm just not a big fan of VM's in general (includes java). I know, I'm old school but I like me some neat C++ without sharps and CLIs :)

  • @jicherry6750
    @jicherry6750 3 ปีที่แล้ว

    Great explaination sir. Thank you very much!

  • @Whateleyben
    @Whateleyben 3 ปีที่แล้ว +1

    Hello I would really like to view Mikes code, but the link seems to be broken.

  • @himanshu2891
    @himanshu2891 4 ปีที่แล้ว

    such amazing explanation. i paid lakhs to my univ hoping i'd get this.

  • @quicksilver5413
    @quicksilver5413 2 ปีที่แล้ว

    Thank you for explaining it so clearly!

  • @peschebichsu
    @peschebichsu 3 ปีที่แล้ว +1

    Love all your videos! Would be nice if you made something about image warping. Seems like a hard to understand but interesting topic for me. So perfect for you to make an easy to understand video :D

  • @francoisantoinejacques8843
    @francoisantoinejacques8843 4 ปีที่แล้ว

    pretty clear, thanks a lot for your work !

  • @theodoretourneux5662
    @theodoretourneux5662 2 ปีที่แล้ว

    thanks for this great video! very helpful and clear!

  • @JacobFreeze
    @JacobFreeze 6 ปีที่แล้ว

    Thanks for this very clear explanation!

  • @kilésengati
    @kilésengati 9 ปีที่แล้ว +3

    Is it possible to generate normal maps with the sobel generator? Seems like it could work.

  • @harviecz
    @harviecz 6 ปีที่แล้ว

    So you need to take absolute value of the convolution result right? otherwise there would be negative pixels on edges depending if you go to lighter or darker color from left to right.

    • @harviecz
      @harviecz 6 ปีที่แล้ว

      Ah sorry, I've missed the square root operation on 4:30

  • @ehza
    @ehza 4 ปีที่แล้ว

    beautifully explained

  • @eddiej5974
    @eddiej5974 5 ปีที่แล้ว +2

    Amazing work, keep them coming! I was able to implement this from 'scratch' in Python.
    Can you do a video on the Harris Corner detection algorithm? The math is seems a lot more involved and I'm having trouble converting the math to actual code :(

  • @TylerMatthewHarris
    @TylerMatthewHarris 9 ปีที่แล้ว +2

    what's the difference between Canny edge detection and Sobel? (or rather, which is better?)

    • @martinsavc3202
      @martinsavc3202 9 ปีที่แล้ว +7

      +Tyler Harris Canny edge detection is a particular technique to turn the grayscale responses of edge detectors such as Sobel filter to a binary image that represents detected edges. The results of Canny give you 1 (or >0) values for pixels where the edge was detected with a few constraints: edges are 1 pixel wide and edges are connected (maybe some more, but i think these are the most important). Neither technique can replace the other.

    • @TylerMatthewHarris
      @TylerMatthewHarris 9 ปีที่แล้ว

      +Martin Savc awesome, that makes sense. thanks!

    • @assilksiksi
      @assilksiksi 9 ปีที่แล้ว

      +Martin Savc I've used Canny before in OpenCV but never knew the difference. Thanks.

    • @SleeveBlade
      @SleeveBlade 9 ปีที่แล้ว

      +Tyler Harris canny edge is better if you want to use a line detection algorithm on it afterwards.

    • @NNOTM
      @NNOTM 9 ปีที่แล้ว

      +Tyler Harris, you pretty much need to implement Sobel to get Canny though. Essentially, you take the output from Sobel, make every pixel that's brighter than some threshold white (and every other pixel black), and then make sure that every edge is only one pixel wide.

  • @tomas.koranda
    @tomas.koranda 4 ปีที่แล้ว +1

    is the code still accessible? The link doesnt seem to work.

  • @TacoDude314
    @TacoDude314 9 ปีที่แล้ว +1

    if you wanted edges of colors, could you convert it to HSV and do this same process on the hue values?

  • @nikhilsingh-hm6uz
    @nikhilsingh-hm6uz 4 ปีที่แล้ว

    can filtering be applied after doing sobel edge detection for removing noise . Is is compulsory to apply in the beginning?

  • @カラスKarasu
    @カラスKarasu 8 ปีที่แล้ว +3

    Can you do a video about motion blur?

  • @SwagDawg
    @SwagDawg 7 ปีที่แล้ว

    I understand everything in the video besides the orientation of the pixel. How do you add color to the image? If it is grayscale, and the inverse tangent gets you a single number, how do you know what color that number should be??

  • @nehalsonawane1042
    @nehalsonawane1042 3 ปีที่แล้ว

    small things but so brilliant!

  • @ihorprotsenko5431
    @ihorprotsenko5431 6 ปีที่แล้ว

    So cool! Thank you for your explanation

  • @weakamna
    @weakamna 5 ปีที่แล้ว +1

    It seems like the link to the code is down =/. Maybe make a git repository somewhere with all the code from the videos?

  • @jackfever405
    @jackfever405 8 ปีที่แล้ว

    To find the "Ultimate Edge" apply the Tony Robbins filter. When this filter is applied to images of people it detects those who are easily separated from their money. Sometimes this filter is also known as the "Fools" filter.

  • @aitortilla5128
    @aitortilla5128 6 ปีที่แล้ว

    Brilliant and quite useful.

  • @pushkarmahajan9294
    @pushkarmahajan9294 2 ปีที่แล้ว

    Can Sum of absolute values be used instead of Pythagoras to obtain G?

  • @davewasthere
    @davewasthere 5 ปีที่แล้ว

    Fantastic... Really loved it! And keen on the 'Why C# Rocks' rant. ;)

  • @MrGoatflakes
    @MrGoatflakes 8 ปีที่แล้ว

    0:45 what does he say? "it's an approximation to a of an image"

    • @MrGoatflakes
      @MrGoatflakes 8 ปีที่แล้ว

      nfsyh 88
      thanks. Like the divergence?

    • @shiphorns
      @shiphorns 8 ปีที่แล้ว

      Using both filters gets you the first difference in the x and y directions individually, which are the discrete equivalents of the first partial derivatives. The Sobel operator is actually doing a bit of blur-type averaging as well, since it's considering the rows above and below (or left and right) of the pixel of interest. These x and y partial differences are thus the x and y components of the a discrete equivalent of the gradient of the image.
      This isn't the divergence, but you could use it to calculate a divergence for a pixel, by essentially doing yet another kernel convolution on the matrix of the gradient values at each pixel, to sum up the gradients of surrounding pixels. The resulting image would be one where the value of each pixel would tell you how much gradients in the neighborhood of that pixel are pointing towards or away from that pixel. That would be more like a divergence.

    • @MrGoatflakes
      @MrGoatflakes 8 ปีที่แล้ว

      Adam Smith isn't the divergence just a vector of all the possible partial derivatives? Excuse my ignorance, I haven't taken multivariable calculus and every time I have tried to teach myself I have either gotten bogged down in review of single variable or not been able to follow it :P

    • @shiphorns
      @shiphorns 8 ปีที่แล้ว +1

      The gradient can be written as a vector of the x- and y-direction partial derivatives, this is probably what you're thinking of. Divergence is function of a vector field that gives you a scalar value (the magnitude of divergence at some point in the field). For a continuous function you get the divergence from integrating over an area (really just a contour integral in this 2d case) of the vector field around the point being evaluated (e.g. a spherical surface around the point), and taking the limit of this integral as the area of this surface goes to zero. This gives you a scalar value that is a measure of how much the vector field is pointing towards or away from the point. Because it doesn't make sense to speak of a limit going to zero for a discrete vector field, that's why I said you could get something that is a discrete analog to the divergence from doing a finite sum of the values of your discrete gradient over the pixels immediate surrounding the one being evaluated.

    • @MrGoatflakes
      @MrGoatflakes 8 ปีที่แล้ว

      Adam Smith thanks, I was indeed thinking of the gradient and got confused :P

  • @lucaccinnocapuccinno607
    @lucaccinnocapuccinno607 2 ปีที่แล้ว

    Can the kernel matrix have any values as long as their absoulte value it's symmetrical on both sides? For example can we have [[-2, -4, -2], [0,0,0], [2, 4,2]] instead of [[-1,-2, -1], [0,0,0], [1,2,1]] as shown in the video.

  • @sudharshanavenkataraman4438
    @sudharshanavenkataraman4438 7 ปีที่แล้ว

    I have a doubt here. Whether the gradient is found at each corresponding pixels or it is found oly at the middle pixels i.e gradient at 1,1 for 3*3 matrix. And after finding the gradient how the gradient is applied to each of the pixels. Please help me out

  • @JeffHykin
    @JeffHykin 9 ปีที่แล้ว

    is there any way to code your own kernel based filter, say using a program like gimp?

    • @ihrbekommtmeinenrichtigennamen
      @ihrbekommtmeinenrichtigennamen 9 ปีที่แล้ว

      +Jeff Hykin
      You can write your own .NET plugins for Gimp. So yes. Basically you can just take the linked code and throw it in a simple plugin.

    • @JeffHykin
      @JeffHykin 9 ปีที่แล้ว

      +Ihrbekommtmeinen Richtigennamennicht awesome! I'll look up the details, but what exactly do you mean when you say "linked code"?

    • @ihrbekommtmeinenrichtigennamen
      @ihrbekommtmeinenrichtigennamen 9 ปีที่แล้ว

      Jeff Hykin
      I meant "the code linked in the description" ;)

    • @JeffHykin
      @JeffHykin 9 ปีที่แล้ว

      Got it 👍 thanks

    • @Roxor128
      @Roxor128 9 ปีที่แล้ว

      +Jeff Hykin Yes! A lot of image editors have a functionality to let you define your own kernel-based filters. All you have to do is plug in values for a grid and a divisor.
      In my editor of choice, the 15-year-old Paint Shop Pro 7, it's under Effects -> User Defined... I imagine GIMP will have something similar under whatever menu it keeps its effects.
      Also, if you use Media Player Classic for playing video, you can write HLSL shaders for processing the video. My most-complicated ones have been a simulation of the PAL analogue TV system and a simple ray-tracer which brought my GTX680 to its knees when I tried adding adaptive anti-aliasing to it.

  • @NeilRoy
    @NeilRoy 9 ปีที่แล้ว +1

    I still prefer good old fashioned C. No bloody ++, # etc... ;)
    With that said, I would love to see a C# rant on why it is good as I have never really played with it.

  • @anhhuyham
    @anhhuyham 5 ปีที่แล้ว

    Hi, can you make a video about Harris Corner Detection?

  • @vincentlopez464
    @vincentlopez464 7 ปีที่แล้ว

    Thanks for this, big help for our thesis. You've earned a like and a sub from me.

  • @AriefWijayaisMRAW
    @AriefWijayaisMRAW 7 ปีที่แล้ว

    I found in a journal that use sobel approximation with a threshold value of 0.02 for obtain edge map. How to get that threshold ? because as I know, I only can use threshold with range 0 - 255 (based on maximum gray value) from sobel detection.

  • @lenghia7795
    @lenghia7795 7 ปีที่แล้ว

    Hey, what if I reverse the positive and negative row (column) in the filter? Because sure in practice we dont know which one is black and which one is white, right?

  • @anonanon3066
    @anonanon3066 3 ปีที่แล้ว

    Wouldn't it be sensible to say...
    edgeFac = max(sobel_R, sobel_G, sobel_B), to account for edges that are very apparent in color images, but almost invisible in grayscale?
    EDIT: I've tried this, and it looks great!

  • @Crobisaur
    @Crobisaur 9 ปีที่แล้ว +1

    I'd like to see a video about Laplacian Pyramids.

  • @SuperDayv
    @SuperDayv 7 ปีที่แล้ว

    Super helpful, thanks!

  • @brendathompson3758
    @brendathompson3758 4 ปีที่แล้ว

    Hi there -- how do we determine the threshold at which the G value is high enough to indicate the presence of an edge? Especially since the range of all pixel values can be quite large, it is possible to have an edge with a relatively low G value. But in general, how do we pick this threshold?

  • @farahaljaber2356
    @farahaljaber2356 7 ปีที่แล้ว

    Does the zero picxles represents the edge in the x and y direction ?

  • @muhammadmohsin2038
    @muhammadmohsin2038 6 ปีที่แล้ว

    after taking derivative of both x and y than how to add them or get the total in one image
    Like we have two images one derivative in x and other in y than whats the next step?

  • @Theraot
    @Theraot 9 ปีที่แล้ว

    +ComputerFile - I have just finished reading the "readme.txt" from the linked "convolution.zip" and led me tell you that "If you literally can't find a windows machine" you can have mono run the code on Linux or Mac OS X via Xamarin Studio.
    Edit: just tested it, Xamarin Studio will open it, build it and run it.
    Edit 2: I notice there is only one relevant code file and there is no UI, which is great because it means you can have Mono run it from command line.
    The more daring and tech savvy have an option if they can't install Mono: get a free account on Koding.com, they give a Virtual Machine for non commercial purposes... use it to install mono, and run it there.

    • @martinsavc3202
      @martinsavc3202 9 ปีที่แล้ว

      +Alfonso J. Ramos (theraot) UI doesn't work in Mono?

    • @Theraot
      @Theraot 9 ปีที่แล้ว

      WinForms works in Mono, also Gtk# and MonoGame / OpenTK - all those three are cross platform. And they have their own solutions for Android and IOs - but they never ported WPF - and never will.
      Note: there are also others projects for cross platform UI with Mono such as Mono Wxt and QtSharp.
      ---
      Being a single file with no UI makes it easy to compile an run from command line without any additional setup - so there is no need for Xamarin Studio / MonoDevelop.
      Edit: once you start passing multiple assemblies are references to compile the writing the command line starts to be error prone and look ugly... you could write a bash script for that... but I wont be bothered, there are tools for that!
      ---
      Edit: Long Live WinForms!

  • @manuelpena3988
    @manuelpena3988 9 ปีที่แล้ว

    I don't know anything about this, but I would like to ask, why in the last part of the video, when saying that you want to get rid of the "high frequency edges" you use first a gaussian blur and then the sobel kernel. My question is... if you want to get rid of the high frequency why don't you use a low-pass filter?
    Thanks for the videos.

    • @Spongman
      @Spongman 9 ปีที่แล้ว

      Your reasoning is correct. The gaussian blur is a low-pass filter.

  • @krishnakethan
    @krishnakethan 3 ปีที่แล้ว +1

    I hope I meet him one day and tell him how awesome he is

  • @haditamimi2891
    @haditamimi2891 3 ปีที่แล้ว

    Is there code for finding straight lines and angles using this in python?

    • @sk8erJG95
      @sk8erJG95 ปีที่แล้ว

      Opencv-python has edge detection algorithms built in

  • @matthiastuytschaever4342
    @matthiastuytschaever4342 7 ปีที่แล้ว

    So, the x-direction kernel show the vertical edges more clearily? I'm confused

  • @jayschauer1347
    @jayschauer1347 8 ปีที่แล้ว

    If you are using arctangent to determine the orientation of edges, what method is used to color them that gives a range from 0 to 2pi, instead of just -1/2pi to 1/2pi? (I saw that a full circle of colors were used).
    Edit: My best guess right now would be when passing the Gx and Gy data to the arctangent method, rather than just passing Gx/Gy, Gx and Gy are passed separately and then the method can produce full 360 degree orientations based on the signs of Gx and Gy.

  • @DrRChandra
    @DrRChandra 9 ปีที่แล้ว

    So what if you just concatenated the three color channels (probably want to throw out alpha, if there is one)? One value would always be multiplied by the same factor (64K for 8 bit samples) and another by another but still constant factor (256 in the case of 8 bit samples). I would think the results would be about as useful as scaling each. Or maybe not, because maybe the first channel gets weighted the most, and the second channel more than the third?

    • @johnpetersen5341
      @johnpetersen5341 9 ปีที่แล้ว +2

      +rchandraonline Sadly, that wouldn't work. Red, green, and blue are orthogonal to one another, like X, Y, and Z in spatial coordinates. Lightness is the radius: it's the length of the vector. We're looking for change in the length of our vector.
      Using R*65536 + G*256 + B for lightness means that a one-bit change in R is equivalent to a 65536-bit change in B. The best you could do is R+G+B, where at least they're equally weighted. This puts you in 'taxicab space' if you want to know more about it. It would report similar brightness values for mostly red, green, and blue pixels as the Pythagorean approach, but it would report yellow, teal, and magenta as extra bright, so artificial edges might appear between primary and secondary colors. In addition, edges detected in Pythagorean brightness might go unnoticed here, because of the same interference.
      If you just want to find hue edges, you can use the same algorithm on the hues in the image. There are just two caveats: one, hue is periodic, so simple subtraction won't always work; and two, hue is undefined at the poles (black and white), and has low resolution near them.

  • @eeasedev7668
    @eeasedev7668 4 ปีที่แล้ว

    The download link is broken. Could you please provide a working one?