Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Does clahe work on 16uc1 image?I tried myself but got unexpected result.Plz suggest me the way that we can use the Clahe on 16bit(3channel/1channel) image..Thanx

$
0
0
I used mat in opencv cpp code to load images Here is my code: cv::Mat srcImage_3channels = cv::imread(InputPath, CV_LOAD_IMAGE_UNCHANGED); cv::Mat srcImage = cv::Mat::zeros(srcImage_3channels.rows, srcImage_3channels.cols, CV_16UC1); UINT16* src_3 = (UINT16*)srcImage_3channels.data; UINT16* src = (UINT16*)srcImage.data; int B = 0; for (int j = 0; j < srcImage_3channels.rows; j++) { for (int i = 0; i < srcImage_3channels.cols; i ++) { B = src_3[i*3 + j*srcImage_3channels.cols * 3]; src[(i)+j*srcImage.cols] = (UINT16)B;//getting single channel from 3 channel image } } test::cvClahe(srcImage, srcImage, clipLimit); cv::imwrite(OutputPath, srcImage);

Viewing all articles
Browse latest Browse all 19555

Trending Articles



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