Comments
Description
Transcript
FLX-PCI 2 User`s Manual
FLX-PCI 2 User’s Manual Rev.1.01 PHOTRON LIMITED 2010 Table of contents Chapter 1 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. ............................................... ............................................... 5 ........................................................... 6 ....................................................... 7 ........................................... 8 ........................................................... 9 .............................................................. 10 .......................................................... 12 Chapter 2 ............................................... ............................................... 14 2.1. ...................................................... 15 2.2. ........................................ 16 2.2.1 FLX-PCI 2 ..................................... 16 2.2.2 CD-ROM .......................................... 17 2.2.3 (Windows2000/XP ) ........ 18 2.2.4 (Linux(RedHat7.3) ) ...... 25 Chapter 3 3.1. VidCap 3.2. AmCap 3.3. xawtv ........................... 32 .................................................... 33 .................................................... 36 .................................................... 41 Chapter 4 FLXFLX-PCI 2 4.1. FLX-PCI API 4.2. FLX-PCI API 4.3. ............................. 47 ............................................... 48 ....................................... 50 ........................................ 75 FLX-PCI 2 User’s Manual Memo -4- FLX-PCI 2 User’s Manual Chapter 1 1.1 1.2 1.3 1.4 1.5 1.6 -5- FLX-PCI 2 User’s Manual 1.1 FLX-PCI 2 PC/AT FLX-PCI 2 PCI CCD FDM FDM-XXX FLX-PCI 2 (SDK) 2 (1) (2) (3) (4) (5) (6) (7) -6- FLX-PCI 2 User’s Manual 1.2 PHOTRON FLX-PCI 2 FLX-PCI 2 30 1. 2. FLX-PCI 2 -7- FLX-PCI 2 User’s Manual 1.3 FLX-PCI 2 FLX-PCI 2 FLX-PCI 2 Chapter 1, . Chapter 2, FLX-PCI 2 Chapter 3, -8- FLX-PCI 2 User’s Manual 1.4 FLX-PCI 2 5 35 PC FLX-PCI 2 PC PC PC -9- FLX-PCI 2 User’s Manual 1.5 PCI CONEXANT Bt878KHF FUSION 878A RGB555 RGB24 YUY2 NTSC_J,NTSC,PAL_M 80x60 88x72 128x96 160x120 176x144 240x176 240x176 240x180 320×240 352x288 640x240 640×480 30fps RCA ×4 Plug & Play PCI 5V/12V 300mA 5V 120mA 12V W135×H125mm 5 35℃ ( - 10 - ) FLX-PCI 2 User’s Manual FLX-PCI 2 FLX-PCI 2 MotherBoard Chipset CPU Memory VideoBoard RICOH® FB6 Intel® 875E Intel® Pentium®IV 2.80GHZ DDR 512Mbyte ELSA® GADIAC FX736 OS Microsoft® Windows XP Professional SP1 RedHat® Linux 7.3 Camera SONY® XC-77 CCD VIDEO CAMERA MODULE VGA QVGA : 640x480 [pixel] : 320x240 [pixel] Windows XP QVGA VGA AMCAP 15 15 VIDCAP 30 30 ※30fps,3sec FLXCAP 30 15 ※FLXCAP QVGA VGA 3 17 3 xawtv (24bit) 8 10 xawtv (jpeg) 25 30 15bit color RedHat Linux 7.3 xawtv (15bit) xawtv (mpeg) 28 8 ※ Microsoft AVI(RIFF)format no sound,44100Hz,30fps 23 - 11 - 24 FLX-PCI 2 User’s Manual 1.6 FLX-PCI 2 PCI PC/AT Pentium 166MHz PCI Revision2.1 ( UMA CPU PCI ) (※1) 64MB Microsoft® Windows 2000 / XP Microsoft® Windows 2003 Server(※3) Microsoft® Windows Vista Microsoft® Windows 7(※4) RedHat Linux 7.3 (Kernel Version 2.4 of Red Hat 7.3) IRQ 1 1KB OS(※2) ※1 PCI ※2 OS 32bit 64bitOS ※3 Service Pack2 2GB ※4 Windows7 PAE RGB24bit 320x240 RGB555(15bit) VGA 640x480 - 12 - OFF FLX-PCI 2 User’s Manual Memo - 13 - FLX-PCI 2 User’s Manual Chapter 2 2.1 2.2 - 14 - FLX-PCI 2 User’s Manual 2.1 1. 2. 3. 4. 5. 6. PCI FLX-PCI 2 Drivers Disk FLX-PCI 2 User’s Manual 1 1 1 1 1 1 - 15 - FLX-PCI 2 User’s Manual 2.2 FLX-PCI 2 2.2.1 FLX-PCI 2 FLX-PCI 2 1. 2. ※ 3. ※ 4. 5. FLX-PCI 2 PCI PCI - 16 - FLX-PCI 2 User’s Manual 2.2.2 CD-ROM FLX-PCI 2 CD-ROM 1 FLX-PCI 2 Drivers Disk ¥¥App¥AMCam¥ DirectShow ¥¥App¥VidCap¥ VFW ¥¥App¥Xawtv¥ Linux ¥¥Driver¥Windows2000¥ Windows2000/XP/2003/Vista/7 ¥¥Driver¥Windows2000Ex¥ Windows2000/XP/2003/Vista/7 ¥¥Driver¥Linux¥ Linux ¥¥FLXCAP¥flxcap¥ FLX FDMPCI.DLL C/C++ ¥¥FLXCAP¥flxcap¥Release¥ FLXCAP ¥¥VisualBasic¥fdmVB¥ FLX FDMPCI.DLL Basic FLX-PCI 2 ※1 PC - 17 - (※1) Visual Visual FLX-PCI 2 User’s Manual 2.2.3 (Windows2000/XP 1. FLX-PCI 2 ) Windows - 18 - FLX-PCI 2 User’s Manual 2. 3. - 19 - FLX-PCI 2 User’s Manual 4. 5. CD-ROM - 20 - FLX-PCI 2 User’s Manual 6. D:¥Driver¥Windows2000¥ ※ bt878.inf CD-ROM 7. [ - 21 - ] FLX-PCI 2 User’s Manual 8. 9. - 22 - FLX-PCI 2 User’s Manual 10. PHOTRON FLX-PCI(Standard driver) PHOTRON FLX-PCI Audio Capture(mute) - 23 - FLX-PCI 2 User’s Manual 11. 12. ※ CD ¥Driver¥Windows2000¥¥ - 24 - FLX-PCI 2 User’s Manual 2.2.4 (Linux(RedHat7.3) 1. ) FLX-PCI 2 2. root GNOME 3. GNOME GNOME 4. GNOME root@***** ***** LINUX-RedHat73 5. - 25 - FLX-PCI 2 User’s Manual 6. .config xconfig [root@LINUX-RedHat73 root]# cd /usr/src/linux-2.4 [root@LINUX-RedHat73 root]# cp .config ~ [root@LINUX-RedHat73 root]# cp /boot/config-2.4.18-3 .config [root@LINUX-RedHat73 root]# make xconfig 7. LINUX Kernel Configuration 8. Character devices Character devices - 26 - FLX-PCI 2 User’s Manual 9. 10. I2C support I2C support I2C support I2C bit-banging interfaces Character devices 11. Multimedia devices 12. Multimedia devices m OK Main menu m - 27 - FLX-PCI 2 User’s Manual 13. 14. 15. Video For Linux BT848 Video For Linux m Main menu and Exit Video For Linux OK Multimedia devices Linux Kernel Configuration Save Kernel build instructions OK - 28 - FLX-PCI 2 User’s Manual 16. [root@LINUX-RedHat73 root]# make dep clean modules [root@LINUX-RedHat73 root]# 17. FD FD HDD [root@LINUX-RedHat73 root]# mount /dev/fd0 /mnt/floppy [root@LINUX-RedHat73 root]# cd /mnt/floppy/Driver/LINUX [root@LINUX-RedHat73 root]# cp * ~ [root@LINUX-RedHat73 root]# umount /mnt/floppy 18. [root@LINUX-RedHat73 root]# cd ~ [root@LINUX-RedHat73 root]# tar zxvf bttv-0.7.95.tgz [root@LINUX-RedHat73 root]# cd bttv-0.7.95/driver [root@LINUX-RedHat73 root]# make [root@LINUX-RedHat73 root]# make install - 29 - FLX-PCI 2 User’s Manual 19. /etc/modules.conf emacs emacs [root@LINUX-RedHat73 root]# emacs /etc/modules.conf 6 # i2c alias char-major-89 i2c-dev #bttv alias char-major-81 videodev alias char-major-81-0 bttv options bttv card=81 [root@LINUX-RedHat73 root]# /sbin/depmod -a 20. [root@LINUX-RedHat73 root]# modprobe bttv [root@LINUX-RedHat73 root]# lsmod bttv Module Size Used bttv videodev I2c-algo-bit I2c-core *** *** *** *** 0 2 1 0 [root@LINUX-RedHat73 root]# modprobe –r bttv - 30 - FLX-PCI 2 User’s Manual 21. [root@LINUX-RedHat73 root]# cd ~/bttv-0.7.95 [root@LINUX-RedHat73 root]# cp bttvmk /etc/init.d/ [root@LINUX-RedHat73 root]# chkconfig –add bttvmk [root@LINUX-RedHat73 root]# chkconfig bttvmk on - 31 - FLX-PCI 2 User’s Manual Chapter 3 3.1. VidCap 3.2. AmCap 3.3. xawtv - 32 - FLX-PCI 2 User’s Manual 3.1. VidCap Windows 2000/XP VidCap VFW VFW Preview ON/OFF ON Single Frame - 33 - FLX-PCI 2 User’s Manual VidCap32 [Options]-[Video Source…] [Options]-[Video Format] 320x240 - 34 - FLX-PCI 2 User’s Manual [Set Capture File…] [Video] [Capture Video Sequence] [Frame rate] [Second] [OK] [Enable capture time limit] [OK] C:¥CAPTURE.AVI VidCap VFW Platform SDK Platform SDK http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ - 35 - FLX-PCI 2 User’s Manual 3.2. AmCap AMCap FLX-PCI 2 AMCap VidCap32 DirectShow API AMCap [Device] [Device]-[Photron 4ch Video Capture] - 36 - AMCap VFW API FLX-PCI 2 User’s Manual AMCap [Options]-[Preview] ON - 37 - FLX-PCI 2 User’s Manual AMCap [Options]-[Video Crossbar…] [Input] AMCap [Options]-[Video Capture Filter…] [Video Decoder] [Video Proc Amp] - 38 - FLX-PCI 2 User’s Manual [Options]-[Video Capture Pin…] Size (ColorSpace/Compression) 320×240 Output (Frame Rate) [File]-[Set Capture File] [File]-[Allocate Disk Space] AMCap Windows Windows 95/98/98SE/ME/2000/XP OS AMCap - 39 - FLX-PCI 2 User’s Manual AMCap AMCap [Capture][Set Frame Rate…] [Capture]-[Set Time Limit…] [Capture]-[Start Capture] [OK] [Capture]-[Stop Capture] [ESC] Windows Media Player Windows Media Player Windows Media Player AMCap DirectShow DirectX SDK DirectX SDK http://www.microsoft.com/japan/msdn/directx/downloads.asp - 40 - FLX-PCI 2 User’s Manual 3.3. xawtv xawtv FLX-PCI 2 - 41 - FLX-PCI 2 User’s Manual TV norm Video source NTSC-JP Composite 0 TV norm Video source - 42 - FLX-PCI 2 User’s Manual Capture grabdisplay overlay grabdisplay Grab Image (ppm) Gram Image (jpeg) snap 640x480 [Ctrl+G][Ctrl+J] bright pmm contrast - 43 - hue Jpeg color FLX-PCI 2 User’s Manual Record Movie (avi) movie driver AVI (RIFF) format Microsoft movie/images filename ~/movie.avi movie.avi audio format - 44 - no sound FLX-PCI 2 User’s Manual video format frames/sec 24 bit TrueColor (LE: bgr) 15.0 fps video size start/stop recording start/stop recording - 45 - FLX-PCI 2 User’s Manual JPEG multiple image files format JPEG(JFIF) video size RedHat7.3 movie/images filename audio format frames/sec GQView - 46 - movie driver ~/image000.jpg no sound video FLX-PCI 2 User’s Manual Chapter 4 FLX-PCI 2 4.1. FLX-PCI API 4.2. FLX-PCI API 4.3. - 47 - FLX-PCI 2 User’s Manual 4.1. FLX-PCI API fdmpciInit( ) fdmpciExit( ) : : fdmpciSetInputResolution( ) fdmpciGetInputResolution( ) fdmpciSetOutputResolution( ) fdmpciGetOutputResolution( ) fdmpciSetStartPosition( ) fdmpciGetStartPosition( ) : : : : : : fdmpciSelectChannel( ) fdmpciGetChannelNum( ) fdmpciGetNumChannel( ) : : : fdmpciSelectFrame( ) fdmpciGetFrameNum( ) fdmpciGetBuffer( ) : : : fdmpciReadPixel( ) fdmpciWritePixel( ) fdmpciRectRead( ) fdmpciRectWrite( ) : : : : fdmpciStopCapture( ) fdmpciSingleCapture( ) fdmpciCapture( ) fdmpciIsCapture( ) : : : : fdmpciSetBrightness( ) fdmpciGetBrightness( ) fdmpciSetContrast( ) fdmpciGetContrast( ) fdmpciSetColorMode( ) fdmpciGetColorMode( ) : : : : : : fdmpciSaveBitmap( ) fdmpciLoadBitmap( ) fdmpciCleanFrame( ) fdmpciCleanAll( ) : : : : fdmpciSaveAVIFile( ) fdmpciSaveBitmaps( ) fdmpciLoadAVIFile( ) : AVI : BMP : AVI fdmpciCaptureStart( ) fdmpciIsCompleted( ) fdmpciRecord( ) : : : fdmpciIs2ch( ) : FDM-PCI 2CH - 48 - FLX-PCI 2 User’s Manual fdmpciIsRgb( ) fdmpciIsRgb2( ) : FDM-PCI RGB : FDM-PCI RGB2 fdmpciIsTriggerOut( ) fdmpciIsTriggerIn( ) : : capSetVideoAmpHue( ) capGetVideoAmpHue( ) capSetVideoAmpSaturation( ) capGetVideoAmpSaturation( ) capGetIsVideoPresent( ) : : : : : HUE( ) HUE( ) Saturation( Saturation( - 49 - ) ) FLX-PCI 2 User’s Manual 4.2. FLX-PCI API int fdmpciInit(void) ○ ○ ○ FDMPCI_NOERROR FDMPCI_ERROR : : void fdmpciExit(void) ○ ○ ○ - 50 - FLX-PCI 2 User’s Manual int fdmpciSetInputResolution(UINT nWidth, UINT nHeight) ○ 640 x 480 640 x 480 ○ nWidth nHeight ○ FDMPCI_NOERROR FDMPCI_ERROR : : void fdmpciGetInputResolution(UINT *pWidth, UINT *pHeight) ○ ○ pWidth pHeight ○ - 51 - FLX-PCI 2 User’s Manual int fdmpciSetOutputResolution(UINT nWidth, UINT nHeight) ○ 640 x 480 640 x 480 0 ○ nWidth nHeight ○ FDMPCI_NOERROR FDMPCI_ERROR : : void fdmpciGetOutputResolution(UINT *pWidth, UINT *pHeight) ○ ○ pWidth pHeight ○ - 52 - FLX-PCI 2 User’s Manual int fdmpciSetStartPosition(UINT x, UINT y) ○ ( 1, 16 ) 0x3FF ○ x y X Y ○ FDMPCI_NOERROR FDMPCI_ERROR x : : void fdmpciGetStartPosition(UINT *x, UINT *y) ○ ○ x y X Y ○ - 53 - FLX-PCI 2 User’s Manual void fdmpciSelectChannel(int no) ○ CH1 ○ no 0: CH1 ○ int fdmpciGetChannelNum(void) ○ ○ ○ 0:CH1 int fdmpciGetNumChannel(void) ○ ○ ○ - 54 - FLX-PCI 2 User’s Manual BYTE *fdmpciSelectFrame(int no) ○ 0 ○ no ○ NULL NULL : : int fdmpciGetFrameNum(void) ○ ○ ○ int fdmpciGetNumFrame(void) ○ ○ ○ - 55 - FLX-PCI 2 User’s Manual BYTE *fdmpciGetBuffer(void) ○ 5 ○ ○ int fdmpciReadPixel(UINT x, UINT y, DWORD *pValue) ○ (x, y) ○ x y pValue X Y 32 X7X6X5X4X3X2X1X0 R7R6R5R4R3R2R1R0 G7G6G5G4G3G2G1G0 B7B6B5B4B3B2B1B0 ○ FDMPCI_NOERROR FDMPCI_ERROR : : - 56 - FLX-PCI 2 User’s Manual int fdmpciWritePixel(UINT x, UINT y, DWORD nValue) ○ (x, y) ○ x y nValue X Y 32 X7X6X5X4X3X2X1X0 R7R6R5R4R3R2R1R0 G7G6G5G4G3G2G1G0 B7B6B5B4B3B2B1B0 ○ FDMPCI_NOERROR FDMPCI_ERROR : : - 57 - FLX-PCI 2 User’s Manual int fdmpciRectRead(UINT x1, UINT y1, UINT x2, UINT y2, DWORD *pBuff) ○ ○ x1 y1 x2 y2 pBuff 32 X7X6X5X4X3X2X1X0 R7R6R5R4R3R2R1R0 G7G6G5G4G3G2G1G0 B7B6B5B4B3B2B1B0 ○ FDMPCI_NOERROR FDMPCI_ERROR : : - 58 - FLX-PCI 2 User’s Manual int fdmpciRectWrite(UINT x1, UINT y1, UINT x2, UINT y2, DOWRD *pBuff) ○ ○ x1 y1 x2 y2 pBuff 32 X7X6X5X4X3X2X1X0 R7R6R5R4R3R2R1R0 G7G6G5G4G3G2G1G0 B7B6B5B4B3B2B1B0 ○ FDMPCI_NOERROR FDMPCI_ERROR : : - 59 - FLX-PCI 2 User’s Manual void fdmpciStopCapture(void) ○ ○ ○ void fdmpciSingleCapture(void) ○ ○ ○ - 60 - FLX-PCI 2 User’s Manual void fdmpciCapture(void) ○ ○ ○ int fdmpciIsCapture(void) ○ ○ ○ 0 1 : : - 61 - FLX-PCI 2 User’s Manual int fdmpciSetBrightness(UINT value) ○ 0 value -32 30 ○ value ○ FDMPCI_NOERROR FDMPCI_ERROR : : int fdmpciGetBirightness(void) ○ ○ ○ - 62 - FLX-PCI 2 User’s Manual int fdmpciSetContrast(UINT value) ○ 128 value 0 255 ○ value ○ FDMPCI_NOERROR FDMPCI_ERROR : : int fdmpciGetContrast(void) ○ ○ ○ - 63 - FLX-PCI 2 User’s Manual void fdmpciSetColorMode(int mode) ○ 24 0 ○ mode 0 : FDMPCI_RGB888 1 : FDMPCI_RGB555 2 : FDMPCI_RGB888_PACK 3 : FDMPCI_YUV422 4 : FDMPCI_RGB565 32 16 24 16 ○ int fdmpciGetColorMode(void) ○ ○ ○ 0 1 2 3 4 : FDMPCI_RGB888 : FDMPCI_RGB555 : FDMPCI_RGB888_PACK : FDMPCI_YUV422 : FDMPCI_RGB565 - 64 - 32 16 24 16 FLX-PCI 2 User’s Manual int fdmpciSaveBitmap(char *fileName) ○ ○ fileName ○ FDMPCI_NOERROR FDMPCI_ERROR : : int fdmpciLoadBitmap(char *fileName) ○ ○ fileName ○ FDMPCI_NOERROR FDMPCI_ERROR : : - 65 - FLX-PCI 2 User’s Manual void fdmpciCleanFrame ○ ○ ○ void fdmpciCleanAll(void) ○ ○ ○ - 66 - FLX-PCI 2 User’s Manual int fdmpciSaveAVIFile(char *fileName, int nFrom, int nTo) ○ nFrom nTo fileName AVI ○ fileName nFrom nTo ○ FDMPCI_NOERROR FDMPCI_ERROR int fdmpciSaveBitmaps(char *fileName, int nFrom, int nTo) ○ nFrom fileName nTo printf fileName % BMP ) ○ fileName nFrom nTo printf “abcd%04d.bmp” ○ FDMPCI_NOERROR FDMPCI_ERROR - 67 - FLX-PCI 2 User’s Manual void fdmpciCaptureStart(void) ○ fdmpciSingleCapture( ) fdmpciIsCompleted( ) ○ ○ int fdmpciIsCompleted(void) ○ fdmpciCaptureStart( ) ○ ○ 0 1 - 68 - FLX-PCI 2 User’s Manual int fdmpciRecord(int nFrom, int nTo, nStep) ○ ○ nFrom nTo nStep ○ FDMPCI_NO_ERROR FDMPCI_ERROR - 69 - FLX-PCI 2 User’s Manual int fdmpciIs2ch(void) ○ FDM-PCI 2CH ○ ○ 0 1 int FDM-PCI 2CH FDM-PCI 2CH fdmpciIsRgb(void) ○ FDM-PCI RGB ○ ○ 0 1 int FDM-PCI RGB FDM-PCI RGB fdmpciIsRgb2(void) ○ FDM-PCI RGB2 ○ ○ 0 1 FDM-PCI RGB2 FDM-PCI RGB2 - 70 - FLX-PCI 2 User’s Manual int fdmpciIsTriggerOut(void) ○ ○ ○ 0 1 int fdmpciIsTriggerIn(void) ○ ○ ○ 0 1 - 71 - FLX-PCI 2 User’s Manual BOOL capSetVideoAmpHue(long Value) ○ HUE( ) Value ○ -180,000 180,000 (-180 +180 ) ○ TRUE FALSE BOOL capGetVideoAmpHue(long *Value) ○ HUE( ) *Value ○ -180,000 180,000 (-180 +180 ) ○ TRUE FALSE - 72 - FLX-PCI 2 User’s Manual BOOL capSetVideoAmpSaturation(long Value) ○ Saturation( ) Value ○ 0 10000 ○ TRUE FALSE BOOL capGetVideoAmpSaturation(long *Value) ○ HUE( ) *Value ○ 0 10000 ○ TRUE FALSE - 73 - FLX-PCI 2 User’s Manual BOOL capGetIsVideoPresent(long *Present) ○ ○ *Present TRUE ○ TRUE FALSE - 74 - FALSE FLX-PCI 2 User’s Manual 4.3. fdmpciGetColorMode() FDMPCI_RGB888(MODE=0) +0x00 +0x01 +0x02 +0x03 +0x04 +0x05 +0x06 +0x07 B7B6B5B4B3B2B1B0 G7G6G5G4G3G2G1G0 R7R6R5R4R3R2R1R0 X7X6X5X4X3X2X1X0 B7B6B5B4B3B2B1B0 G7G6G5G4G3G2G1G0 R7R6R5R4R3R2R1R0 X7X6X5X4X3X2X1X0 X7-X0 - 75 - FLX-PCI 2 User’s Manual FDMPCI_RGB555(MODE=1) +0x00 +0x01 +0x02 +0x03 +0x04 +0x05 G2G1G0B4B3B2B1B0 X0R4R3R2R1R0G4G3 G2G1G0B4B3B2B1B0 X0R4R3R2R1R0G4G3 G2G1G0B4B3B2B1B0 X0R4R3R2R1R0G4G3 FDMPCI_RGB888_PACK(MODE=2) +0x00 +0x01 +0x02 +0x03 +0x04 +0x05 B7B6B5B4B3B2B1B0 G7G6G5G4G3G2G1G0 R7R6R5R4R3R2R1R0 B7B6B5B4B3B2B1B0 G7G6G5G4G3G2G1G0 R7R6R5R4R3R2R1R0 - 76 - Photron FLX-PCI 2 User’s Manual 2010 102-0071 TEL 03-3238-2107 FAX 03-3238-2107 ※ ※ 10 Rev1.01 1-1-8