une idée lumineuse? | |
ldci | 23-May-2012/14:42:54+2:00 |
Qui aurait l'idée pour créer en rebol l'équivalent de typedef void CvArr; The metatype CvArr* is used only as a function parameter to specify that the function accepts arrays of more than a single type, for example IplImage*, CvMat* or even CvSeq*. The particular array type is determined at runtime by analyzing the first 4 bytes of the header. IplImage* et autre sont des structures comme celle-ci IplImage: make struct! compose/deep/only [ nSize [integer!] ; sizeof(IplImage) ID [integer!] ; version (=0) nChannels [integer!] ; Most of OpenCV functions support 1,2,3 or 4 channels alphaChannel [integer!] ; Ignored by OpenCV */ depth [integer!] ; Pixel depth in bits: colorModel [string!] ;Ignored by OpenCV channelSeq [string!] ;ditto * dataOrder [integer!] ;0 - interleaved color channels, 1 - separate color channels. origin [integer!] ;0 - top-left origin, 1 - bottom-left origin (Windows bitmaps style). align [integer!] ;Alignment of image rows (4 or 8).OpenCV ignores it and uses widthStep instead. width [integer!] ;Image width in pixels height [integer!] ;Image height in pixels. ` *roi [struct! [(first iplRoi)]] ;Image ROI. If NULL, the whole image is selected *maskROI [string!] ;Must be NULL. *imageId [string!] ;" " *tileInfo [string!] ;" " imageSize [integer!] ; Image data size in bytes *imageData [integer!] ; Pointer to aligned image data. widthStep [integer!] ; Size of aligned image row in bytes. BorderMode [integer!] ; Ignored by OpenCV. BorderConst [integer!] ; Ditto. *imageDataOrigin [char!] ;Pointer to very origin of image data ] none Marche trés bien : on peut créer une image , exemple: img: cvCreateImage 640 480 IPL_DEPTH_8U 3 mais c'est l'appel vShowImage "Main" img qui plante le système en c void cvShowImage ( const char* name, const CvArr* image ) ca marche sans pb Merci aux gourous du rebol et C @ + | |
ldci | 23-May-2012/19:56:50+2:00 |
TROUVE : un simple integer considéré comme un pointeur ! CQFD @+ | |
Login required to Post. |