Last active
June 24, 2020 22:09
-
-
Save netskink/6684c23babb1f91d3c7c5cb3732411bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sobel_vertical = nd.array(( | |
(1,0,-1), | |
(2,0,-2), | |
(1,0,-1) | |
)) | |
print("\nSobel vertical transform Gx", end='') | |
print(sobel_vertical) | |
rotation_90_x = nd.array(( | |
( 1, 0, 0), | |
( 0, 0, -1), | |
( 0, 1, 0) | |
)) | |
rotation_90_y = nd.array(( | |
( 0, 0, 1), | |
( 0, 1, 0), | |
( -1, 0, 0) | |
)) | |
rotation_90_z = nd.array(( | |
( 0, -1, 0), | |
( 1, 0, 0), | |
( 0, 0, 1) | |
)) | |
#rotation = rotation_90_try2 | |
#print("\nChose rotation matrix", end='') | |
#print(rotation) | |
#k = rotation_90_x * sobel_vertical | |
#k = nd.dot(rotation_90_x, sobel_vertical) | |
#k = rotation_90_x * sobel_vertical.T | |
#k = nd.dot(rotation_90_x, sobel_vertical.T) | |
#k = rotation_90_y * sobel_vertical | |
#k = nd.dot(rotation_90_y, sobel_vertical) | |
#k = rotation_90_y * sobel_vertical.T | |
# this one came close | |
#k = nd.dot(rotation_90_y, sobel_vertical.T) | |
k = rotation_90_z * sobel_vertical | |
#k = nd.dot(rotation_90_z, sobel_vertical) | |
#k = rotation_90_z * sobel_vertical.T | |
#k = nd.dot(rotation_90_z, sobel_vertical.T) | |
print("\nKernel to apply", end='') | |
print(k) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment