Subversion Repositories seema-scanner

Rev

Rev 114 | Rev 121 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 114 Rev 120
Line 84... Line 84...
84
//        PrintError(error);
84
//        PrintError(error);
85
 
85
 
86
    // Configure Format7 mode
86
    // Configure Format7 mode
87
    FlyCapture2::Format7ImageSettings format7Settings;
87
    FlyCapture2::Format7ImageSettings format7Settings;
88
    format7Settings.mode = FlyCapture2::MODE_0;
88
    format7Settings.mode = FlyCapture2::MODE_0;
89
    format7Settings.pixelFormat = FlyCapture2::PIXEL_FORMAT_RAW8;
89
    format7Settings.pixelFormat = FlyCapture2::PIXEL_FORMAT_RAW16;
90
    format7Settings.width = 3376;
90
    format7Settings.width = 3376;
91
    format7Settings.height = 2704;
91
    format7Settings.height = 2704;
92
    format7Settings.offsetX = 0;
92
    format7Settings.offsetX = 0;
93
    format7Settings.offsetY = 0;
93
    format7Settings.offsetY = 0;
94
 
94
 
Line 138... Line 138...
138
    property.absValue = 1.0;
138
    property.absValue = 1.0;
139
    error = cam.SetProperty(&property);
139
    error = cam.SetProperty(&property);
140
    if (error != FlyCapture2::PGRERROR_OK)
140
    if (error != FlyCapture2::PGRERROR_OK)
141
        PrintError(error);
141
        PrintError(error);
142
 
142
 
143
    // Set frame rate to 6 to be in sync with the projector's 60Hz refresh
143
    // Set frame rate to 6
144
    property.type = FlyCapture2::FRAME_RATE;
144
    property.type = FlyCapture2::FRAME_RATE;
145
    property.onOff = true;
145
    property.onOff = true;
146
    property.absControl = true;
146
    property.absControl = true;
147
    property.autoManualMode = false;
147
    property.autoManualMode = false;
148
    property.absValue = 6.0;
148
    property.absValue = 6.0;
149
    error = cam.SetProperty(&property);
149
    error = cam.SetProperty(&property);
150
    if (error != FlyCapture2::PGRERROR_OK)
150
    if (error != FlyCapture2::PGRERROR_OK)
151
        PrintError(error);
151
        PrintError(error);
152
 
152
 
153
    // Set white balance to match LED projector
153
    // Set white balance to match LED projector light
154
    property.type = FlyCapture2::WHITE_BALANCE;
154
    property.type = FlyCapture2::WHITE_BALANCE;
155
    property.onOff = false;
155
    property.onOff = true;
156
    property.absControl = false;
156
    property.absControl = false;
157
    property.autoManualMode = false;
157
    property.autoManualMode = false;
158
    property.valueA = 666; //red
158
    property.valueA = 666; //red
159
    property.valueB = 777; //blue
159
    property.valueB = 777; //blue
160
    error = cam.SetProperty(&property);
160
    error = cam.SetProperty(&property);
Line 299... Line 299...
299
    CameraFrame frame;
299
    CameraFrame frame;
300
 
300
 
301
    frame.timeStamp = rawImage.GetTimeStamp().cycleCount;
301
    frame.timeStamp = rawImage.GetTimeStamp().cycleCount;
302
    frame.height = rawImage.GetRows();
302
    frame.height = rawImage.GetRows();
303
    frame.width = rawImage.GetCols();
303
    frame.width = rawImage.GetCols();
304
    frame.bitDepth = 8;
304
    frame.bitDepth = 16;
305
    frame.channels = 1;
305
    frame.channels = 1;
306
    frame.memory = (unsigned short*)rawImage.GetData();
306
    frame.memory = rawImage.GetData();
307
 
307
 
308
    return frame;
308
    return frame;
309
}
309
}
310
 
310
 
311
 
311
 
312
size_t CameraPointGrey::getFrameSizeBytes(){
312
size_t CameraPointGrey::getFrameSizeBytes(){
313
    
313
    
314
    FlyCapture2::Format7ImageSettings format7Settings;
314
    FlyCapture2::Format7ImageSettings format7Settings;
315
    cam.GetFormat7Configuration(&format7Settings, NULL, NULL);
315
    cam.GetFormat7Configuration(&format7Settings, NULL, NULL);
316
 
316
 
317
    return format7Settings.height*format7Settings.width*3;
317
    return format7Settings.height*format7Settings.width*3*2;
318
}
318
}
319
 
319
 
320
size_t CameraPointGrey::getFrameWidth(){
320
size_t CameraPointGrey::getFrameWidth(){
321
 
321
 
322
    FlyCapture2::Format7ImageSettings format7Settings;
322
    FlyCapture2::Format7ImageSettings format7Settings;