Click here to Skip to main content
15,913,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaltemplate magic - generic callbacks + return values Pin
peterchen30-Jan-04 0:16
peterchen30-Jan-04 0:16 
GeneralRe: template magic - generic callbacks + return values Pin
Ryan Binns30-Jan-04 2:23
Ryan Binns30-Jan-04 2:23 
GeneralRe: template magic - generic callbacks + return values Pin
peterchen30-Jan-04 3:00
peterchen30-Jan-04 3:00 
GeneralCommunicating with Proxy Pin
sinuommen29-Jan-04 22:32
sinuommen29-Jan-04 22:32 
GeneralRe: Communicating with Proxy Pin
Prakash Nadar29-Jan-04 23:11
Prakash Nadar29-Jan-04 23:11 
Generala RSS reader Pin
Jerome Conus29-Jan-04 20:46
Jerome Conus29-Jan-04 20:46 
GeneralRe: a RSS reader Pin
Taka Muraoka29-Jan-04 21:43
Taka Muraoka29-Jan-04 21:43 
QuestionURGENT : Black Image??? Pin
chio110229-Jan-04 20:16
chio110229-Jan-04 20:16 
I am trying to interface my C code converted from Matlab with OpenCV.
I tried to get OpenCV to display the image I got from the Matlab
converted C code, but I got a BLACK IMAGE.

- FG is of mxArray * type.
- Using mxGetPr(FG) is supposed to return me the pointer to first
element of FG.
- Then I tried to capture the data in FG in char_ptr.
- And pass in the data in char_ptr into oImage->imageData.
- But all I get is a black image.
- Below is my program:

Can anyone please tell me what is wrong? Sigh | :sigh:

/*assigning the ouput from Matlab converted code to FG*/
mlfAssign(&FG, mlfIndexRef(mclVv(class0, "class"), ".FG"));
int m = mxGetM( FG );
int n = mxGetN( FG );
double * double_ptr = 0;
char char_ptr[240][320];
int i, j, count = 0;

double_ptr = mxGetPr( FG );
for(j=0;j<n;j++){
for(i=0;i<m;i++){
char_ptr[i][j]=(char)(*(double_ptr+count));
}
count++;
}
oimage =="" cvcreateimage(="" cvsize(n,="" m="" ),="" ipl_depth_8u,="" 1="" );
oimage-="">imageData = *char_ptr;
cvSaveImage("outputFG.jpg", oImage);

Please help...




pistachio
Generali want to get the handle of Dialog , that i created after clicking on a button Pin
Anonymous29-Jan-04 20:10
Anonymous29-Jan-04 20:10 
GeneralRe: i want to get the handle of Dialog , that i created after clicking on a button Pin
SJolly29-Jan-04 22:03
SJolly29-Jan-04 22:03 
GeneralRe: i want to get the handle of Dialog , that i created after clicking on a button Pin
John M. Drescher30-Jan-04 4:51
John M. Drescher30-Jan-04 4:51 
GeneraliCON OVERLAY Pin
mjvalan29-Jan-04 19:44
mjvalan29-Jan-04 19:44 
Generalweb browser plugins Pin
Abhi Lahare29-Jan-04 19:29
Abhi Lahare29-Jan-04 19:29 
GeneralRe: web browser plugins Pin
Prakash Nadar29-Jan-04 22:22
Prakash Nadar29-Jan-04 22:22 
GeneralRe: IE web browser plugins Pin
Abhi Lahare29-Jan-04 22:44
Abhi Lahare29-Jan-04 22:44 
GeneralRe: IE web browser plugins Pin
Prakash Nadar29-Jan-04 23:09
Prakash Nadar29-Jan-04 23:09 
Questionhow to convert text into image using VC++6.0 Pin
emmatty29-Jan-04 18:39
emmatty29-Jan-04 18:39 
AnswerRe: how to convert text into image using VC++6.0 Pin
basementman30-Jan-04 10:04
basementman30-Jan-04 10:04 
GeneralFill Color in a static control at runtime Pin
swarnamanoo29-Jan-04 18:15
swarnamanoo29-Jan-04 18:15 
GeneralRe: Fill Color in a static control at runtime Pin
amit sebiz29-Jan-04 19:28
amit sebiz29-Jan-04 19:28 
Questionhow to disable Shift key Pin
wow999929-Jan-04 18:14
wow999929-Jan-04 18:14 
AnswerRe: how to disable Shift key Pin
Anonymous30-Jan-04 2:52
Anonymous30-Jan-04 2:52 
QuestionAbout the WM_ENABLE? Pin
zhaopzhi29-Jan-04 18:13
zhaopzhi29-Jan-04 18:13 
AnswerRe: About the WM_ENABLE? Pin
Weiye Chen29-Jan-04 20:26
Weiye Chen29-Jan-04 20:26 
GeneralNeed a SDK Cool Button Pin
Cael29-Jan-04 18:08
Cael29-Jan-04 18:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.