C4W1L02 Edge Detection Examples
HTML-код
- Опубликовано: 21 авг 2024
- Take the Deep Learning Specialization: bit.ly/2IpF5Dk
Check out all our courses: www.deeplearni...
Subscribe to The Batch, our weekly newsletter: www.deeplearni...
Follow us:
Twitter: / deeplearningai_
Facebook: / deeplearninghq
Linkedin: / deeplearningai
Finally,a deep-learning session with no coding!
Thank you, as usual clear and very easy to understand and very informative!
edge detection was a subject that we studied multiple times during my years in college and never understood what it is about, i now fully understand in just few minutes... many thanks
5 years later and this video is super helpful. Thank you.
Now I get why Andrew Ng is such a great teacher!
THANK YOU SO MUCH!!!! You are a lifesaver... exam in 1.5 hr time
Did you make it?
Thank you for the amazing tutorial. You made it really simple.
I have few questions:
1- Based on what you decide the size of the filter(Kernels)?
2- Based of what you decide the matrix indices for the filter.
4- How did you find out the output matrix(image) size is 4x4 before the calculation?
5 - What if the size of the matrix(image) is 2x2 OR 5x5, How can we use the filter?
Thank you,
Your questions show that you are a good thinker ;) :
1- There is no basics in my humble experience but we usually use (3,3) because actually you can use the filter multiple times..
2-As you said , it is a filter , the goal is to detect vertical edges , horizental edges ect and the indices (=pixels) are specific for each task
4-As you see in his calculation , he's shifting by one each time he finished a calculation (it's the default step but you can change it which is called "stride") and you'll notice that we made all the calculations horizentally and vertically only 4 steps each (but if you know how directly notice the output matrix , there is a formula : dim(output) = [dim(input) - dim(filter)] + 1 = 6-3+1 = 4
5-if the size of the matrix is 2X2 or 5X5 , we use padding , you add columns and you fill them by zeros.I have a doubt for 2X2 but I'm quite sure that it is not interesting to have a size of a filter which is greater than the size of the matrix.
Hope it helps...
@@ihebbibani7122
Thank you for your reply.
Man😑 i just saw my typo. Sorry
haha after the first 6 seconds i recogniced the voice from the stanford ML coursera course and immideatly subcribed :)
This is just the best explanation for Prewitt operator, big THANKS
This becomes convolution because filter is symmetric, techncally speaking the way it is explained here it is actually describing cross correlation
Big lecture!
Thank you so much Professor Andrew NG
Wonderful & highly informative session ! 🙏
Nice lecture, thanks! saved my life!
Prof.Andrew Ng is great.
Thanks a lot!!
I was recognizing the voice but at the end... AHA! the Stanford guy! 😃
yeap, he is really good
Thank you, your explanation is very clear and useful.
Very informatively explained! Thank you
Andrew
Excellent explanation. Thank you so much!
4:14 Dot product of the 2 (3x3) matrices / vectors (unlisted matrices)
can you provide more explaintion for this unlisted matrices kinda thing
Andrew saves the day...again!
Very straightforward video.. thank you!
That's what I need. Thank you so much
great explanation
nice explanation
Thank you! This really helped!
east and west Andrew is the best
Excellent
This is very good stuff
God bless Andrew! the best, always!
If you want to understand the application of this powerful edge detection techniques , you can refer this video--
ruclips.net/video/cToG83MLkqw/видео.html
Happy Learning 😊✌🏻
Thanks🌷
--------------Question---------------->>>> Does the sum of each number in the filter needs to be 0?
An edge kernel is a highpass filter. Low frequencies shall be supressed, high frequencies shall pass such a filter. Edges are parts of an image with a high change of signal (gray value) and so high frequencies.
If you design such a filter in frequency domain, it will have zeros at low frequencies and bigger values at higher frequencies. When transforming this into spatial domain (to get a kernel like you described), this will always result in a kernel, where the sum is zero.
This guy andrew is greatn
why are we not rotating the filter by 180 degrees? for convolution, it is the first step.
This is awesome
similar to run-length encoding.
How can we divide the image into 6*6 matrix
He can do AI by pen and paper. Who need GPU
hahahah agree!
This is basic image processing.
IMHO nothing to do with AI.
I'm always confused that this operation is actually " Correlation", why we name it "Convolution"?
because we convolve kernels here with input.
@@nustiann999 convolution is turning the kernel upside down?
I think he forgot to turn the kernel
Yes it's very annoying. In the context of convolutional neural networks the term convolution is used for what is known as correlation in signal processing.
here is the answer: ruclips.net/video/tQYZaDn_kSg/видео.html
How do you guys code to find vertical and horizontal edges of an image. Any resources you would like to share
감사합니다 :)
can the filter [[-1,0,1],[-1,0,1],[-1,0,1]] be the vertical edge detector instead of [[1,0,-1],[1,0,-1],[1,0,-1]] (as shown in the intuition) ?
yes, as I understood it it would be fine either way.
Do I have to take your courses in a strict order? I don't have much time and I want to focus only on CNN.
Thanksssssss
Why we use filters? or why we need filters?
filters are used to reduce noise in images
I think you are wrong about conv in 7:47, isn't this supposed to be correlation or correlate2d, your signs are all flipped?
it is a good video,, ;)
How to select the filter matrix value? in our case [1,0,-1 1,0,-1 1,0,-1]
image = cv2.imread('clock.jpg', cv2.IMREAD_GRAYSCALE).astype(float) / 255.0
kernel = np.array([[1, 0, -1],
[1, 0, -1],
[1, 0, -1]])
filtered = cv2.filter2D(src=image, kernel=kernel, ddepth=-1)
cv2.imshow('horizontal edges', filtered)
3:22 Why don't the filter matrix be flipped before calculate?
why even being it's a square matrix
BEST
Would you still use a 3x3 filter when you work with higher resolution images like 1000x1000 or maybe a 1920x1080 px image. wouldn't that increase the computational time? If not what filter would be best for edge detection?
maybe resizing ur images to a smaller size avoiding using bigger filters that would add more computational power
@Nathan Nunes Most image processing software like openCV and matlab use fast Fourier transform (fft) for convolution and related operations, which produces results with an error in the range of 10^(-14), when compared to actual convolution, which can be counted as infinitesimally small.
Or if they HAVE TO use actual convolution they use multiple cores (parallel computations) of your computer to produce the output, which is still significantly slower than using fft.
I don't think what @@kerolosemad8326 suggests is correct, as resizing will induce loss of detail.
wp man, thanks
can someone please explain this to me, i cant find it anywhere. does the person create the filter? or does the network do it. As in is the filter acting like a neuron, where it gets updated in back propogation? WHere is this filter coming from?
First we have to assume one filter based on our requirement and we can tune the filter parameter while fine tuning the model..
sir why is the sum of filters always zero?????????
How 4x4??
because the size of the kernel, the image result is smaller, if the kernel applied over the edge of the image, the kernel would be out the image, so in order to apply the kernel on the image, you have to apply it from the second element in the row and the column, then, the final image will be smaller in one row and one column (if the kernel is 3x3) if the kernel is nxn, the final image will be
(n-1)/2 x (n-1)/2 smaller than the original image
gokil
bhagwaan