Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

May I ask why I get the wrong answer about rgb2luv

$
0
0
I use python. Today I try to convert an image(rgb) to luv. The [Doc](http://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#cvtcolor) However , I am confused with the result.So I have a trial. import cv2 import numpy as np im=np.array([[[0.78039217, 0.73333335, 0.73333335]]],dtype=float32) im_xyz=cv2.cvtColor(im,cv2.COLOR_RGB2XYZ) #the result is array([[[ 0.71641064, 0.74334133, 0.79932952]]], dtype=float32) im_luv=cv2.cvtColor(im,cv2.COLOR_RGB2LUV)#array([[[ 76.84296417, 6.9851861 , 1.50677502]]], dtype=float32) However,I use the matlab to rgb2luv,the result is 89.0798 , 3.5388 , 0.7616. So I try the xyz to luv, the value of L is also is 89.08016438386028. Why the result of the function cvtColor(im,cv2.COLOR_RGB2LUV) is not 89? 3Qs a lot.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>