Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %this is the image
- %[0 0 0 0 0 0;
- % 0 0 0 0 0 0;
- % 0 0 0 1 0 0;
- % 0 0 0 0 0 0;
- % 0 0 0 0 0 0];
- % FilterCoefficientes [0 1 0] is to not smooth the image
- % next is the answer from MATLAB
- M = cornermetric([0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 1 0 0;0 0 0 0 0 0;0 0
- 0 0 0 0], "FilterCoefficients", [0 1 0])
- M =
- 0 0 0 -0.0400 0 0
- 0 0 0 -0.0400 0 0
- 0 0 -0.0400 0 -0.0400 -0.0400
- 0 0 0 -0.0400 0 0
- 0 0 0 -0.0400 0 0
- % The calculation to go from 1 to -0.04 is:
- %SensitivityFactor = 0.04 (optional parameter to the function)
- %A = horizontal_border; % in the original paper the filter is [-1 0 1], maybe this filter is used twice in the image somehow. Any idea how to pass twice the filter?
- %B = vertical_border;
- %C = diagonal_border;
- %Result = A.*B - C.*C - SensitivityFactor*(A + B);
- % A.*B - C.*C is equal to 0, then
- % - SensitivityFactor*(A + B) == -0.04
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement