Ask Your Question

simbaforrest's profile - activity

2019-10-24 00:33:28 -0600 received badge  Student (source)
2016-10-07 15:45:04 -0600 commented question Different results between imread as grayscale and cvtColor

Thanks for the comment. I understand that. But I thought that cv2.imread(...,0) is loading it to color and then convert to gray. But the results are different. So This doesn't seem to be related to jpeg...

2016-09-30 19:39:04 -0600 asked a question Different results between imread as grayscale and cvtColor

Did anyone notice that if you load a color image directly as gray scale, the resulting image is slightly different than loading it to a color image and then cvtColor to grayscale? Anyone know why?

img1=cv2.imread("imge.jpg", 0)
img2=cv2.imread("imge.jpg", 1)
img2=cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY)
print np.max(img1!=img2)
# True
print np.max(img1.astype('float32')-img2.astype('float32'))
# 2.0

BTW, this happens under both Linux and Windows (either c++ or python).

2013-01-17 16:25:10 -0600 commented question Webcam Select Timeout error on Linux

I met with similar problem under ubuntu 12.04+opencv 2.4.3. After sucessfully compiling opencv, I tried "./video_homography 0" with my webcam and the video frame did not show after a few seconds and the program runs very slowly and after a while it will freeze. I have no idea why.