|
Simple Question: Converting image from 8 bit to 32 bit: msg#00677lib.opencv
How to convert a single channel image of 8 bits to 32 bits? I have one single channel 8 bit image like this: IplImage *uImg = cvCreateImage( cvSize( 300, 300 ), IPL_DEPTH_8U, 1 ); and One single channel 32 Bit floating point image like this: IplImage *fImg = cvCreateImage( cvSize( 300, 300 ), IPL_DEPTH_32F, 1 ); Now, how to convert that 8 bit uImg to 32 bit fImg? Please help me with this one. I am stuck for 5 days! I tried pixel by pixel copy like this: --------------------------------------------------------------------- for (int i = 0; i < mean->width; i++ ){ for (int j = 0; j < mean->height; j++ ) { CV_IMAGE_ELEM(fImg, float, j, i) = CV_IMAGE_ELEM(uImg, uchar, j, i) = } } --------------------------------------------------------------------- But the output is only a blank image. I also tried widthStep instead of width, but the same result. Please someone help me!!!! Thank You very much, Paramesh. Change settings: http://www.yahoogroups.com/mygroups, select Get Emails (get all posts) Daily Digest (one summary email per day) Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe@xxxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Camera Calibration: 00677, badmotorfinger |
|---|---|
| Next by Date: | facedetect.c: 00677, simona fabbro |
| Previous by Thread: | Camera Calibrationi: 00677, badmotorfinger |
| Next by Thread: | How to produce my Haar file ?: 00677, Tao Tao |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |