So I'm working with uncompressed images in C++...
Can anyone write a piece of pseudo code to demonstrate how a horizontal Sobel filter or vertical sobel filter is supposed to work?
Let me give it a try for a horizontal Sobel filter:
//for each row in the image:
//for each column in the image:
//for each channel in a pixel:
//use the
+1 +2 + 1
+0 +0 +0
-1 -2 -1 operator
//and store the result in a new image using +=
//close all for-statements
Ofcourse this doesn't give me the desired result ;_;
I obviously already tried searching for it on the internet but the only results I get are Sobel filters using both the horizontal AND vertical line detection.
Name:
Anonymous2009-05-25 12:05
pic = import_picture(argc);
filtered = sobel(pic, "horizontal");
Vertical is left as an exercise to the reader.