블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

2010. 5. 30. 01:59

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2010. 4. 2. 19:39 Computer Vision
IPLimage 이미지 행렬의 색상값 읽기

/* get reference to pixel at (col,row),
   for multi-channel images (col) should be multiplied by number of channels */
#define CV_IMAGE_ELEM( image, elemtype, row, col )       \
    (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])

'Computer Vision' 카테고리의 다른 글

Image Filtering  (0) 2010.04.03
OpenCV: cvSobel() 연습 코드  (3) 2010.04.03
OpenCV: cvFindContours  (0) 2010.04.02
Harris corner detector  (0) 2010.03.31
OpenCV: cvCanny() 연습 코드  (0) 2010.03.31
posted by maetel
2010. 3. 13. 01:16 Computer Vision


// Test: video capturing from a camera

#include <OpenCV/OpenCV.h> // matrix operations

int main()
{
    IplImage* image = 0;
    // initialize capture from a camera
    CvCapture* capture = cvCaptureFromCAM(0); // capture from video device #0
    cvNamedWindow("camera");
   
    while(1) {
        if ( !cvGrabFrame(capture) ){
            printf("Could not grab a frame\n\7");
            exit(0);
        }
        else {
        cvGrabFrame( capture ); // capture a frame
        image = cvRetrieveFrame(capture); // retrieve the caputred frame
       
        cvShowImage( "camera", image );
       
        if( cvWaitKey(10) >= 0 )
            break;
        }
    }
   
    cvReleaseCapture( &capture ); // release the capture source
    cvDestroyWindow( "camera" );

    return 0;
}


posted by maetel