-
大小: 243KB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2021-06-08
- 語言: 其他
- 標(biāo)簽:
資源簡介
基于CSharpz巴斯勒相機(jī)開發(fā)的多相機(jī)Demo,很適合新人使用。。。。。。

代碼片段和文件信息
/*
???This?sample?illustrates?how?to?grab?images?and?process?images
???using?multiple?cameras?simultaneously.
???The?sample?uses?a?pool?of?buffers?that?are?passed?to?a?stream?grabber?to?be?filled?with
???image?data.?Once?a?buffer?is?filled?and?ready?for?processing?the?buffer?is?retrieved?from
???the?stream?grabber?processed?and?passed?back?to?the?stream?grabber?to?be?filled?again.
???Buffers?retrieved?from?the?stream?grabber?are?not?overwritten?as?long?as
???they?are?not?passed?back?to?the?stream?grabber.
*/
#ifndef?_WIN32_WINNT
#???define?_WIN32_WINNT?0x0400
#endif
#ifndef?_WIN32
#???define?_WIN32
#endif
#include?
#include?
#include?
#include?
#include?
/*?Limits?the?amount?of?cameras?used?for?grabbing.
It?is?important?to?manage?the?available?bandwidth?when?grabbing?with?multiple
cameras.?This?applies?for?instance?if?two?GigE?cameras?are?connected?to?the
same?network?adapter?via?a?switch.?To?manage?the?bandwidth?the?GevSCPD
interpacket?delay?parameter?and?the?GevSCFTD?transmission?delay?parameter?can
be?set?for?each?GigE?camera?device.?The?“Controlling?Packet?Transmission?Timing
with?the?Interpacket?and?frame?Transmission?Delays?on?Basler?GigE?Vision?Cameras“
Application?Note?(AW000649xx000)?provides?more?information?about?this?topic.?*/
#define?NUM_DEVICES?1
#define?NUM_BUFFERS?5?????????/*?Number?of?buffers?used?for?grabbing.?*/
#define?GIGE_PACKET_SIZE???????1500?/*?Size?of?one?Ethernet?packet.?*/
#define?GIGE_PROTOCOL_OVERHEAD?36???/*?Total?number?of?bytes?of?protocol?overhead.?*/
#define?CHECK(?errc?)?if?(?GENAPI_E_OK?!=?errc?)?printErrorAndExit(?errc?)
/*?This?function?can?be?used?to?wait?for?user?input?at?the?end?of?the?sample?program.?*/
void?pressEnterToExit(void);
/*?This?method?demonstrates?how?to?retrieve?the?error?message?for?the?last?failed?function?call.?*/
void?printErrorAndExit(?GENAPIC_RESULT?errc?);
/*?Calculating?the?minimum?and?maximum?gray?value.?*/
void?getMinMax(?const?unsigned?char*?pImg?int32_t?width?int32_t?height
???????????????unsigned?char*?pMin?unsigned?char*?pMax);
int?main(void)
{
????GENAPIC_RESULT??????????????res;??????????????????????/*?Return?value?of?pylon?methods.?*/
????size_t??????????????????????numDevicesAvail;??????????/*?Number?of?available?devices.?*/
????_Bool????????????????????????isAvail;??????????????????/*?Used?for?checking?feature?availability.?*/
????int?????????????????????????deviceIndex;??????????????/*?Index?of?device?used?in?following?variables.?*/
????PYLON_WAITobjectS_HANDLE????wos;??????????????????????/*?Wait?objects.?*/
????HANDLE??????????????????????hTimer;???????????????????/*?Grab?timer.?*/
????PYLON_WAITobject_HANDLE?????woTimer;??????????????????/*?Timer?wait?object.?*/
????/*?These?are?camera?specific?variables?*/
????PYLON_DEVICE_HANDLE?????????hDev[NUM_DEVICES];????????/*?Handle?for?the?pylon?device.?*/
????PYLON_STREAMGRABBER_HAN
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-04-09?19:09??GrabTwoCameras\
?????文件?????????724??2015-10-22?16:08??GrabTwoCameras\debug.mak
?????文件???????23176??2016-04-10?13:07??GrabTwoCameras\GrabTwoCameras.c
?????文件????????8616??2015-10-30?13:22??GrabTwoCameras\GrabTwoCameras.vcproj
?????文件???????12447??2016-04-09?19:06??GrabTwoCameras\GrabTwoCameras.vcxproj
?????文件?????????513??2016-04-09?19:06??GrabTwoCameras\GrabTwoCameras.vcxproj.filters
?????文件?????????143??2016-04-09?19:06??GrabTwoCameras\GrabTwoCameras.vcxproj.user
?????文件?????????150??2014-12-08?16:07??GrabTwoCameras\makefile
?????文件?????????701??2015-10-22?16:08??GrabTwoCameras\release.mak
?????目錄???????????0??2016-04-09?19:09??GrabTwoCameras\Win32\
?????目錄???????????0??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\
?????文件?????????786??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\cl.command.1.tlog
?????文件???????16356??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\CL.read.1.tlog
?????文件?????????338??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\CL.write.1.tlog
?????文件???????39936??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.exe
?????文件?????????406??2016-04-09?19:09??GrabTwoCameras\Win32\Debug\GrabTwoCameras.exe.em
?????文件?????????472??2016-04-09?19:09??GrabTwoCameras\Win32\Debug\GrabTwoCameras.exe.em
?????文件?????????381??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.exe.intermediate.manifest
?????文件??????450172??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.ilk
?????文件??????????51??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.lastbuildstate
?????文件????????2438??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.log
?????文件??????519168??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras.pdb
?????文件???????????0??2016-04-09?19:09??GrabTwoCameras\Win32\Debug\GrabTwoCameras.write.1.tlog
?????文件???????46861??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\GrabTwoCameras1.obj
?????文件?????????232??2016-04-09?19:09??GrabTwoCameras\Win32\Debug\GrabTwoCameras_manifest.rc
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
?????文件???????????2??2016-04-10?13:07??GrabTwoCameras\Win32\Debug\li
............此處省略11個文件信息
評論
共有 條評論