19 #define NOT_PRESENT -1
24 case YARP_FEATURE_BRIGHTNESS:
return FlyCapture2::BRIGHTNESS;
25 case YARP_FEATURE_EXPOSURE:
return FlyCapture2::AUTO_EXPOSURE;
26 case YARP_FEATURE_SHARPNESS:
return FlyCapture2::SHARPNESS;
27 case YARP_FEATURE_WHITE_BALANCE:
return FlyCapture2::WHITE_BALANCE;
28 case YARP_FEATURE_HUE:
return FlyCapture2::HUE;
29 case YARP_FEATURE_SATURATION:
return FlyCapture2::SATURATION;
30 case YARP_FEATURE_GAMMA:
return FlyCapture2::GAMMA;
31 case YARP_FEATURE_SHUTTER:
return FlyCapture2::SHUTTER;
32 case YARP_FEATURE_GAIN:
return FlyCapture2::GAIN;
33 case YARP_FEATURE_IRIS:
return FlyCapture2::IRIS;
34 case YARP_FEATURE_FOCUS:
return FlyCapture2::FOCUS;
35 case YARP_FEATURE_TEMPERATURE:
return FlyCapture2::TEMPERATURE;
36 case YARP_FEATURE_TRIGGER:
return FlyCapture2::TRIGGER_MODE;
37 case YARP_FEATURE_TRIGGER_DELAY:
return FlyCapture2::TRIGGER_DELAY;
38 case YARP_FEATURE_FRAME_RATE:
return FlyCapture2::FRAME_RATE;
39 case YARP_FEATURE_ZOOM:
return FlyCapture2::ZOOM;
40 case YARP_FEATURE_PAN:
return FlyCapture2::PAN;
41 case YARP_FEATURE_TILT:
return FlyCapture2::TILT;
53 case FlyCapture2::MODE_0:
56 case FlyCapture2::PIXEL_FORMAT_MONO8:
return 31;
57 case FlyCapture2::PIXEL_FORMAT_RAW8:
return 31;
58 case FlyCapture2::PIXEL_FORMAT_411YUV8:
return 26;
60 case FlyCapture2::PIXEL_FORMAT_MONO16:
return 15;
61 case FlyCapture2::PIXEL_FORMAT_RAW16:
return 15;
62 case FlyCapture2::PIXEL_FORMAT_422YUV8:
return 15;
64 case FlyCapture2::PIXEL_FORMAT_444YUV8:
return 11;
65 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 11;
68 case FlyCapture2::MODE_1:
71 case FlyCapture2::PIXEL_FORMAT_MONO8:
return 54;
72 case FlyCapture2::PIXEL_FORMAT_MONO16:
return 54;
74 case FlyCapture2::PIXEL_FORMAT_411YUV8:
return 31;
75 case FlyCapture2::PIXEL_FORMAT_422YUV8:
return 31;
76 case FlyCapture2::PIXEL_FORMAT_444YUV8:
return 31;
77 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 31;
80 case FlyCapture2::MODE_2:
83 case FlyCapture2::PIXEL_FORMAT_MONO8:
return 31;
84 case FlyCapture2::PIXEL_FORMAT_MONO16:
return 26;
85 case FlyCapture2::PIXEL_FORMAT_411YUV8:
return 31;
86 case FlyCapture2::PIXEL_FORMAT_422YUV8:
return 26;
87 case FlyCapture2::PIXEL_FORMAT_444YUV8:
return 17;
88 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 17;
97 case FlyCapture2::MODE_0:
100 case FlyCapture2::PIXEL_FORMAT_MONO8:
101 case FlyCapture2::PIXEL_FORMAT_RAW8:
102 case FlyCapture2::PIXEL_FORMAT_411YUV8:
return 59;
104 case FlyCapture2::PIXEL_FORMAT_MONO16:
105 case FlyCapture2::PIXEL_FORMAT_RAW16:
106 case FlyCapture2::PIXEL_FORMAT_422YUV8:
return 47;
108 case FlyCapture2::PIXEL_FORMAT_444YUV8:
109 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 31;
112 case FlyCapture2::MODE_1:
115 case FlyCapture2::PIXEL_FORMAT_MONO8:
116 case FlyCapture2::PIXEL_FORMAT_MONO16:
return 100;
118 case FlyCapture2::PIXEL_FORMAT_411YUV8:
119 case FlyCapture2::PIXEL_FORMAT_422YUV8:
120 case FlyCapture2::PIXEL_FORMAT_444YUV8:
121 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 59;
124 case FlyCapture2::MODE_2:
127 case FlyCapture2::PIXEL_FORMAT_MONO8:
128 case FlyCapture2::PIXEL_FORMAT_MONO16:
129 case FlyCapture2::PIXEL_FORMAT_411YUV8:
130 case FlyCapture2::PIXEL_FORMAT_422YUV8:
131 case FlyCapture2::PIXEL_FORMAT_444YUV8:
132 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 59;
145 case FlyCapture2::PIXEL_FORMAT_MONO8:
return 1.0;
146 case FlyCapture2::PIXEL_FORMAT_MONO16:
return 2.0;
147 case FlyCapture2::PIXEL_FORMAT_411YUV8:
return 1.5;
148 case FlyCapture2::PIXEL_FORMAT_422YUV8:
return 2.0;
149 case FlyCapture2::PIXEL_FORMAT_444YUV8:
return 3.0;
150 case FlyCapture2::PIXEL_FORMAT_RGB8:
return 3.0;
151 case FlyCapture2::PIXEL_FORMAT_RAW8:
return 1.0;
152 case FlyCapture2::PIXEL_FORMAT_RAW16:
return 2.0;
160 if (dVal<0.0) dVal=0.0;
161 if (dVal>1.0) dVal=1.0;
163 unsigned int iVal=
m_iMin[feature]+(
unsigned int)(dVal*
double(
m_iMax[feature]-
m_iMin[feature]));
175 if (dVal<0.0)
return 0.0;
176 if (dVal>1.0)
return 1.0;
183 int size_x=
checkInt(config,
"width");
184 int size_y=
checkInt(config,
"height");
187 int format=
checkInt(config,
"video_type");
188 unsigned int idCamera=0;
204 yError(
"failed to open Firewire Bus Manager\n");
213 yError(
"no active cameras\n");
217 FlyCapture2::PGRGuid Guid;
232 if (config.check(
"d"))
239 yError(
"invalid camera number\n");
248 if (!(
m_pCamera=
new FlyCapture2::Camera()))
250 yError(
"failed to create camera\n");
260 yInfo(
"GUID = %x%x",Guid.value[0],Guid.value[1]);
261 yInfo(
"%x%x\n",Guid.value[2],Guid.value[3]);
267 case FlyCapture2::BUSSPEED_S100:
m_BusSpeedBS= 10000000;
break;
268 case FlyCapture2::BUSSPEED_S200:
m_BusSpeedBS= 20000000;
break;
269 case FlyCapture2::BUSSPEED_S400:
m_BusSpeedBS= 40000000;
break;
270 case FlyCapture2::BUSSPEED_S480:
m_BusSpeedBS= 48000000;
break;
271 case FlyCapture2::BUSSPEED_S800:
m_BusSpeedBS= 80000000;
break;
272 case FlyCapture2::BUSSPEED_S1600:
m_BusSpeedBS=160000000;
break;
273 case FlyCapture2::BUSSPEED_S3200:
m_BusSpeedBS=320000000;
break;
285 m_CamConfig.isochBusSpeed=FlyCapture2::BUSSPEED_S_FASTEST;
286 m_CamConfig.asyncBusSpeed=FlyCapture2::BUSSPEED_S_FASTEST;
289 m_CamConfig.bandwidthAllocation=FlyCapture2::BANDWIDTH_ALLOCATION_ON;
306 if (!size_x) { size_x=512; }
307 if (!size_y) { size_y=384; }
311 if (!size_x) { size_x=320; }
312 if (!size_y) { size_y=240; }
314 SetF7(FlyCapture2::MODE_1,size_x,size_y,FlyCapture2::PIXEL_FORMAT_RGB,50,off_x,off_y);
320 if (!size_x) { size_x=1024; }
321 if (!size_y) { size_y=768; }
330 SetF7(FlyCapture2::MODE_0,size_x,size_y,FlyCapture2::PIXEL_FORMAT_RGB,50,off_x,off_y);
335 if (!size_x) { size_x=640; }
336 if (!size_y) { size_y=480; }
338 if (size_x==640 && size_y==480)
344 SetF7(FlyCapture2::MODE_0,size_x,size_y,FlyCapture2::PIXEL_FORMAT_RGB,50,off_x,off_y);
352 if (!size_x) { size_x=1024; }
353 if (!size_y) { size_y=768; }
357 if (!size_x) { size_x=640; }
358 if (!size_y) { size_y=480; }
360 SetF7(FlyCapture2::MODE_0,size_x,size_y,FlyCapture2::PIXEL_FORMAT_RAW8,50,off_x,off_y);
364 yInfo(
"Reading video format from camera\n");
367 for (
int f=FlyCapture2::BRIGHTNESS;
f<=FlyCapture2::TEMPERATURE; ++
f)
369 FlyCapture2::PropertyInfo propInfo;
370 propInfo.type=(FlyCapture2::PropertyType)
f;
372 if (
error.GetType()==FlyCapture2::PGRERROR_OK)
377 if (propInfo.present)
379 FlyCapture2::Property prop;
380 prop.type=(FlyCapture2::PropertyType)
f;
382 if (
error.GetType()!=FlyCapture2::PGRERROR_OK)
384 yWarning(
"feature %d %s\n",
f,
error.GetDescription());
386 prop.onOff=(
f!=FlyCapture2::AUTO_EXPOSURE &&
f!=FlyCapture2::IRIS &&
f<FlyCapture2::TRIGGER_MODE);
387 prop.autoManualMode=
false;
388 prop.absControl=
false;
390 if (
error.GetType()!=FlyCapture2::PGRERROR_OK)
392 yWarning(
"feature %d %s\n",
f,
error.GetDescription());
397 yInfo(
"Feature %d not supported by this camera model.\n",
f);
402 yError(
"Feature %d %s\n",
f,
error.GetDescription());
420 yarp::os::Bottle& white_balance=config.findGroup(
"white_balance");
421 if (!white_balance.isNull())
423 setWhiteBalance(white_balance.get(2).asFloat64(),white_balance.get(1).asFloat64());
470 int xdim,ydim,buff_dim;
475 case FlyCapture2::VIDEOMODE_160x120YUV444: xdim=160; ydim=120; buff_dim= xdim*ydim*3;
break;
477 case FlyCapture2::VIDEOMODE_320x240YUV422: xdim=320; ydim=240; buff_dim= xdim*ydim*2;
break;
479 case FlyCapture2::VIDEOMODE_640x480YUV411: xdim=640; ydim=480; buff_dim=(xdim*ydim*3)/2;
break;
481 case FlyCapture2::VIDEOMODE_640x480YUV422: xdim=640; ydim=480; buff_dim= xdim*ydim*2;
break;
482 case FlyCapture2::VIDEOMODE_640x480RGB: xdim=640; ydim=480; buff_dim= xdim*ydim*3;
break;
483 case FlyCapture2::VIDEOMODE_640x480Y8: xdim=640; ydim=480; buff_dim= xdim*ydim;
break;
484 case FlyCapture2::VIDEOMODE_640x480Y16: xdim=640; ydim=480; buff_dim= xdim*ydim*2;
break;
486 case FlyCapture2::VIDEOMODE_800x600YUV422: xdim=800; ydim=600; buff_dim= xdim*ydim*2;
break;
487 case FlyCapture2::VIDEOMODE_800x600RGB: xdim=800; ydim=600; buff_dim= xdim*ydim*3;
break;
488 case FlyCapture2::VIDEOMODE_800x600Y8: xdim=800; ydim=600; buff_dim= xdim*ydim;
break;
489 case FlyCapture2::VIDEOMODE_800x600Y16: xdim=800; ydim=600; buff_dim= xdim*ydim*2;
break;
491 case FlyCapture2::VIDEOMODE_1024x768YUV422: xdim=1024; ydim=768; buff_dim= xdim*ydim*2;
break;
492 case FlyCapture2::VIDEOMODE_1024x768RGB: xdim=1024; ydim=768; buff_dim= xdim*ydim*3;
break;
493 case FlyCapture2::VIDEOMODE_1024x768Y8: xdim=1024; ydim=768; buff_dim= xdim*ydim;
break;
494 case FlyCapture2::VIDEOMODE_1024x768Y16: xdim=1024; ydim=768; buff_dim= xdim*ydim*2;
break;
496 default:
return false;
505 case FlyCapture2::BUSSPEED_S100:
m_BusSpeedBS= 10000000;
break;
506 case FlyCapture2::BUSSPEED_S200:
m_BusSpeedBS= 20000000;
break;
507 case FlyCapture2::BUSSPEED_S400:
m_BusSpeedBS= 40000000;
break;
508 case FlyCapture2::BUSSPEED_S480:
m_BusSpeedBS= 48000000;
break;
509 case FlyCapture2::BUSSPEED_S800:
m_BusSpeedBS= 80000000;
break;
510 case FlyCapture2::BUSSPEED_S1600:
m_BusSpeedBS=160000000;
break;
511 case FlyCapture2::BUSSPEED_S3200:
m_BusSpeedBS=320000000;
break;
516 static const double two_cams=0.5;
517 double fpsMax=two_cams*double(
m_BusSpeedBS)/double(buff_dim);
519 FlyCapture2::FrameRate frame_rate;
522 if (fpsMax<1.785){
return false; }
523 else if (fpsMax<3.75) { frame_rate=FlyCapture2::FRAMERATE_1_875; }
524 else if (fpsMax<7.5) { frame_rate=FlyCapture2::FRAMERATE_3_75; }
525 else if (fpsMax<15.0) { frame_rate=FlyCapture2::FRAMERATE_7_5; }
526 else if (fpsMax<30.0) { frame_rate=FlyCapture2::FRAMERATE_15; }
527 else if (fpsMax<60.0) { frame_rate=FlyCapture2::FRAMERATE_30; }
528 else if (fpsMax<120.0){ frame_rate=FlyCapture2::FRAMERATE_60; }
529 else if (fpsMax<240.0){ frame_rate=FlyCapture2::FRAMERATE_120; }
530 else { frame_rate=FlyCapture2::FRAMERATE_240; }
533 for (
int fr=frame_rate; fr>=FlyCapture2::FRAMERATE_1_875; --fr)
536 error=
m_pCamera->GetVideoModeAndFrameRateInfo(video_mode,(FlyCapture2::FrameRate)fr,&bSupported);
541 error=
m_pCamera->SetVideoModeAndFrameRate(video_mode,(FlyCapture2::FrameRate)fr);
543 printf(
"video mode=%d framerate=%d\n",video_mode,fr);
557 #define SKIP 0x80000000
564 if (mode!=FlyCapture2::MODE_0 || pixel_format!=FlyCapture2::PIXEL_FORMAT_RAW8)
return false;
567 FlyCapture2::VideoMode vm;
568 FlyCapture2::FrameRate fr;
574 if (vm==FlyCapture2::VIDEOMODE_FORMAT7)
583 yError(
"no format 7 mode specified\n");
599 yError(
"format 7 mode %d not supported\n",
m_F7Info.mode);
606 if (pixel_format==
SKIP)
608 pixel_format=FlyCapture2::PIXEL_FORMAT_RGB8;
619 if (vm!=FlyCapture2::VIDEOMODE_FORMAT7)
638 if (
m_F7Info.mode==FlyCapture2::MODE_1)
649 int xoff=(
m_F7Info.maxWidth -xdim)/2+x0;
650 int yoff=(
m_F7Info.maxHeight-ydim)/2+y0;
670 bool bSettingsAreValid;
671 FlyCapture2::Format7PacketInfo packetInfo;
675 if (!bSettingsAreValid)
677 yError(
"invalid format 7 settings\n");
689 case FlyCapture2::BUSSPEED_S100:
m_BusSpeedBS= 10000000;
break;
690 case FlyCapture2::BUSSPEED_S200:
m_BusSpeedBS= 20000000;
break;
691 case FlyCapture2::BUSSPEED_S400:
m_BusSpeedBS= 40000000;
break;
692 case FlyCapture2::BUSSPEED_S480:
m_BusSpeedBS= 48000000;
break;
693 case FlyCapture2::BUSSPEED_S800:
m_BusSpeedBS= 80000000;
break;
694 case FlyCapture2::BUSSPEED_S1600:
m_BusSpeedBS=160000000;
break;
695 case FlyCapture2::BUSSPEED_S3200:
m_BusSpeedBS=320000000;
break;
701 double maxBandOcc=double(fps*xdim*ydim)*bpp;
711 m_F7PacketSize=(
unsigned int)(0.01*
double(speed*packetInfo.maxBytesPerPacket)*margin);
762 pBuffer=pImage->getRawImage();
765 if (
m_pFrame->GetPixelFormat()==FlyCapture2::PIXEL_FORMAT_RGB8 || bRaw)
826 FlyCapture2::PropertyInfo
info;
827 info.type=(FlyCapture2::PropertyType)feature;
829 if (
error.GetType()!=FlyCapture2::PGRERROR_OK)
return false;
835 if (value<0.0 || value>1.0)
return false;
851 FlyCapture2::Property prop;
852 prop.type=(FlyCapture2::PropertyType)feature;
868 FlyCapture2::Property prop;
869 prop.type=(FlyCapture2::PropertyType)feature;
880 FlyCapture2::PropertyInfo
info;
881 info.type=(FlyCapture2::PropertyType)feature;
884 return info.onOffSupported;
891 FlyCapture2::Property prop;
892 prop.type=(FlyCapture2::PropertyType)feature;
905 FlyCapture2::Property prop;
906 prop.type=(FlyCapture2::PropertyType)feature;
917 FlyCapture2::PropertyInfo
info;
918 info.type=(FlyCapture2::PropertyType)feature;
921 return info.manualSupported;
928 FlyCapture2::PropertyInfo
info;
929 info.type=(FlyCapture2::PropertyType)feature;
932 return info.autoSupported;
939 FlyCapture2::PropertyInfo
info;
940 info.type=(FlyCapture2::PropertyType)feature;
943 return info.onePushSupported;
951 FlyCapture2::Property prop;
952 prop.type=(FlyCapture2::PropertyType)feature;
955 prop.autoManualMode=auto_onoff;
965 FlyCapture2::Property prop;
966 prop.type=(FlyCapture2::PropertyType)feature;
969 return prop.autoManualMode;
976 FlyCapture2::Property prop;
977 prop.type=(FlyCapture2::PropertyType)feature;
989 if (b<0.0 || b>1.0 || r<0.0 || r>1.0)
return false;
991 FlyCapture2::Property prop;
992 prop.type=FlyCapture2::WHITE_BALANCE;
995 prop.valueA=
NormToValue(r,FlyCapture2::WHITE_BALANCE);
996 prop.valueB=
NormToValue(b,FlyCapture2::WHITE_BALANCE);
1005 FlyCapture2::Property prop;
1006 prop.type=FlyCapture2::WHITE_BALANCE;
1009 r=
ValueToNorm(prop.valueA,FlyCapture2::WHITE_BALANCE);
1010 b=
ValueToNorm(prop.valueB,FlyCapture2::WHITE_BALANCE);
1023 return 1<<(1+FlyCapture2::MODE_0+FlyCapture2::VIDEOMODE_FORMAT7);
1027 unsigned int mask=0;
1029 for (
int m=FlyCapture2::VIDEOMODE_160x120YUV444; m<FlyCapture2::NUM_VIDEOMODES; ++m)
1031 for (
int f=FlyCapture2::FRAMERATE_1_875;
f<FlyCapture2::NUM_FRAMERATES; ++
f)
1033 error=
m_pCamera->GetVideoModeAndFrameRateInfo((FlyCapture2::VideoMode)m,(FlyCapture2::FrameRate)
f,&bSupported);
1035 if (
error.GetType()==FlyCapture2::PGRERROR_OK && bSupported)
1041 case 11: vm=10;
break;
1042 case 12: vm=11;
break;
1043 case 13: vm=12;
break;
1044 case 10: vm=13;
break;
1046 case 19: vm=18;
break;
1047 case 20: vm=19;
break;
1048 case 21: vm=20;
break;
1049 case 18: vm=21;
break;
1058 if (mask & FlyCapture2::VIDEOMODE_FORMAT7)
1060 mask &= ~(1<<FlyCapture2::VIDEOMODE_FORMAT7);
1064 for (
int m=FlyCapture2::MODE_0; m<FlyCapture2::NUM_MODES; ++m)
1066 m_F7Info.mode=(FlyCapture2::Mode)m;
1071 if (bSupported) mask|=1<<(1+m+FlyCapture2::VIDEOMODE_FORMAT7);
1075 printf(
"video mode mask: %x\n",mask);
1087 printf(
"setVideoModeDC1394(%d)\n",video_mode);
1100 if (video_mode<FlyCapture2::VIDEOMODE_FORMAT7)
1104 case 10: video_mode=FlyCapture2::VIDEOMODE_1024x768YUV422;
break;
1105 case 11: video_mode=FlyCapture2::VIDEOMODE_1024x768RGB;
break;
1106 case 12: video_mode=FlyCapture2::VIDEOMODE_1024x768Y8;
break;
1107 case 13: video_mode=FlyCapture2::VIDEOMODE_800x600Y16;
break;
1109 case 18: video_mode=FlyCapture2::VIDEOMODE_1600x1200YUV422;
break;
1110 case 19: video_mode=FlyCapture2::VIDEOMODE_1600x1200RGB;
break;
1111 case 20: video_mode=FlyCapture2::VIDEOMODE_1600x1200Y8;
break;
1112 case 21: video_mode=FlyCapture2::VIDEOMODE_1280x960Y16;
break;
1123 FlyCapture2::Mode mode=(FlyCapture2::Mode)((
int)video_mode-1-(int)FlyCapture2::VIDEOMODE_FORMAT7);
1140 FlyCapture2::VideoMode vm;
1141 FlyCapture2::FrameRate fr;
1145 if (vm==FlyCapture2::VIDEOMODE_FORMAT7)
1174 FlyCapture2::VideoMode vm;
1175 FlyCapture2::FrameRate fr;
1179 if (vm==FlyCapture2::VIDEOMODE_FORMAT7)
1185 unsigned int mask=0;
1187 for (
int f=FlyCapture2::FRAMERATE_1_875;
f<FlyCapture2::NUM_FRAMERATES; ++
f)
1189 error=
m_pCamera->GetVideoModeAndFrameRateInfo(vm,(FlyCapture2::FrameRate)
f,&bSupported);
1190 if (
error.GetType()==FlyCapture2::PGRERROR_OK && bSupported)
1203 FlyCapture2::VideoMode vm;
1204 FlyCapture2::FrameRate fr;
1208 if (vm==FlyCapture2::VIDEOMODE_FORMAT7)
1226 FlyCapture2::VideoMode vm;
1227 FlyCapture2::FrameRate fr;
1231 if (vm==FlyCapture2::VIDEOMODE_FORMAT7)
1240 error=
m_pCamera->SetVideoModeAndFrameRate(vm,(FlyCapture2::FrameRate)fps);
1258 if (
m_CamConfig.isochBusSpeed>FlyCapture2::BUSSPEED_S400)
1281 FlyCapture2::VideoMode vm;
1282 FlyCapture2::FrameRate fr;
1289 if (speed>FlyCapture2::BUSSPEED_S400) ++speed;
1291 m_CamConfig.isochBusSpeed=(FlyCapture2::BusSpeed)speed;
1296 if (vm<FlyCapture2::VIDEOMODE_FORMAT7)
1327 if (video_mode<FlyCapture2::VIDEOMODE_FORMAT7)
1333 m_F7Info.mode=(FlyCapture2::Mode)(video_mode-1-FlyCapture2::VIDEOMODE_FORMAT7);
1343 unsigned int mask=0;
1345 for (
int i=0; i<32; ++i)
1347 if (
m_F7Info.pixelFormatBitField & (1<<i))
1349 mask |= (1<<(31-i));
1362 FlyCapture2::VideoMode vm;
1363 FlyCapture2::FrameRate fr;
1367 if (vm<FlyCapture2::VIDEOMODE_FORMAT7)
1386 return m_F7Info.pixelFormatBitField;
1394 FlyCapture2::VideoMode vm;
1395 FlyCapture2::FrameRate fr;
1399 if (vm!=FlyCapture2::VIDEOMODE_FORMAT7)
1407 for (
int i=0; i<32; ++i)
1424 fprintf(stdout,
"setColorCodingDC1394(%d)\n",coding);
1437 FlyCapture2::PixelFormat pixel_format=(FlyCapture2::PixelFormat)(1<<(31-coding));
1457 FlyCapture2::VideoMode vm;
1458 FlyCapture2::FrameRate fr;
1462 if (vm!=FlyCapture2::VIDEOMODE_FORMAT7)
1464 xdim=ydim=xstep=ystep=0;
1499 yInfo(
"setFormat7WindowDC1394(%d,%d)\n",xdim,ydim);
1529 FlyCapture2::VideoMode vm;
1530 FlyCapture2::FrameRate fr;
1534 if (vm!=FlyCapture2::VIDEOMODE_FORMAT7)
1663 FlyCapture2::VideoMode vm;
1664 FlyCapture2::FrameRate fr;
1668 if (vm!=FlyCapture2::VIDEOMODE_FORMAT7)
1686 yInfo(
"setBytesPerPacketDC1394(%d)\n",bpp);
1716 if (v<0.0 || v>1.0)
return false;
1723 if (v<0.0 || v>1.0)
return false;
1730 if (v<0.0 || v>1.0)
return false;
1737 if (blue<0.0 || blue>1.0 || red<0.0 || red>1.0)
return false;
1744 if (v<0.0 || v>1.0)
return false;
1751 if (v<0.0 || v>1.0)
return false;
1758 if (v<0.0 || v>1.0)
return false;
1765 if (v<0.0 || v>1.0)
return false;
1772 if (v<0.0 || v>1.0)
return false;
1779 if (v<0.0 || v>1.0)
return false;
virtual bool setResetDC1394()
virtual bool setModeDC1394(int feature, bool auto_onoff)
virtual bool setTransmissionDC1394(bool bTxON)
virtual unsigned int getISOSpeedDC1394()
bool Capture(yarp::sig::ImageOf< yarp::sig::PixelRgb > *pImage, unsigned char *pBuffer=0, bool bRaw=false)
virtual unsigned int getFPSDC1394()
virtual double getSharpness()
virtual unsigned int getColorCodingDC1394()
bool SetVideoMode(dc1394video_mode_t videoMode)
uint32_t m_iMax[DC1394_FEATURE_NUM]
FlyCapture2::BusManager * m_pBusManager
double checkDouble(yarp::os::Searchable &config, const char *key)
virtual bool setDefaultsDC1394()
virtual bool getTransmissionDC1394()
uint32_t NormToValue(double &dVal, int feature)
virtual bool hasFeatureDC1394(int feature)
dc1394camera_t * m_pCamera
virtual bool getWhiteBalanceDC1394(double &b, double &r)
bool SetF7(int newVideoMode, int newXdim, int newYdim, int newColorCoding, int newSpeed, int x0, int y0)
virtual double getBrightness()
virtual unsigned int getVideoModeMaskDC1394()
virtual bool setPowerDC1394(bool onoff)
virtual bool setHue(double v)
virtual bool setShutter(double v)
virtual unsigned int getBytesPerPacketDC1394()
virtual bool setWhiteBalanceDC1394(double b, double r)
unsigned int m_F7PacketSize
virtual unsigned int getVideoModeDC1394()
virtual bool setCaptureDC1394(bool bON)
virtual bool setBrightness(double v)
bool manage(dc1394error_t error)
FlyCapture2::Format7ImageSettings m_F7ImageSettings
virtual bool setFeatureDC1394(int feature, double value)
virtual bool getWhiteBalance(double &blue, double &red)
virtual bool hasOnePushDC1394(int feature)
double ValueToNorm(uint32_t iVal, int feature)
virtual bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)
virtual bool setOperationModeDC1394(bool b1394b)
virtual bool setBytesPerPacketDC1394(unsigned int bpp)
virtual unsigned int getFPSMaskDC1394()
FlyCapture2::Image * m_pBayer
virtual bool getOperationModeDC1394()
virtual bool hasAutoDC1394(int feature)
FlyCapture2::Format7Info m_F7Info
virtual bool setBroadcastDC1394(bool onoff)
FlyCapture2::CameraInfo m_CameraInfo
double bytesPerPixel(dc1394color_coding_t pixelFormat)
virtual bool setExposure(double v)
virtual bool setSharpness(double v)
uint32_t m_iMin[DC1394_FEATURE_NUM]
int checkInt(yarp::os::Searchable &config, const char *key)
virtual double getExposure()
virtual bool hasManualDC1394(int feature)
virtual double getGamma()
virtual double getFeatureDC1394(int feature)
virtual unsigned int getActualColorCodingMaskDC1394()
virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)
dc1394video_frame_t * m_pFrame
virtual bool setGamma(double v)
virtual bool setActiveDC1394(int feature, bool onoff)
virtual bool setIris(double v)
virtual bool setFPSDC1394(int fps)
virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)
virtual bool hasOnOffDC1394(int feature)
virtual bool getActiveDC1394(int feature)
virtual bool setISOSpeedDC1394(int speed)
virtual bool setColorCodingDC1394(int coding)
virtual bool getModeDC1394(int feature)
virtual double getShutter()
FlyCapture2::FC2Config m_CamConfig
virtual bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)
virtual bool setWhiteBalance(double blue, double red)
virtual bool setVideoModeDC1394(int video_mode)
int maxFPS(dc1394video_mode_t mode, dc1394color_coding_t pixelFormat)
virtual double getSaturation()
virtual bool setOnePushDC1394(int feature)
virtual bool setSaturation(double v)
bool Create(yarp::os::Searchable &config)
virtual bool setGain(double v)
#define DR_BAYER_FULL_RES