Subversion Repositories seema-scanner

Rev

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

Rev 74 Rev 110
Line 96... Line 96...
96
    FlyCapture2::Format7PacketInfo packetInfo;
96
    FlyCapture2::Format7PacketInfo packetInfo;
97
    bool valid;
97
    bool valid;
98
    error = cam.ValidateFormat7Settings(&format7Settings, &valid, &packetInfo);
98
    error = cam.ValidateFormat7Settings(&format7Settings, &valid, &packetInfo);
99
    if (error != FlyCapture2::PGRERROR_OK)
99
    if (error != FlyCapture2::PGRERROR_OK)
100
        PrintError(error);
100
        PrintError(error);
101
    // packetsize indirectly configures frame rate
101
    // packetsize configures maximum frame rate
102
    error = cam.SetFormat7Configuration(&format7Settings, packetInfo.recommendedBytesPerPacket);
102
    error = cam.SetFormat7Configuration(&format7Settings, packetInfo.recommendedBytesPerPacket);
103
    if (error != FlyCapture2::PGRERROR_OK)
103
    if (error != FlyCapture2::PGRERROR_OK)
104
        PrintError(error);
104
        PrintError(error);
105
 
105
 
106
    // Configure general
106
    // Configure general
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
-
 
144
    property.type = FlyCapture2::FRAME_RATE;
-
 
145
    property.onOff = true;
-
 
146
    property.absControl = true;
-
 
147
    property.autoManualMode = false;
-
 
148
    property.absValue = 6.0;
-
 
149
    error = cam.SetProperty(&property);
-
 
150
    if (error != FlyCapture2::PGRERROR_OK)
-
 
151
        PrintError(error);
-
 
152
 
143
    // Set white balance appropriate for LED projector
153
    // Set white balance to match LED projector
144
    property.type = FlyCapture2::WHITE_BALANCE;
154
    property.type = FlyCapture2::WHITE_BALANCE;
145
    property.onOff = true;
155
    property.onOff = true;
146
    property.absControl = false;
156
    property.absControl = false;
147
    property.autoManualMode = false;
157
    property.autoManualMode = false;
148
    property.valueA = 666; //red
158
    property.valueA = 666; //red