Created
April 12, 2016 12:27
-
-
Save agneym/1ce047872de1da503bd6d5e3077d3bdf to your computer and use it in GitHub Desktop.
To represent opencv image as normalised float
This file contains 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
import cv2 | |
import numpy as np | |
from skimage import img_as_float | |
#Read image from given direcotory | |
image = cv2.imread('C:\Python27\images\pic.jpg') | |
#Print pixel at (100,100) | |
print image[100,100] | |
#................ image converted to float............. | |
float_var = img_as_float(image) | |
#Print floating point image coordinates | |
print float_var[100,100] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment