CameraApi.h 304 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817
  1. #ifndef _MVCAMAPI_H_
  2. #define _MVCAMAPI_H_
  3. #ifdef DLL_EXPORT
  4. #define MVSDK_API extern "C" __declspec(dllexport)
  5. #else
  6. #define MVSDK_API extern "C" __declspec(dllimport)
  7. #endif
  8. #include "CameraDefine.h"
  9. #include "CameraStatus.h"
  10. /// @ingroup API_BASIC
  11. /// \~chinese
  12. /// \brief 初始化SDK语言。该函数在整个进程运行期间只需要调用一次。
  13. /// \param [in] iLanguageSel 用于选择SDK内部提示信息和界面的语种,0:表示英文,1:表示中文。
  14. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  15. /// \~english
  16. /// \brief Initialize the SDK language. This function only needs to be called once during the entire process run.
  17. /// \param [in] iLanguageSel The language used to select the prompt information and interface of the SDK. 0: English, 1: Chinese.
  18. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  19. MVSDK_API CameraSdkStatus __stdcall CameraSdkInit(
  20. int iLanguageSel
  21. );
  22. /// @ingroup API_BASIC
  23. /// \~chinese
  24. /// \brief 配置系统选项(通常需要在CameraInit打开相机之前配置好)
  25. /// \param [in] optionName 选项("NumBuffers", "3")
  26. /// \param [in] value 值
  27. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  28. /// \~english
  29. /// \brief Configure system options (usually required before CameraInit turns on the camera)
  30. /// \param [in] optionName option name("NumBuffers", "3")
  31. /// \param [in] value setting value
  32. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  33. MVSDK_API CameraSdkStatus __stdcall CameraSetSysOption(
  34. char const* optionName,
  35. char const* value
  36. );
  37. /// @ingroup API_ENUM
  38. /// \~chinese
  39. /// \brief 枚举设备,并建立设备列表
  40. /// \param [out] pCameraList 设备列表数组指针
  41. /// \param [inout] piNums 设备的个数指针,调用时传入pCameraList数组的元素个数,函数返回时,保存实际找到的设备个数
  42. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义
  43. /// \warning piNums指向的值必须初始化,且不超过pCameraList数组元素个数,否则有可能造成内存溢出
  44. /// \note 返回的相机信息列表,会根据acFriendlyName排序的。例如可以将两个相机分别改为“Camera1”和“Camera2”的名字后,名字为“Camera1”的相机会排前面,名为“Camera2”的相机排后面。
  45. /// \~english
  46. /// \brief Enumerate devices and establish a list of devices
  47. /// \param [out] pCameraList Device list array pointer
  48. /// \param [inout] piNums The number of pointers to the device, the number of elements passed to the pCameraList array at the time of the call. When the function returns, the number of devices actually found is saved.
  49. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  50. /// \warning piNums The value pointed to must be initialized and does not exceed the number of pCameraList array elements, otherwise it may cause memory overflow
  51. /// \note The list of returned camera information will be sorted according to acFriendlyName. For example, after changing the two cameras to the names of "Camera1" and "Camera2," the camera named "Camera1" will be in front, and the camera named "Camera2" will be behind the row.
  52. MVSDK_API CameraSdkStatus __stdcall CameraEnumerateDevice(
  53. tSdkCameraDevInfo* pCameraList,
  54. INT* piNums
  55. );
  56. /// @ingroup API_ENUM
  57. /// \~chinese
  58. /// \brief 枚举设备,并建立设备列表。在调用@link #CameraInitEx @endlink之前,必须调用该函数枚举设备。
  59. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  60. /// \~english
  61. /// \brief Enumerate devices and create a list of devices. Before calling @link #CameraInitEx @endlink, this function must be called to enumerate the device.
  62. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  63. MVSDK_API INT __stdcall CameraEnumerateDeviceEx(
  64. );
  65. /// @ingroup API_OPEN
  66. /// \~chinese
  67. /// \brief 检测设备是否已经被打开
  68. /// \param [in] pCameraInfo 设备的枚举信息结构体指针,由@link #CameraEnumerateDevice @endlink获得。
  69. /// \param [out] pOpened 设备的状态指针,返回设备是否被打开的状态,TRUE为打开,FALSE为空闲。
  70. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  71. /// \~english
  72. /// \brief Check if the device has been opened
  73. /// \param [in] pCameraInfo Device enumeration information structure pointer, obtained by @link #CameraEnumerateDevice @endlink
  74. /// \param [out] pOpened The device's status pointer returns whether the device is turned on. TRUE is on and FALSE is idle.
  75. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  76. MVSDK_API CameraSdkStatus __stdcall CameraIsOpened(
  77. tSdkCameraDevInfo* pCameraInfo,
  78. BOOL* pOpened
  79. );
  80. /// @ingroup API_OPEN
  81. /// \~chinese
  82. /// \brief 相机初始化。初始化成功后,才能调用其他相机相关的操作接口。
  83. /// \param [in] pCameraInfo 设备的枚举信息结构体指针,由@link #CameraEnumerateDevice @endlink获得。
  84. /// \param [in] emParamLoadMode 相机初始化时使用的参数加载方式。-1表示使用上次退出时的参数加载方式。其它取值参考@link #emSdkParameterMode @endlink定义。
  85. /// \param [in] emTeam 初始化时使用的参数组。-1表示加载上次退出时的参数组。
  86. /// \param [out] pCameraHandle 相机的句柄指针,初始化成功后,该指针返回该相机的有效句柄。
  87. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  88. /// \~english
  89. /// \brief The camera is initialized. After successful initialization, other camera-related operation interfaces can be called.
  90. /// \param [in] pCameraInfo Device enumeration information structure pointer, obtained by @link #CameraEnumerateDevice @endlink.
  91. /// \param [in] emParamLoadMode The parameter loading method used when the camera is initialized. -1 means to use the parameter loading method from the last exit. Other values are defined in @link #emSdkParameterMode @endlink.
  92. /// \param [in] emTeam Parameter group used during initialization. -1 means to load the parameter group from the last exit.
  93. /// \param [out] pCameraHandle The handle pointer of the camera, after successful initialization, returns the camera's effective handle.
  94. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  95. MVSDK_API CameraSdkStatus __stdcall CameraInit(
  96. tSdkCameraDevInfo* pCameraInfo,
  97. int emParamLoadMode,
  98. int emTeam,
  99. CameraHandle* pCameraHandle
  100. );
  101. /// @ingroup API_OPEN
  102. /// \~chinese
  103. /// \brief 相机初始化。初始化成功后,才能调用其他相机相关的操作接口。
  104. /// \param [in] iDeviceIndex 相机的索引号,@link #CameraEnumerateDeviceEx @endlink返回相机个数。
  105. /// \param [in] emParamLoadMode 相机初始化时使用的参数加载方式。-1表示使用上次退出时的参数加载方式。其它取值参考@link #emSdkParameterMode @endlink定义。
  106. /// \param [in] emTeam 初始化时使用的参数组。-1表示加载上次退出时的参数组。
  107. /// \param [out] pCameraHandle 相机的句柄指针,初始化成功后,该指针返回该相机的有效句柄。
  108. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  109. /// \~english
  110. /// \brief The camera is initialized. After successful initialization, other camera-related operation interfaces can be called.
  111. /// \param [in] iDeviceIndex The camera's index number, @link #CameraEnumerateDeviceEx @endlink returns the number of cameras.
  112. /// \param [in] emParamLoadMode The parameter loading method used when the camera is initialized. -1 means to use the parameter loading method from the last exit. Other values are defined in @link #emSdkParameterMode @endlink.
  113. /// \param [in] emTeam Parameter group used during initialization. -1 means to load the parameter group from the last exit.
  114. /// \param [out] pCameraHandle The handle pointer of the camera, after successful initialization, returns the camera's effective handle.
  115. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  116. MVSDK_API CameraSdkStatus __stdcall CameraInitEx(
  117. int iDeviceIndex,
  118. int emParamLoadMode,
  119. int emTeam,
  120. CameraHandle* pCameraHandle
  121. );
  122. /// @ingroup API_OPEN
  123. /// \~chinese
  124. /// \brief 相机初始化。初始化成功后,才能调用其他相机相关的操作接口。
  125. /// \param [in] CameraName 相机昵称。@link #tSdkCameraDevInfo.acFriendlyName @endlink
  126. /// \param [out] pCameraHandle 相机的句柄指针,初始化成功后,该指针返回该相机的有效句柄。
  127. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  128. /// \~english
  129. /// \brief The camera is initialized. After successful initialization, other camera-related operation interfaces can be called.
  130. /// \param [in] CameraName Camera friendly name.@link #tSdkCameraDevInfo.acFriendlyName @endlink
  131. /// \param [out] pCameraHandle The handle pointer of the camera, after successful initialization, returns the camera's effective handle.
  132. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  133. MVSDK_API CameraSdkStatus __stdcall CameraInitEx2(
  134. char* CameraName,
  135. CameraHandle *pCameraHandle
  136. );
  137. /// @ingroup API_GRAB_CB
  138. /// \~chinese
  139. /// \brief 设置图像捕获的回调函数。当捕获到新的图像数据帧时,pCallBack所指向的回调函数就会被调用。
  140. /// \param [in] hCamera 相机的句柄。
  141. /// \param [in] pCallBack 回调函数指针。
  142. /// \param [in] pContext 回调函数的附加参数,在回调函数被调用时该附加参数会被传入,可以为NULL。多用于多个相机时携带附加信息。
  143. /// \param [out] pCallbackOld 用于返回之前设置的回调函数。可以为NULL。
  144. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  145. /// \~english
  146. /// \brief Sets the image capture's callback function. When a new frame of image data is captured, the callback function pointed to by pCallBack is called.
  147. /// \param [in] hCamera Camera handle.
  148. /// \param [in] pCallBack Callback function pointer.
  149. /// \param [in] pContext Additional parameters of the callback function, which will be passed in when the callback function is called, can be NULL. Use additional information when used with multiple cameras.
  150. /// \param [out] pCallbackOld Returns the previously set callback function. Can be NULL.
  151. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  152. MVSDK_API CameraSdkStatus __stdcall CameraSetCallbackFunction(
  153. CameraHandle hCamera,
  154. CAMERA_SNAP_PROC pCallBack,
  155. PVOID pContext,
  156. CAMERA_SNAP_PROC* pCallbackOld
  157. );
  158. /// @ingroup API_CLOSE
  159. /// \~chinese
  160. /// \brief 相机反初始化。释放资源。
  161. /// \param [in] hCamera 相机的句柄。
  162. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  163. /// \~english
  164. /// \brief The camera is deinitialized. Release resources.
  165. /// \param [in] hCamera Camera handle.
  166. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  167. MVSDK_API CameraSdkStatus __stdcall CameraUnInit(
  168. CameraHandle hCamera
  169. );
  170. /// @ingroup API_BASIC
  171. /// \~chinese
  172. /// \brief 获得相机的描述信息
  173. /// \param [in] hCamera 相机的句柄。
  174. /// \param [out] pbuffer 指向相机描述信息指针的指针。
  175. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  176. /// \~english
  177. /// \brief Get camera description information
  178. /// \param [in] hCamera Camera handle.
  179. /// \param [out] pbuffer Pointer to the camera description information pointer.
  180. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  181. MVSDK_API CameraSdkStatus __stdcall CameraGetInformation(
  182. CameraHandle hCamera,
  183. char** pbuffer
  184. );
  185. /// @ingroup API_ISP
  186. /// \~chinese
  187. /// \brief 将获得的相机原始输出图像数据进行处理,叠加饱和度、颜色增益和校正、降噪等处理效果,最后得到RGB888格式的图像数据。
  188. /// \param [in] hCamera 相机的句柄。
  189. /// \param [in] pbyIn 输入图像数据的缓冲区地址,不能为NULL。
  190. /// \param [out] pbyOut 处理后图像输出的缓冲区地址,不能为NULL。
  191. /// \param [inout] pFrInfo 输入图像的帧头信息,处理完成后,帧头信息中的图像格式uiMediaType会随之改变。
  192. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  193. /// \~english
  194. /// \brief The obtained raw camera output image data is processed to superimpose processing effects such as saturation, color gain and correction, noise reduction, etc. Finally, image data of RGB888 format is obtained.
  195. /// \param [in] hCamera Camera handle.
  196. /// \param [in] pbyIn The buffer address of the input image data cannot be NULL.
  197. /// \param [out] pbyOut The buffer address of the image output after processing cannot be NULL.
  198. /// \param [inout] pFrInfo After inputting the frame header information of the image, the image format uiMediaType in the frame header information will be changed after the processing is completed.
  199. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  200. MVSDK_API CameraSdkStatus __stdcall CameraImageProcess(
  201. CameraHandle hCamera,
  202. BYTE* pbyIn,
  203. BYTE* pbyOut,
  204. tSdkFrameHead* pFrInfo
  205. );
  206. /// @ingroup API_ISP
  207. /// \~chinese
  208. /// \brief 将获得的相机原始输出图像数据进行处理,叠加饱和度、颜色增益和校正、降噪等处理效果,最后得到RGB888格式的图像数据。
  209. /// \param [in] hCamera 相机的句柄。
  210. /// \param [in] pbyIn 输入图像数据的缓冲区地址,不能为NULL。
  211. /// \param [out] pbyOut 处理后图像输出的缓冲区地址,不能为NULL。
  212. /// \param [inout] pFrInfo 输入图像的帧头信息,处理完成后,帧头信息中的图像格式uiMediaType会随之改变。
  213. /// \param [in] uOutFormat 处理完后图像的输出格式。可以是CAMERA_MEDIA_TYPE_MONO8、CAMERA_MEDIA_TYPE_RGB、CAMERA_MEDIA_TYPE_RGBA8的其中一种。
  214. /// \param [in] uReserved 预留参数,必须设置为0。
  215. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  216. /// \~english
  217. /// \brief The obtained raw camera output image data is processed to superimpose processing effects such as saturation, color gain and correction, noise reduction, etc. Finally, image data of RGB888 format is obtained.
  218. /// \param [in] hCamera Camera handle.
  219. /// \param [in] pbyIn The buffer address of the input image data cannot be NULL.
  220. /// \param [out] pbyOut The buffer address of the image output after processing cannot be NULL.
  221. /// \param [inout] pFrInfo After inputting the frame header information of the image, the image format uiMediaType in the frame header information will be changed after the processing is completed.
  222. /// \param [in] uOutFormat The output format of the image after processing. It may be one of CAMERA_MEDIA_TYPE_MONO8,CAMERA_MEDIA_TYPE_RGB,CAMERA_MEDIA_TYPE_RGBA8.
  223. /// \param [in] uReserved Reservation parameters must be set to 0.
  224. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  225. MVSDK_API CameraSdkStatus __stdcall CameraImageProcessEx(
  226. CameraHandle hCamera,
  227. BYTE* pbyIn,
  228. BYTE* pbyOut,
  229. tSdkFrameHead* pFrInfo,
  230. UINT uOutFormat,
  231. UINT uReserved
  232. );
  233. /// @ingroup API_DISPLAY
  234. /// \~chinese
  235. /// \brief 初始化SDK内部的显示模块。在调用@link #CameraDisplayRGB24 @endlink前必须先调用该函数初始化。如果您在二次开发中,使用自己的方式进行图像显示(不调用CameraDisplayRGB24)则不需要调用本函数。
  236. /// \param [in] hCamera 相机的句柄。
  237. /// \param [in] hWndDisplay 显示窗口的句柄,一般为窗口的m_hWnd成员。
  238. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  239. /// \~english
  240. /// \brief Initialize the display module inside the SDK. The function must be called before calling @link #CameraDisplayRGB24 @endlink. If you use your own method for image display (do not call CameraDisplayRGB24) during secondary development, you do not need to call this function.
  241. /// \param [in] hCamera Camera handle.
  242. /// \param [in] hWndDisplay The handle of the display window, typically the m_hWnd member of the window.
  243. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  244. MVSDK_API CameraSdkStatus __stdcall CameraDisplayInit(
  245. CameraHandle hCamera,
  246. HWND hWndDisplay
  247. );
  248. /// @ingroup API_DISPLAY
  249. /// \~chinese
  250. /// \brief 显示图像。必须调用过@link #CameraDisplayInit @endlink进行初始化才能调用本函数。
  251. /// \param [in] hCamera 相机的句柄。
  252. /// \param [in] pFrameBuffer 图像的帧缓冲区
  253. /// \param [in] pFrInfo 图像的帧头信息
  254. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  255. /// \~english
  256. /// \brief Display the image. You must call @link #CameraDisplayInit @endlink before you can call this function.
  257. /// \param [in] hCamera Camera handle.
  258. /// \param [in] pFrameBuffer Image frame buffer
  259. /// \param [in] pFrInfo The frame header information of the image
  260. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  261. MVSDK_API CameraSdkStatus __stdcall CameraDisplayRGB24(
  262. CameraHandle hCamera,
  263. BYTE* pFrameBuffer,
  264. tSdkFrameHead* pFrInfo
  265. );
  266. /// @ingroup API_DISPLAY
  267. /// \~chinese
  268. /// \brief 设置显示的模式。
  269. /// \param [in] hCamera 相机的句柄。
  270. /// \param [in] iMode 显示模式,参见@link #emSdkDisplayMode @endlink的定义。
  271. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  272. /// \~english
  273. /// \brief Set the display mode.
  274. /// \param [in] hCamera Camera handle.
  275. /// \param [in] iMode Display mode, see @link #emSdkDisplayMode @endlink definition.
  276. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  277. MVSDK_API CameraSdkStatus __stdcall CameraSetDisplayMode(
  278. CameraHandle hCamera,
  279. INT iMode
  280. );
  281. /// @ingroup API_DISPLAY
  282. /// \~chinese
  283. /// \brief 设置显示的起始偏移值。仅当显示模式为DISPLAYMODE_REAL时有效。例如显示控件的大小为320X240,而图像的的尺寸为640X480,那么当iOffsetX = 160,iOffsetY = 120时显示的区域就是图像的居中320X240的位置。
  284. /// \param [in] hCamera 相机的句柄。
  285. /// \param [in] iOffsetX 偏移的X坐标。
  286. /// \param [in] iOffsetY 偏移的Y坐标。
  287. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  288. /// \~english
  289. /// \brief Set the starting offset of the display. This is valid only when the display mode is DISPLAY MODE_REAL. For example, the size of the display control is 320×240, and the size of the image is 640×480. When iOffsetX = 160 and iOffsetY = 120, the displayed area is the center 320×240 of the image.
  290. /// \param [in] hCamera Camera handle.
  291. /// \param [in] iOffsetX The offset's X coordinate.
  292. /// \param [in] iOffsetY The offset's Y coordinate.
  293. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  294. MVSDK_API CameraSdkStatus __stdcall CameraSetDisplayOffset(
  295. CameraHandle hCamera,
  296. int iOffsetX,
  297. int iOffsetY
  298. );
  299. /// @ingroup API_DISPLAY
  300. /// \~chinese
  301. /// \brief 设置显示控件的尺寸。
  302. /// \param [in] hCamera 相机的句柄。
  303. /// \param [in] iWidth 宽度
  304. /// \param [in] iHeight 高度
  305. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  306. /// \~english
  307. /// \brief Set the size of the display control.
  308. /// \param [in] hCamera Camera handle.
  309. /// \param [in] iWidth width
  310. /// \param [in] iHeight height
  311. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  312. MVSDK_API CameraSdkStatus __stdcall CameraSetDisplaySize(
  313. CameraHandle hCamera,
  314. INT iWidth,
  315. INT iHeight
  316. );
  317. /// @ingroup API_GRAB
  318. /// \~chinese
  319. /// \brief 获得一帧图像数据。为了提高效率,SDK在图像抓取时采用了零拷贝机制,本函数实际获得是内核中的一个缓冲区地址。
  320. /// \param [in] hCamera 相机的句柄。
  321. /// \param [out] pFrameInfo 图像的帧头信息指针。
  322. /// \param [out] pbyBuffer 返回图像数据的缓冲区指针。
  323. /// \param [in] wTimes 抓取图像的超时时间,单位毫秒。在wTimes时间内还未获得图像,则该函数会返回超时错误。
  324. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  325. /// \note 该函数成功调用后,必须调用@link CameraReleaseImageBuffer @endlink释放缓冲区,以便让内核继续使用该缓冲区。
  326. /// \~english
  327. /// \brief Get a frame of image data. To improve efficiency, the SDK uses a zero-copy mechanism for image capture. This function actually obtains a buffer address in the kernel.
  328. /// \param [in] hCamera Camera handle.
  329. /// \param [out] pFrameInfo The header information pointer of the image.
  330. /// \param [out] pbyBuffer Returns the buffer pointer of the image data.
  331. /// \param [in] wTimes Timeout for grabbing an image in milliseconds. The function returns a timeout error if no image has been obtained within wTimes.
  332. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  333. /// \note After the function is successfully called, @link CameraReleaseImageBuffer @endlink must be called to release the buffer so that the kernel can continue to use the buffer.
  334. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBuffer(
  335. CameraHandle hCamera,
  336. tSdkFrameHead* pFrameInfo,
  337. BYTE** pbyBuffer,
  338. UINT wTimes
  339. );
  340. /// @ingroup API_GRAB
  341. /// \~chinese
  342. /// \brief 获得一帧图像数据。该接口获得的图像数据是已经经过图像处理的数据。
  343. /// \param [in] hCamera 相机的句柄。
  344. /// \param [out] piWidth 整形指针,返回图像的宽度。
  345. /// \param [out] piHeight 整形指针,返回图像的高度。
  346. /// \param [in] wTimes 抓取图像的超时时间,单位毫秒。在wTimes时间内还未获得图像,则该函数会返回超时错误。
  347. /// \return 成功时,返回帧数据缓冲区的首地址,否则返回0。
  348. /// \note 本函数不需要调用@link CameraReleaseImageBuffer @endlink释放缓冲区。
  349. /// \~english
  350. /// \brief Get a frame of image data. The image data obtained by this interface is already image-processed data.
  351. /// \param [in] hCamera Camera handle.
  352. /// \param [out] piWidth returns the width of the image.
  353. /// \param [out] piHeight Returns the height of the image.
  354. /// \param [in] wTimes Timeout for grabbing an image in milliseconds. The function returns a timeout error if no image has been obtained within wTimes.
  355. /// \return On success, returns the first address of the frame data buffer, otherwise it returns 0.
  356. /// \note This function does not need to call @link CameraReleaseImageBuffer @endlink to release the buffer.
  357. MVSDK_API unsigned char* __stdcall CameraGetImageBufferEx(
  358. CameraHandle hCamera,
  359. INT* piWidth,
  360. INT* piHeight,
  361. UINT wTimes
  362. );
  363. /// @ingroup API_GRAB
  364. /// \~chinese
  365. /// \brief 抓拍一张图像到缓冲区中。相机会进入抓拍模式,并且自动切换到抓拍模式的分辨率进行图像捕获。
  366. /// \param [in] hCamera 相机的句柄。
  367. /// \param [out] pFrameInfo 图像的帧头信息指针。
  368. /// \param [out] pbyBuffer 返回图像数据的缓冲区指针。
  369. /// \param [in] wTimes 抓取图像的超时时间,单位毫秒。在wTimes时间内还未获得图像,则该函数会返回超时错误。
  370. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  371. /// \note 该函数成功调用后,必须调用@link CameraReleaseImageBuffer @endlink释放缓冲区,以便让内核继续使用该缓冲区。
  372. /// \warning 本函数可能会进行分辨率切换,因此效率会比@link #CameraGetImageBuffer @endlink低。如果没有切换分辨率抓拍的需求,请使用@link #CameraGetImageBuffer @endlink。
  373. /// \~english
  374. /// \brief Take an image into the buffer. The camera will enter snap mode and automatically switch to snap mode resolution for image capture.
  375. /// \param [in] hCamera Camera handle.
  376. /// \param [out] pFrameInfo The header information pointer of the image.
  377. /// \param [out] pbyBuffer Returns the buffer pointer of the image data.
  378. /// \param [in] wTimes Timeout for grabbing an image in milliseconds. The function returns a timeout error if no image has been obtained within wTimes.
  379. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  380. /// \note After the function is successfully called, @link CameraReleaseImageBuffer @endlink must be called to release the buffer so that the kernel can continue to use the buffer.
  381. /// \warning This function may switch the resolution, so the efficiency will be lower than @link #CameraGetImageBuffer @endlink. If you do not need to switch resolution capture, use @link #CameraGetImageBuffer @endlink.
  382. MVSDK_API CameraSdkStatus __stdcall CameraSnapToBuffer(
  383. CameraHandle hCamera,
  384. tSdkFrameHead* pFrameInfo,
  385. BYTE** pbyBuffer,
  386. UINT wTimes
  387. );
  388. /// @ingroup API_GRAB
  389. /// \~chinese
  390. /// \brief 抓拍一张JPEG格式图像到文件中。(仅部分相机硬件支持此功能)
  391. /// \param [in] hCamera 相机的句柄。
  392. /// \param [in] lpszFileName 图片保存文件完整路径。
  393. /// \param [in] byQuality 图像保存的质量因子,范围1到100。
  394. /// \param [in] wTimes 抓取图像的超时时间,单位毫秒。在wTimes时间内还未获得图像,则该函数会返回超时错误。
  395. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  396. /// \~english
  397. /// \brief Capture a JPEG format image into the file. (Only some camera hardware supports this function)
  398. /// \param [in] hCamera Handle of the camera.
  399. /// \param [in] lpszFileName The full path of the image file.
  400. /// \param [in] byQuality The quality factor of image saving, ranging from 1 to 100.
  401. /// \param [in] wTimes The timeout period for capturing images, in milliseconds. If the image is not obtained within wTimes, the function will return a timeout error.
  402. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  403. MVSDK_API CameraSdkStatus __stdcall CameraSnapJpegToFile(
  404. CameraHandle hCamera,
  405. char const* lpszFileName,
  406. BYTE byQuality,
  407. UINT wTimes
  408. );
  409. /// @ingroup API_GRAB
  410. /// \~chinese
  411. /// \brief 释放由@link #CameraGetImageBuffer @endlink获得的缓冲区。
  412. /// \param [in] hCamera 相机的句柄。
  413. /// \param [in] pbyBuffer 帧缓冲区地址。
  414. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  415. /// \~english
  416. /// \brief Releases the buffer obtained by @link #CameraGetImageBuffer @endlink.
  417. /// \param [in] hCamera Camera handle.
  418. /// \param [in] pbyBuffer Frame buffer address.
  419. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  420. MVSDK_API CameraSdkStatus __stdcall CameraReleaseImageBuffer(
  421. CameraHandle hCamera,
  422. BYTE* pbyBuffer
  423. );
  424. /// @ingroup API_PLAY_CTRL
  425. /// \~chinese
  426. /// \brief 让相机进入工作模式,开始接收来自相机发送的图像数据。
  427. /// \param [in] hCamera 相机的句柄。
  428. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  429. /// \~english
  430. /// \brief Put the camera into working mode and start receiving image data from the camera.
  431. /// \param [in] hCamera Camera handle.
  432. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  433. MVSDK_API CameraSdkStatus __stdcall CameraPlay(
  434. CameraHandle hCamera
  435. );
  436. /// @ingroup API_PLAY_CTRL
  437. /// \~chinese
  438. /// \brief 让相机进入暂停模式,不接收来自相机的图像数据,同时也会发送命令让相机暂停输出,释放传输带宽。暂停模式下,可以对相机的参数进行配置,并立即生效。
  439. /// \param [in] hCamera 相机的句柄。
  440. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  441. /// \~english
  442. /// \brief Put the camera into pause mode, do not receive image data from the camera, and also send a command to pause the camera output and release the transmission bandwidth. In pause mode, camera parameters can be configured and take effect immediately.
  443. /// \param [in] hCamera Camera handle.
  444. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  445. MVSDK_API CameraSdkStatus __stdcall CameraPause(
  446. CameraHandle hCamera
  447. );
  448. /// @ingroup API_PLAY_CTRL
  449. /// \~chinese
  450. /// \brief 让相机进入停止状态,一般是反初始化时调用该函数,该函数被调用,不能再对相机的参数进行配置。
  451. /// \param [in] hCamera 相机的句柄。
  452. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  453. /// \~english
  454. /// \brief Let the camera enter the stop state. Generally, this function is called when deinitializing. The function is called and the camera parameters cannot be configured.
  455. /// \param [in] hCamera Camera handle.
  456. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  457. MVSDK_API CameraSdkStatus __stdcall CameraStop(
  458. CameraHandle hCamera
  459. );
  460. /// @ingroup API_RECORD
  461. /// \~chinese
  462. /// \brief 初始化一次录像。
  463. /// \param [in] hCamera 相机的句柄。
  464. /// \param [in] iFormat 录像的格式(0:不压缩 1:MSCV方式压缩 4:H264)
  465. /// \param [in] pcSavePath 录像文件保存的路径。
  466. /// \param [in] b2GLimit 如果为TRUE,则文件大于2G时自动分割。(功能未实现)
  467. /// \param [in] dwQuality 录像的质量因子,越大,则质量越好。范围1到100.
  468. /// \param [in] iFrameRate 录像的帧率。建议设定的比实际采集帧率大,这样就不会漏帧。
  469. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  470. /// \~english
  471. /// \brief Initialize a video.
  472. /// \param [in] hCamera Camera handle.
  473. /// \param [in] iFormat Encoding format (0: no compression 1: MSCV compression 4: H264)
  474. /// \param [in] pcSavePath The path to save the video file.
  475. /// \param [in] b2GLimit If TRUE, the file is automatically split when it is larger than 2G. (Function not implemented)
  476. /// \param [in] dwQuality The larger the quality factor of the video, the better the quality. Range 1 to 100.
  477. /// \param [in] iFrameRate The frame rate of the video. It is recommended to set a larger frame rate than the actual acquisition so that no frames are missed.
  478. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  479. MVSDK_API CameraSdkStatus __stdcall CameraInitRecord(
  480. CameraHandle hCamera,
  481. int iFormat,
  482. char* pcSavePath,
  483. BOOL b2GLimit,
  484. DWORD dwQuality,
  485. int iFrameRate
  486. );
  487. /// @ingroup API_RECORD
  488. /// \~chinese
  489. /// \brief 结束本次录像。当@link #CameraInitRecord @endlink后,可以通过该函数来结束一次录像,并完成文件保存操作。
  490. /// \param [in] hCamera 相机的句柄。
  491. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  492. /// \~english
  493. /// \brief End this video. After @link #CameraInitRecord @endlink, you can use this function to end a video and complete the file save operation.
  494. /// \param [in] hCamera Camera handle.
  495. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  496. MVSDK_API CameraSdkStatus __stdcall CameraStopRecord(
  497. CameraHandle hCamera
  498. );
  499. /// @ingroup API_RECORD
  500. /// \~chinese
  501. /// \brief 将一帧数据存入录像流中。由于我们的帧头信息中携带了图像采集的时间戳信息,因此录像可以精准的时间同步,而不受帧率不稳定的影响。
  502. /// \param [in] hCamera 相机的句柄。
  503. /// \param [in] pbyImageBuffer 图像的数据缓冲区。
  504. /// \param [in] pFrInfo 图像的帧头信息。
  505. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  506. /// \~english
  507. /// \brief One frame of data is stored in the video stream. Since our frame header information carries the timestamp information of the image acquisition, the recording can be accurately time synchronized without being affected by the instability of the frame rate.
  508. /// \param [in] hCamera Camera handle.
  509. /// \param [in] pbyImageBuffer Image data buffer.
  510. /// \param [in] pFrInfo The frame header information of the image.
  511. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  512. MVSDK_API CameraSdkStatus __stdcall CameraPushFrame(
  513. CameraHandle hCamera,
  514. BYTE* pbyImageBuffer,
  515. tSdkFrameHead* pFrInfo
  516. );
  517. /// @ingroup API_SAVE_IMAGE
  518. /// \~chinese
  519. /// \brief 将图像缓冲区的数据保存成图片文件。
  520. /// \param [in] hCamera 相机的句柄。
  521. /// \param [in] lpszFileName 图片保存文件完整路径。
  522. /// \param [in] pbyImageBuffer 图像的数据缓冲区。
  523. /// \param [in] pFrInfo 图像的帧头信息。
  524. /// \param [in] byFileType 图像保存的格式。取值范围参见@link #emSdkFileType @endlink的定义。
  525. /// \param [in] byQuality 图像保存的质量因子,仅当保存为JPG格式时该参数有效,范围1到100。其余格式可以写成0。
  526. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  527. /// \note 目前支持 BMP、JPG、PNG、RAW四种格式。其中RAW表示相机输出的原始数据,保存RAW格式文件要求pbyImageBuffer和pFrInfo是由@link #CameraGetImageBuffer @endlink获得的数据,而且未经@link #CameraImageProcess @endlink转换成BMP格式;反之,如果要保存成BMP、JPG或者PNG格式,则pbyImageBuffer和pFrInfo是由@link #CameraImageProcess @endlink处理后的RGB格式数据。具体用法可以参考Advanced的例程。
  528. /// \~english
  529. /// \brief Save the image buffer data as a picture file.
  530. /// \param [in] hCamera Camera handle.
  531. /// \param [in] lpszFileName The picture saves the full path to the file.
  532. /// \param [in] pbyImageBuffer Image data buffer.
  533. /// \param [in] pFrInfo The frame header information of the image.
  534. /// \param [in] byFileType Image save format. See the definition of @link #emSdkFileType @endlink for the range of values.
  535. /// \param [in] byQuality The quality factor of the saved image. This parameter is valid only when saving in JPG format. The range is from 1 to 100. The rest of the format can be written as 0.
  536. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  537. /// \note Currently supports BMP, JPG, PNG, RAW four formats. Among them, RAW represents the raw data output by the camera. Saving RAW format files requires pbyImageBuffer and pFrInfo to be obtained by @link #CameraGetImageBuffer @endlink, and without @link #CameraImageProcess @endlink converting to BMP format; otherwise, if you want to save to BMP JPG or PNG format, pbyImageBuffer and pFrInfo are RGB format data processed by @link #CameraImageProcess @endlink. Specific usage can refer to Advanced's routines.
  538. MVSDK_API CameraSdkStatus __stdcall CameraSaveImage(
  539. CameraHandle hCamera,
  540. char* lpszFileName,
  541. BYTE* pbyImageBuffer,
  542. tSdkFrameHead* pFrInfo,
  543. UINT byFileType,
  544. BYTE byQuality
  545. );
  546. /// @ingroup API_SAVE_IMAGE
  547. /// \~chinese
  548. /// \brief 将图像缓冲区的数据保存成图片文件。
  549. /// \param [in] hCamera 相机的句柄。
  550. /// \param [in] lpszFileName 图片保存文件完整路径。
  551. /// \param [in] pbyImageBuffer 图像的数据缓冲区。
  552. /// \param [in] uImageFormat 0:8 BIT gray 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  553. /// \param [in] iWidth 图片宽度
  554. /// \param [in] iHeight 图片高度
  555. /// \param [in] byFileType 图像保存的格式。取值范围参见@link #emSdkFileType @endlink的定义。
  556. /// \param [in] byQuality 图像保存的质量因子,仅当保存为JPG格式时该参数有效,范围1到100。其余格式可以写成0。
  557. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  558. /// \note 与@link #CameraSaveImage @endlink相同
  559. /// \~english
  560. /// \brief Save the image buffer data as a picture file.
  561. /// \param [in] hCamera Camera handle.
  562. /// \param [in] lpszFileName The picture saves the full path to the file.
  563. /// \param [in] pbyImageBuffer Image data buffer.
  564. /// \param [in] uImageFormat 0:8 BIT gray 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  565. /// \param [in] iWidth width
  566. /// \param [in] iHeight height
  567. /// \param [in] byFileType Image save format. See the definition of @link #emSdkFileType @endlink for the range of values.
  568. /// \param [in] byQuality The quality factor of the saved image. This parameter is valid only when saving in JPG format. The range is from 1 to 100. The rest of the format can be written as 0.
  569. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  570. /// \note Same as @link #CameraSaveImage @endlink
  571. MVSDK_API CameraSdkStatus __stdcall CameraSaveImageEx(
  572. CameraHandle hCamera,
  573. char* lpszFileName,
  574. BYTE* pbyImageBuffer,
  575. UINT uImageFormat,
  576. int iWidth,
  577. int iHeight,
  578. UINT byFileType,
  579. BYTE byQuality
  580. );
  581. /// @ingroup API_ROI
  582. /// \~chinese
  583. /// \brief 获得当前预览的分辨率。
  584. /// \param [in] hCamera 相机的句柄。
  585. /// \param [out] psCurVideoSize 返回当前的分辨率。
  586. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  587. /// \~english
  588. /// \brief Get the current preview resolution.
  589. /// \param [in] hCamera Camera handle.
  590. /// \param [out] psCurVideoSize Returns the current resolution.
  591. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  592. MVSDK_API CameraSdkStatus __stdcall CameraGetImageResolution(
  593. CameraHandle hCamera,
  594. tSdkImageResolution* psCurVideoSize
  595. );
  596. /// @ingroup API_ROI
  597. /// \~chinese
  598. /// \brief 获得当前预览的分辨率。
  599. /// \param [in] hCamera 相机的句柄。
  600. /// \param [out] iIndex 索引号,[0,N]表示预设的分辨率(N 为预设分辨率的最大个数,一般不超过20),OXFF 表示自定义分辨率(ROI)
  601. /// \param [out] acDescription 该分辨率的描述信息。仅预设分辨率时该信息有效。自定义分辨率可忽略该信息
  602. /// \param [out] Mode 0: 普通模式 1:Sum 2:Average 3:Skip 4:Resample
  603. /// \param [out] ModeSize 普通模式下忽略,第1位表示2X2 第二位表示3X3 ...
  604. /// \param [out] x 水平偏移
  605. /// \param [out] y 垂直偏移
  606. /// \param [out] width 宽
  607. /// \param [out] height 高
  608. /// \param [out] ZoomWidth 最终输出时缩放宽度,0表示不缩放
  609. /// \param [out] ZoomHeight 最终输出时缩放高度,0表示不缩放
  610. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  611. /// \~english
  612. /// \brief Get the current preview resolution.
  613. /// \param [in] hCamera Camera handle.
  614. /// \param [out] iIndex Index number, [0,N] indicates the default resolution (N is the maximum number of preset resolutions, generally no more than 20), OXFF indicates custom resolution (ROI)
  615. /// \param [out] acDescription Descriptive information for this resolution. This information is valid only when the resolution is preset. Custom resolution ignores this information
  616. /// \param [out] Mode 0: Normal Mode 1:Sum 2:Average 3:Skip 4:Resample
  617. /// \param [out] ModeSize ignored in normal mode, the first bit represents 2X2 the second bit represents 3X3 ...
  618. /// \param [out] x horizontal offset
  619. /// \param [out] y vertical offset
  620. /// \param [out] width width
  621. /// \param [out] height high
  622. /// \param [out] ZoomWidth Scale width when final output, 0 means not zoom
  623. /// \param [out] ZoomHeight Scales the height of the final output, 0 means no scaling
  624. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  625. MVSDK_API CameraSdkStatus __stdcall CameraGetImageResolutionEx(
  626. CameraHandle hCamera,
  627. int* iIndex,
  628. char acDescription[32],
  629. int* Mode,
  630. UINT* ModeSize,
  631. int* x,
  632. int* y,
  633. int* width,
  634. int* height,
  635. int* ZoomWidth,
  636. int* ZoomHeight
  637. );
  638. /// @ingroup API_ROI
  639. /// \~chinese
  640. /// \brief 设置预览的分辨率。
  641. /// \param [in] hCamera 相机的句柄。
  642. /// \param [in] pImageResolution 新分辨率。
  643. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  644. /// \~english
  645. /// \brief Sets the resolution of the preview.
  646. /// \param [in] hCamera Camera handle.
  647. /// \param [in] pImageResolution New resolution.
  648. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  649. MVSDK_API CameraSdkStatus __stdcall CameraSetImageResolution(
  650. CameraHandle hCamera,
  651. tSdkImageResolution* pImageResolution
  652. );
  653. /// @ingroup API_ROI
  654. /// \~chinese
  655. /// \brief 获得当前预览的分辨率。
  656. /// \param [in] hCamera 相机的句柄。
  657. /// \param [in] iIndex 索引号,[0,N]表示预设的分辨率(N 为预设分辨率的最大个数,一般不超过20),OXFF 表示自定义分辨率(ROI)
  658. /// \param [in] Mode 0: 普通模式 1:Sum 2:Average 3:Skip 4:Resample
  659. /// \param [in] ModeSize 普通模式下忽略,第1位表示2X2 第二位表示3X3 ...
  660. /// \param [in] x 水平偏移
  661. /// \param [in] y 垂直偏移
  662. /// \param [in] width 宽
  663. /// \param [in] height 高
  664. /// \param [in] ZoomWidth 最终输出时缩放宽度,0表示不缩放
  665. /// \param [in] ZoomHeight 最终输出时缩放高度,0表示不缩放
  666. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  667. /// \~english
  668. /// \brief Get the current preview resolution.
  669. /// \param [in] hCamera Camera handle.
  670. /// \param [in] iIndex Index number, [0,N] indicates the default resolution (N is the maximum number of preset resolutions, generally no more than 20), OXFF indicates custom resolution (ROI)
  671. /// \param [in] Mode 0: Normal Mode 1:Sum 2:Average 3:Skip 4:Resample
  672. /// \param [in] ModeSize ignored in normal mode, the first bit represents 2X2 the second bit represents 3X3 ...
  673. /// \param [in] x horizontal offset
  674. /// \param [in] y vertical offset
  675. /// \param [in] width width
  676. /// \param [in] height high
  677. /// \param [in] ZoomWidth Scale width when final output, 0 means not zoom
  678. /// \param [in] ZoomHeight Scales the height of the final output, 0 means no scaling
  679. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  680. MVSDK_API CameraSdkStatus __stdcall CameraSetImageResolutionEx(
  681. CameraHandle hCamera,
  682. int iIndex,
  683. int Mode,
  684. UINT ModeSize,
  685. int x,
  686. int y,
  687. int width,
  688. int height,
  689. int ZoomWidth,
  690. int ZoomHeight
  691. );
  692. /// @ingroup API_ADVANCE
  693. /// \~chinese
  694. /// \brief 获得相机当前输出原始数据的格式索引号。
  695. /// \param [in] hCamera 相机的句柄。
  696. /// \param [out] piMediaType 返回当前格式类型的索引号。
  697. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  698. /// \note 在@link #tSdkCameraCapbility.pMediaTypeDesc @endlink成员中,以数组的形式保存了相机支持的格式,piMediaType所指向的索引号,就是该数组的索引号。
  699. /// \~english
  700. /// \brief Gets the format index number of the camera's current output raw data.
  701. /// \param [in] hCamera Camera handle.
  702. /// \param [out] piMediaType Returns the index of the current format type.
  703. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  704. /// \note In the @link #tSdkCameraCapbility.pMediaTypeDesc @endlink member, the format supported by the camera is saved as an array. The index number pointed to by piMediaType is the index number of the array.
  705. MVSDK_API CameraSdkStatus __stdcall CameraGetMediaType(
  706. CameraHandle hCamera,
  707. INT* piMediaType
  708. );
  709. /// @ingroup API_ADVANCE
  710. /// \~chinese
  711. /// \brief 设置相机的输出原始数据格式。
  712. /// \param [in] hCamera 相机的句柄。
  713. /// \param [in] iMediaType 新格式类型的索引号。
  714. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  715. /// \note 与@link #CameraGetMediaType @endlink相同。
  716. /// \~english
  717. /// \brief Sets the camera's output raw data format.
  718. /// \param [in] hCamera Camera handle.
  719. /// \param [in] iMediaType The index number of the new format type.
  720. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  721. /// \note Same as @link #CameraGetMediaType @endlink.
  722. MVSDK_API CameraSdkStatus __stdcall CameraSetMediaType(
  723. CameraHandle hCamera,
  724. INT iMediaType
  725. );
  726. /// @ingroup API_ADVANCE
  727. /// \~chinese
  728. /// \brief 获取RAW数据的最大有效位数
  729. /// \param [in] hCamera 相机的句柄。
  730. /// \param [out] pMaxAvailBits 返回RAW的最大有效位数
  731. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  732. /// \~english
  733. /// \brief Get the maximum number of significant bits of RAW data
  734. /// \param [in] hCamera Camera handle.
  735. /// \param [out] pMaxAvailBits returns the maximum number of significant bits of RAW data
  736. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  737. MVSDK_API CameraSdkStatus __stdcall CameraGetRawMaxAvailBits(
  738. CameraHandle hCamera,
  739. int* pMaxAvailBits
  740. );
  741. /// @ingroup API_ADVANCE
  742. /// \~chinese
  743. /// \brief 设置RAW数据的输出起始位
  744. /// \param [in] hCamera 相机的句柄。
  745. /// \param [in] startBit 起始BIT(默认输出高8位)
  746. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  747. /// \~english
  748. /// \brief Set the output start bit of RAW data
  749. /// \param [in] hCamera Camera handle.
  750. /// \param [in] startBit Start BIT (The high 8 bits are output by default)
  751. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  752. MVSDK_API CameraSdkStatus __stdcall CameraSetRawStartBit(
  753. CameraHandle hCamera,
  754. int startBit
  755. );
  756. /// @ingroup API_ADVANCE
  757. /// \~chinese
  758. /// \brief 获取RAW数据的输出起始位
  759. /// \param [in] hCamera 相机的句柄。
  760. /// \param [out] startBit 起始BIT
  761. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  762. /// \~english
  763. /// \brief Get the output start bit of RAW data
  764. /// \param [in] hCamera Camera handle.
  765. /// \param [out] startBit Start BIT
  766. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  767. MVSDK_API CameraSdkStatus __stdcall CameraGetRawStartBit(
  768. CameraHandle hCamera,
  769. int* startBit
  770. );
  771. /// @ingroup API_EXPOSURE
  772. /// \~chinese
  773. /// \brief 设置相机曝光的模式。自动或者手动。
  774. /// \param [in] hCamera 相机的句柄。
  775. /// \param [in] bAeState TRUE:自动曝光;FALSE:手动曝光。
  776. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  777. /// \~english
  778. /// \brief Set the camera exposure mode. Automatic or manual.
  779. /// \param [in] hCamera Camera handle.
  780. /// \param [in] bAeState TRUE: Auto exposure; FALSE: Manual exposure.
  781. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  782. MVSDK_API CameraSdkStatus __stdcall CameraSetAeState(
  783. CameraHandle hCamera,
  784. BOOL bAeState
  785. );
  786. /// @ingroup API_EXPOSURE
  787. /// \~chinese
  788. /// \brief 获得相机当前的曝光模式。
  789. /// \param [in] hCamera 相机的句柄。
  790. /// \param [out] pAeState 返回自动曝光的使能状态。
  791. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  792. /// \~english
  793. /// \brief Get the camera's current exposure mode.
  794. /// \param [in] hCamera Camera handle.
  795. /// \param [out] pAeState Returns the auto exposure's enable state.
  796. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  797. MVSDK_API CameraSdkStatus __stdcall CameraGetAeState(
  798. CameraHandle hCamera,
  799. BOOL* pAeState
  800. );
  801. /// @ingroup API_ENHANCE
  802. /// \~chinese
  803. /// \brief 设置图像的处理的锐化参数。
  804. /// \param [in] hCamera 相机的句柄。
  805. /// \param [in] iSharpness 锐化参数,一般是[0,100],0表示关闭锐化处理。
  806. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  807. /// \~english
  808. /// \brief Sets the sharpening parameters for the processing of the image.
  809. /// \param [in] hCamera Camera handle.
  810. /// \param [in] iSharpness Sharpen parameter, generally [0,100], 0 means close sharpening.
  811. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  812. MVSDK_API CameraSdkStatus __stdcall CameraSetSharpness(
  813. CameraHandle hCamera,
  814. int iSharpness
  815. );
  816. /// @ingroup API_ENHANCE
  817. /// \~chinese
  818. /// \brief 获取当前锐化设定值。
  819. /// \param [in] hCamera 相机的句柄。
  820. /// \param [out] piSharpness 返回当前设定的锐化的设定值。
  821. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  822. /// \~english
  823. /// \brief Gets the current sharpening setting.
  824. /// \param [in] hCamera Camera handle.
  825. /// \param [out] piSharpness Returns the currently set sharpened setting.
  826. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  827. MVSDK_API CameraSdkStatus __stdcall CameraGetSharpness(
  828. CameraHandle hCamera,
  829. int* piSharpness
  830. );
  831. /// @ingroup API_ENHANCE
  832. /// \~chinese
  833. /// \brief 设置相机的查表变换模式LUT模式。
  834. /// \param [in] hCamera 相机的句柄。
  835. /// \param [in] emLutMode 定义参考@link #emSdkLutMode @endlink类型。
  836. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  837. /// \~english
  838. /// \brief Set the camera's lookup table transformation mode LUT mode.
  839. /// \param [in] hCamera Camera handle.
  840. /// \param [in] emLutMode Defines the reference @link #emSdkLutMode @endlink type.
  841. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  842. MVSDK_API CameraSdkStatus __stdcall CameraSetLutMode(
  843. CameraHandle hCamera,
  844. int emLutMode
  845. );
  846. /// @ingroup API_ENHANCE
  847. /// \~chinese
  848. /// \brief 获得相机的查表变换模式LUT模式。
  849. /// \param [in] hCamera 相机的句柄。
  850. /// \param [out] pemLutMode 返回当前LUT模式。
  851. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  852. /// \~english
  853. /// \brief Obtain the look-up table conversion mode LUT mode of the camera.
  854. /// \param [in] hCamera Camera handle.
  855. /// \param [out] pemLutMode Returns the current LUT mode.
  856. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  857. MVSDK_API CameraSdkStatus __stdcall CameraGetLutMode(
  858. CameraHandle hCamera,
  859. int* pemLutMode
  860. );
  861. /// @ingroup API_ENHANCE
  862. /// \~chinese
  863. /// \brief 选择预设LUT模式下的LUT表。
  864. /// \param [in] hCamera 相机的句柄。
  865. /// \param [in] iSel 表的索引号。表的个数由@link #tSdkCameraCapbility.iPresetLut @endlink获得。
  866. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  867. /// \note 必须先使用@link #CameraSetLutMode @endlink将LUT模式设置为预设模式。
  868. /// \~english
  869. /// \brief Select the LUT table in the preset LUT mode.
  870. /// \param [in] hCamera Camera handle.
  871. /// \param [in] iSel The index number of the lut table. The number of tables is obtained by @link #tSdkCameraCapbility.iPresetLut @endlink.
  872. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  873. /// \note Must use @link #CameraSetLutMode @endlink to set LUT mode to preset mode.
  874. MVSDK_API CameraSdkStatus __stdcall CameraSelectLutPreset(
  875. CameraHandle hCamera,
  876. int iSel
  877. );
  878. /// @ingroup API_ENHANCE
  879. /// \~chinese
  880. /// \brief 获得预设LUT模式下的LUT表索引号。
  881. /// \param [in] hCamera 相机的句柄。
  882. /// \param [out] piSel 返回表的索引号。
  883. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  884. /// \~english
  885. /// \brief The LUT table index number in the preset LUT mode is obtained.
  886. /// \param [in] hCamera Camera handle.
  887. /// \param [out] piSel Returns the index number of the table.
  888. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  889. MVSDK_API CameraSdkStatus __stdcall CameraGetLutPresetSel(
  890. CameraHandle hCamera,
  891. int* piSel
  892. );
  893. /// @ingroup API_ENHANCE
  894. /// \~chinese
  895. /// \brief 设置自定义的LUT表。
  896. /// \param [in] hCamera 相机的句柄。
  897. /// \param [in] iChannel 指定要设定的LUT颜色通道,当为@link #LUT_CHANNEL_ALL @endlink时,三个通道的LUT将被同时替换。@see emSdkLutChannel
  898. /// \param [in] pLut 指针,指向LUT表的地址。LUT表为无符号短整形数组,数组大小为4096,分别代码颜色通道从0到4096(12bit颜色精度)对应的映射值。
  899. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  900. /// \note 必须先使用@link #CameraSetLutMode @endlink将LUT模式设置为自定义模式。
  901. /// \~english
  902. /// \brief Set up a custom LUT table.
  903. /// \param [in] hCamera Camera handle.
  904. /// \param [in] iChannel Specifies the LUT color channel to be set. When @link #LUT_CHANNEL_ALL @endlink, the three-channel LUTs will be replaced at the same time. @see emSdkLutChannel
  905. /// \param [in] pLut pointer to the address of the LUT table. The LUT table is an unsigned short integer array, and the array size is 4096, which is the mapping value corresponding to the code color channel from 0 to 4096 (12 bit color accuracy).
  906. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  907. /// \note You must use @link #CameraSetLutMode @endlink to set the LUT mode to custom mode.
  908. MVSDK_API CameraSdkStatus __stdcall CameraSetCustomLut(
  909. CameraHandle hCamera,
  910. int iChannel,
  911. USHORT* pLut
  912. );
  913. /// @ingroup API_ENHANCE
  914. /// \~chinese
  915. /// \brief 获得当前使用的自定义LUT表。
  916. /// \param [in] hCamera 相机的句柄。
  917. /// \param [in] iChannel 指定要获取的LUT颜色通道,当为@link #LUT_CHANNEL_ALL @endlink时,返回红色通道的LUT表。@see emSdkLutChannel
  918. /// \param [out] pLut 指向LUT表的地址。LUT表为无符号短整形数组,数组大小为4096,分别代码颜色通道从0到4096(12bit颜色精度)对应的映射值。
  919. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  920. /// \~english
  921. /// \brief Get the currently used custom LUT table.
  922. /// \param [in] hCamera Camera handle.
  923. /// \param [in] iChannel Specifies the LUT color channel to be obtained. When @link #LUT_CHANNEL_ALL @endlink, returns the LUT table of the red channel. @see emSdkLutChannel
  924. /// \param [out] pLut points to the address of the LUT table. The LUT table is an unsigned short integer array, and the array size is 4096, which is the mapping value corresponding to the code color channel from 0 to 4096 (12 bit color accuracy).
  925. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  926. MVSDK_API CameraSdkStatus __stdcall CameraGetCustomLut(
  927. CameraHandle hCamera,
  928. int iChannel,
  929. USHORT* pLut
  930. );
  931. /// @ingroup API_ENHANCE
  932. /// \~chinese
  933. /// \brief 获得相机当前的LUT表,在任何LUT模式下都可以调用,用来直观的观察LUT曲线的变化。
  934. /// \param [in] hCamera 相机的句柄。
  935. /// \param [in] iChannel 指定要获取的LUT颜色通道,当为@link #LUT_CHANNEL_ALL @endlink时,返回红色通道的LUT表。@see emSdkLutChannel
  936. /// \param [out] pLut 指向LUT表的地址。LUT表为无符号短整形数组,数组大小为4096,分别代码颜色通道从0到4096(12bit颜色精度)对应的映射值。
  937. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  938. /// \~english
  939. /// \brief Obtain the camera's current LUT table, which can be called in any LUT mode, to intuitively observe changes in the LUT curve.
  940. /// \param [in] hCamera Camera handle.
  941. /// \param [in] iChannel Specifies the LUT color channel to be obtained. When @link #LUT_CHANNEL_ALL @endlink, returns the LUT table of the red channel. @see emSdkLutChannel
  942. /// \param [out] pLut points to the address of the LUT table. The LUT table is an unsigned short integer array, and the array size is 4096, which is the mapping value corresponding to the code color channel from 0 to 4096 (12 bit color accuracy).
  943. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  944. MVSDK_API CameraSdkStatus __stdcall CameraGetCurrentLut(
  945. CameraHandle hCamera,
  946. int iChannel,
  947. USHORT* pLut
  948. );
  949. /// @ingroup API_COLOR
  950. /// \~chinese
  951. /// \brief 设置相机白平衡模式。分为手动和自动两种方式。
  952. /// \param [in] hCamera 相机的句柄。
  953. /// \param [in] bAuto TRUE,则表示使能自动模式。 FALSE,则表示使用手动模式,通过调用@link #CameraSetOnceWB @endlink来进行一次白平衡。
  954. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  955. /// \~english
  956. /// \brief Set camera white balance mode. Divided into manual and automatic two ways.
  957. /// \param [in] hCamera Camera handle.
  958. /// \param [in] bAuto TRUE to enable auto mode. FALSE indicates that using manual mode, a white balance is performed by calling @link #CameraSetOnceWB @endlink.
  959. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  960. MVSDK_API CameraSdkStatus __stdcall CameraSetWbMode(
  961. CameraHandle hCamera,
  962. BOOL bAuto
  963. );
  964. /// @ingroup API_COLOR
  965. /// \~chinese
  966. /// \brief 获得当前的白平衡模式。
  967. /// \param [in] hCamera 相机的句柄。
  968. /// \param [out] pbAuto 指针,返回TRUE表示自动模式,FALSE为手动模式。
  969. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  970. /// \~english
  971. /// \brief Get the current white balance mode.
  972. /// \param [in] hCamera Camera handle.
  973. /// \param [out] pbAuto pointer, return TRUE for automatic mode, FALSE for manual mode.
  974. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  975. MVSDK_API CameraSdkStatus __stdcall CameraGetWbMode(
  976. CameraHandle hCamera,
  977. BOOL* pbAuto
  978. );
  979. /// @ingroup API_COLOR
  980. /// \~chinese
  981. /// \brief 选择指定预设色温模式
  982. /// \param [in] hCamera 相机的句柄。
  983. /// \param [in] iSel 预设色温的模式索引号,从0开始
  984. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  985. /// \note 调用@link #CameraSetClrTempMode @endlink设置为预设模式。
  986. /// \~english
  987. /// \brief Select the specified preset color temperature mode
  988. /// \param [in] hCamera Camera handle.
  989. /// \param [in] iSel The mode index number of the preset color temperature, starting from 0
  990. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  991. /// \note Call @link #CameraSetClrTempMode @endlink set to preset mode.
  992. MVSDK_API CameraSdkStatus __stdcall CameraSetPresetClrTemp(
  993. CameraHandle hCamera,
  994. int iSel
  995. );
  996. /// @ingroup API_COLOR
  997. /// \~chinese
  998. /// \brief 获得当前选择的预设色温模式。
  999. /// \param [in] hCamera 相机的句柄。
  1000. /// \param [out] piSel 返回选择的预设色温索引号
  1001. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1002. /// \~english
  1003. /// \brief Get the currently selected preset color temperature mode.
  1004. /// \param [in] hCamera Camera handle.
  1005. /// \param [out] piSel Returns the selected preset color temperature index number
  1006. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1007. MVSDK_API CameraSdkStatus __stdcall CameraGetPresetClrTemp(
  1008. CameraHandle hCamera,
  1009. int* piSel
  1010. );
  1011. /// @ingroup API_COLOR
  1012. /// \~chinese
  1013. /// \brief 设置自定义色温模式下的数字增益
  1014. /// \param [in] hCamera 相机的句柄。
  1015. /// \param [in] iRgain 红色增益,范围0到400,表示0到4倍
  1016. /// \param [in] iGgain 绿色增益,范围0到400,表示0到4倍
  1017. /// \param [in] iBgain 蓝色增益,范围0到400,表示0到4倍
  1018. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1019. /// \note 调用@link #CameraSetClrTempMode @endlink设置为自定义模式。
  1020. /// \~english
  1021. /// \brief Set digital gain in custom color temperature mode
  1022. /// \param [in] hCamera Camera handle.
  1023. /// \param [in] iRgain Red gain, range 0 to 400, 0 to 4 times
  1024. /// \param [in] iGgain Green gain, range 0 to 400, 0 to 4 times
  1025. /// \param [in] iBgain Blue gain, range 0 to 400, 0 to 4 times
  1026. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1027. /// \note Call @link #CameraSetClrTempMode @endlink set to custom mode.
  1028. MVSDK_API CameraSdkStatus __stdcall CameraSetUserClrTempGain(
  1029. CameraHandle hCamera,
  1030. int iRgain,
  1031. int iGgain,
  1032. int iBgain
  1033. );
  1034. /// @ingroup API_COLOR
  1035. /// \~chinese
  1036. /// \brief 获得自定义色温模式下的数字增益
  1037. /// \param [in] hCamera 相机的句柄。
  1038. /// \param [out] piRgain 指针,返回红色增益,范围0到400,表示0到4倍
  1039. /// \param [out] piGgain 指针,返回绿色增益,范围0到400,表示0到4倍
  1040. /// \param [out] piBgain 指针,返回蓝色增益,范围0到400,表示0到4倍
  1041. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1042. /// \~english
  1043. /// \brief Get digital gain in custom color temperature mode
  1044. /// \param [in] hCamera Camera handle.
  1045. /// \param [out] piRgain pointer, returning red gain, range 0 to 400, 0 to 4 times
  1046. /// \param [out] piGgain pointer, return green gain, range 0 to 400, 0 to 4 times
  1047. /// \param [out] piBgain pointer, returns blue gain, range 0 to 400, 0 to 4 times
  1048. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1049. MVSDK_API CameraSdkStatus __stdcall CameraGetUserClrTempGain(
  1050. CameraHandle hCamera,
  1051. int* piRgain,
  1052. int* piGgain,
  1053. int* piBgain
  1054. );
  1055. /// @ingroup API_COLOR
  1056. /// \~chinese
  1057. /// \brief 设置自定义色温模式下的颜色矩阵
  1058. /// \param [in] hCamera 相机的句柄。
  1059. /// \param [in] pMatrix 指向一个float[3][3]数组的首地址
  1060. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1061. /// \note 调用@link #CameraSetClrTempMode @endlink设置为自定义模式。
  1062. /// \~english
  1063. /// \brief Set the color matrix in custom color temperature mode
  1064. /// \param [in] hCamera Camera handle.
  1065. /// \param [in] pMatrix points to the first address of an array of float[3][3]
  1066. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1067. /// \note Call @link #CameraSetClrTempMode @endlink set to custom mode.
  1068. MVSDK_API CameraSdkStatus __stdcall CameraSetUserClrTempMatrix(
  1069. CameraHandle hCamera,
  1070. float* pMatrix
  1071. );
  1072. /// @ingroup API_COLOR
  1073. /// \~chinese
  1074. /// \brief 获得自定义色温模式下的颜色矩阵
  1075. /// \param [in] hCamera 相机的句柄。
  1076. /// \param [out] pMatrix 指向一个float[3][3]数组的首地址
  1077. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1078. /// \~english
  1079. /// \brief Get the color matrix in a custom color temperature mode
  1080. /// \param [in] hCamera Camera handle.
  1081. /// \param [out] pMatrix points to the first address of an array of float[3][3]
  1082. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1083. MVSDK_API CameraSdkStatus __stdcall CameraGetUserClrTempMatrix(
  1084. CameraHandle hCamera,
  1085. float* pMatrix
  1086. );
  1087. /// @ingroup API_COLOR
  1088. /// \~chinese
  1089. /// \brief 设置白平衡时使用的色温模式
  1090. /// \param [in] hCamera 相机的句柄。
  1091. /// \param [in] iMode 模式,只能是@link #emSdkClrTmpMode @endlink中定义的一种
  1092. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1093. /// \note 支持的模式有三种,分别是自动,预设和自定义。
  1094. /// \note 自动模式下,会自动选择合适的色温模式
  1095. /// \note 预设模式下,会使用用户指定的色温模式
  1096. /// \note 自定义模式下,使用用户自定义的色温数字增益和矩阵
  1097. /// \~english
  1098. /// \brief Color temperature mode used when setting white balance
  1099. /// \param [in] hCamera Camera handle.
  1100. /// \param [in] iMode mode, can only be defined by @link #emSdkClrTmpMode @endlink
  1101. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1102. /// \note There are three supported modes, automatic, preset, and custom.
  1103. /// \note Automatic mode will automatically select the appropriate color temperature mode
  1104. /// \note In preset mode, user-specified color temperature mode is used
  1105. /// \note custom-defined color temperature digital gain and matrix
  1106. MVSDK_API CameraSdkStatus __stdcall CameraSetClrTempMode(
  1107. CameraHandle hCamera,
  1108. int iMode
  1109. );
  1110. /// @ingroup API_COLOR
  1111. /// \~chinese
  1112. /// \brief 获得白平衡时使用的色温模式。参考@link #CameraSetClrTempMode @endlink中功能描述部分。
  1113. /// \param [in] hCamera 相机的句柄。
  1114. /// \param [out] pimode 指针,返回模式选择,参考@link #emSdkClrTmpMode @endlink类型定义
  1115. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1116. /// \~english
  1117. /// \brief The color temperature mode used when obtaining white balance. Refer to the function description section of @link #CameraSetClrTempMode @endlink.
  1118. /// \param [in] hCamera Camera handle.
  1119. /// \param [out] pimode pointer, return mode selection, reference @link #emSdkClrTmpMode @endlink type definition
  1120. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1121. MVSDK_API CameraSdkStatus __stdcall CameraGetClrTempMode(
  1122. CameraHandle hCamera,
  1123. int* pimode
  1124. );
  1125. /// @ingroup API_COLOR
  1126. /// \~chinese
  1127. /// \brief 在手动白平衡模式下,调用该函数会进行一次白平衡。生效的时间为接收到下一帧图像数据时。
  1128. /// \param [in] hCamera 相机的句柄。
  1129. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1130. /// \~english
  1131. /// \brief In manual white balance mode, calling this function will perform a white balance. The effective time is when the next frame of image data is received.
  1132. /// \param [in] hCamera Camera handle.
  1133. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1134. MVSDK_API CameraSdkStatus __stdcall CameraSetOnceWB(
  1135. CameraHandle hCamera
  1136. );
  1137. /// @ingroup API_COLOR
  1138. /// \~chinese
  1139. /// \brief 执行一次黑平衡操作。(需要相机支持本功能)
  1140. /// \param [in] hCamera 相机的句柄。
  1141. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1142. /// \~english
  1143. /// \brief Performs a black balance operation. (Requires camera support for this feature)
  1144. /// \param [in] hCamera Camera handle.
  1145. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1146. MVSDK_API CameraSdkStatus __stdcall CameraSetOnceBB(
  1147. CameraHandle hCamera
  1148. );
  1149. /// @ingroup API_EXPOSURE
  1150. /// \~chinese
  1151. /// \brief 设定自动曝光的亮度目标值。设定范围[@link #tSdkExpose.uiTargetMin @endlink, @link #tSdkExpose.uiTargetMax @endlink]
  1152. /// \param [in] hCamera 相机的句柄。
  1153. /// \param [in] iAeTarget 亮度目标值。
  1154. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1155. /// \~english
  1156. /// \brief Sets the brightness target for auto exposure. Setting range [@link #tSdkExpose.uiTargetMin @endlink, @link #tSdkExpose.uiTargetMax @endlink]
  1157. /// \param [in] hCamera Camera handle.
  1158. /// \param [in] iAeTarget Brightness target value.
  1159. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1160. MVSDK_API CameraSdkStatus __stdcall CameraSetAeTarget(
  1161. CameraHandle hCamera,
  1162. int iAeTarget
  1163. );
  1164. /// @ingroup API_EXPOSURE
  1165. /// \~chinese
  1166. /// \brief 获得自动曝光的亮度目标值。
  1167. /// \param [in] hCamera 相机的句柄。
  1168. /// \param [out] piAeTarget 指针,返回目标值。
  1169. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1170. /// \~english
  1171. /// \brief Get the auto exposure's brightness target value.
  1172. /// \param [in] hCamera Camera handle.
  1173. /// \param [out] piAeTarget pointer, return target value.
  1174. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1175. MVSDK_API CameraSdkStatus __stdcall CameraGetAeTarget(
  1176. CameraHandle hCamera,
  1177. int* piAeTarget
  1178. );
  1179. /// @ingroup API_EXPOSURE
  1180. /// \~chinese
  1181. /// \brief 设定自动曝光模式的曝光时间调节范围
  1182. /// \param [in] hCamera 相机的句柄。
  1183. /// \param [in] fMinExposureTime 最小曝光时间(微秒)
  1184. /// \param [in] fMaxExposureTime 最大曝光时间(微秒)
  1185. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1186. /// \~english
  1187. /// \brief Setting the exposure time adjustment range of the automatic exposure mode
  1188. /// \param [in] hCamera Camera handle.
  1189. /// \param [in] fMinExposureTime Minimum exposure time (microseconds)
  1190. /// \param [in] fMaxExposureTime Maximum exposure time (microseconds)
  1191. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1192. MVSDK_API CameraSdkStatus __stdcall CameraSetAeExposureRange(
  1193. CameraHandle hCamera,
  1194. double fMinExposureTime,
  1195. double fMaxExposureTime
  1196. );
  1197. /// @ingroup API_EXPOSURE
  1198. /// \~chinese
  1199. /// \brief 获得自动曝光模式的曝光时间调节范围
  1200. /// \param [in] hCamera 相机的句柄。
  1201. /// \param [out] fMinExposureTime 最小曝光时间(微秒)
  1202. /// \param [out] fMaxExposureTime 最大曝光时间(微秒)
  1203. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1204. /// \~english
  1205. /// \brief Exposure time adjustment range for automatic exposure mode
  1206. /// \param [in] hCamera Camera handle.
  1207. /// \param [out] fMinExposureTime Minimum exposure time (microseconds)
  1208. /// \param [out] fMaxExposureTime Maximum exposure time (microseconds)
  1209. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1210. MVSDK_API CameraSdkStatus __stdcall CameraGetAeExposureRange(
  1211. CameraHandle hCamera,
  1212. double* fMinExposureTime,
  1213. double* fMaxExposureTime
  1214. );
  1215. /// @ingroup API_EXPOSURE
  1216. /// \~chinese
  1217. /// \brief 设定自动曝光模式的增益调节范围
  1218. /// \param [in] hCamera 相机的句柄。
  1219. /// \param [in] iMinAnalogGain 最小增益
  1220. /// \param [in] iMaxAnalogGain 最大增益
  1221. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1222. /// \~english
  1223. /// \brief Setting the gain adjustment range of the automatic exposure mode
  1224. /// \param [in] hCamera Camera handle.
  1225. /// \param [in] iMinAnalogGain minimum gain
  1226. /// \param [in] iMaxAnalogGain maximum gain
  1227. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1228. MVSDK_API CameraSdkStatus __stdcall CameraSetAeAnalogGainRange(
  1229. CameraHandle hCamera,
  1230. int iMinAnalogGain,
  1231. int iMaxAnalogGain
  1232. );
  1233. /// @ingroup API_EXPOSURE
  1234. /// \~chinese
  1235. /// \brief 获得自动曝光模式的增益调节范围
  1236. /// \param [in] hCamera 相机的句柄。
  1237. /// \param [out] iMinAnalogGain 最小增益
  1238. /// \param [out] iMaxAnalogGain 最大增益
  1239. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1240. /// \~english
  1241. /// \brief Gain adjustment range for automatic exposure mode
  1242. /// \param [in] hCamera Camera handle.
  1243. /// \param [out] iMinAnalogGain minimum gain
  1244. /// \param [out] iMaxAnalogGain maximum gain
  1245. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1246. MVSDK_API CameraSdkStatus __stdcall CameraGetAeAnalogGainRange(
  1247. CameraHandle hCamera,
  1248. int* iMinAnalogGain,
  1249. int* iMaxAnalogGain
  1250. );
  1251. /// @ingroup API_EXPOSURE
  1252. /// \~chinese
  1253. /// \brief 设置自动曝光模式的调节阈值
  1254. /// \param [in] hCamera 相机的句柄。
  1255. /// \param [in] iThreshold 如果 abs(目标亮度-图像亮度) < iThreshold 则停止自动调节
  1256. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1257. /// \~english
  1258. /// \brief Set the adjustment threshold for auto exposure mode
  1259. /// \param [in] hCamera Camera handle.
  1260. /// \param [in] iThreshold Stops automatic adjustment if abs (target brightness - image brightness) < iThreshold
  1261. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1262. MVSDK_API CameraSdkStatus __stdcall CameraSetAeThreshold(
  1263. CameraHandle hCamera,
  1264. int iThreshold
  1265. );
  1266. /// @ingroup API_EXPOSURE
  1267. /// \~chinese
  1268. /// \brief 获取自动曝光模式的调节阈值
  1269. /// \param [in] hCamera 相机的句柄。
  1270. /// \param [out] iThreshold 读取到的调节阈值
  1271. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1272. /// \~english
  1273. /// \brief Get adjustment threshold for auto exposure mode
  1274. /// \param [in] hCamera Camera handle.
  1275. /// \param [out] iThreshold Read Threshold
  1276. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1277. MVSDK_API CameraSdkStatus __stdcall CameraGetAeThreshold(
  1278. CameraHandle hCamera,
  1279. int* iThreshold
  1280. );
  1281. /// @ingroup API_EXPOSURE
  1282. /// \~chinese
  1283. /// \brief 设置曝光时间。单位为微秒。
  1284. /// \param [in] hCamera 相机的句柄。
  1285. /// \param [in] fExposureTime 曝光时间,单位微秒。
  1286. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1287. /// \note 对于CMOS传感器,其曝光的单位是按照行来计算的,因此,曝光时间并不能在微秒级别连续可调。而是会按照整行来取舍。在调用本函数设定曝光时间后,建议再调用@link #CameraGetExposureTime @endlink来获得实际设定的值。
  1288. /// \~english
  1289. /// \brief Set the exposure time. The unit is microseconds.
  1290. /// \param [in] hCamera Camera handle.
  1291. /// \param [in] fExposureTime Exposure time in microseconds.
  1292. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1293. /// \note For CMOS sensors, the unit of exposure is calculated in rows, so the exposure time cannot be continuously adjusted in microseconds. Instead, the entire line will be chosen. After calling this function to set the exposure time, it is recommended to call @link #CameraGetExposureTime @endlink to get the actual set value.
  1294. MVSDK_API CameraSdkStatus __stdcall CameraSetExposureTime(
  1295. CameraHandle hCamera,
  1296. double fExposureTime
  1297. );
  1298. /// @ingroup API_EXPOSURE
  1299. /// \~chinese
  1300. /// \brief 获得一行的曝光时间。
  1301. /// \param [in] hCamera 相机的句柄。
  1302. /// \param [out] pfLineTime 指针,返回一行的曝光时间,单位为微秒。
  1303. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1304. /// \note 对于CMOS传感器,其曝光的单位是按照行来计算的,因此,曝光时间并不能在微秒级别连续可调。而是会按照整行来取舍。这个函数的作用就是返回CMOS相机曝光一行对应的时间。
  1305. /// \~english
  1306. /// \brief Get a line of exposure time.
  1307. /// \param [in] hCamera Camera handle.
  1308. /// \param [out] pfLineTime returns the exposure time of one line in microseconds.
  1309. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1310. /// \note For CMOS sensors, the unit of exposure is calculated in rows, so the exposure time cannot be continuously adjusted in microseconds. Instead, the entire line will be chosen. The function of this function is to return the CMOS camera exposure one line corresponding time.
  1311. MVSDK_API CameraSdkStatus __stdcall CameraGetExposureLineTime(
  1312. CameraHandle hCamera,
  1313. double* pfLineTime
  1314. );
  1315. /// @ingroup API_EXPOSURE
  1316. /// \~chinese
  1317. /// \brief 获得相机的曝光时间。
  1318. /// \param [in] hCamera 相机的句柄。
  1319. /// \param [out] pfExposureTime 指针,返回当前的曝光时间,单位微秒。
  1320. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1321. /// \see CameraSetExposureTime
  1322. /// \~english
  1323. /// \brief Get camera exposure time.
  1324. /// \param [in] hCamera Camera handle.
  1325. /// \param [out] pfExposureTime returns the current exposure time in microseconds.
  1326. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1327. /// \see CameraSetExposureTime
  1328. MVSDK_API CameraSdkStatus __stdcall CameraGetExposureTime(
  1329. CameraHandle hCamera,
  1330. double* pfExposureTime
  1331. );
  1332. /// @ingroup API_EXPOSURE
  1333. /// \~chinese
  1334. /// \brief 获得相机的曝光时间范围
  1335. /// \param [in] hCamera 相机的句柄。
  1336. /// \param [out] pfMin 指针,返回曝光时间的最小值,单位微秒。
  1337. /// \param [out] pfMax 指针,返回曝光时间的最大值,单位微秒。
  1338. /// \param [out] pfStep 指针,返回曝光时间的步进值,单位微秒。
  1339. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1340. /// \~english
  1341. /// \brief Get camera exposure time range
  1342. /// \param [in] hCamera Camera handle.
  1343. /// \param [out] pfMin Returns the minimum exposure time in microseconds.
  1344. /// \param [out] pfMax Returns the maximum exposure time in microseconds.
  1345. /// \param [out] pfStep Returns the exposure time in microseconds.
  1346. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1347. MVSDK_API CameraSdkStatus __stdcall CameraGetExposureTimeRange(
  1348. CameraHandle hCamera,
  1349. double* pfMin,
  1350. double* pfMax,
  1351. double* pfStep
  1352. );
  1353. /// @ingroup API_EXPOSURE
  1354. /// \~chinese
  1355. /// \brief 设置多重曝光时间。单位为微秒。(此功能仅线阵相机支持)
  1356. /// \param [in] hCamera 相机的句柄。
  1357. /// \param [in] index 曝光索引。
  1358. /// \param [in] fExposureTime 曝光时间,单位微秒。
  1359. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1360. /// \note 对于CMOS传感器,其曝光的单位是按照行来计算的,因此,曝光时间并不能在微秒级别连续可调。而是会按照整行来取舍。在调用本函数设定曝光时间后,建议再调用@link #CameraGetMultiExposureTime @endlink来获得实际设定的值。
  1361. /// \~english
  1362. /// \brief Set the multiple exposure time. The unit is microseconds. (This feature is only supported by line camera)
  1363. /// \param [in] hCamera Camera handle.
  1364. /// \param [in] index Exposure index.
  1365. /// \param [in] fExposureTime Exposure time in microseconds.
  1366. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1367. /// \note For CMOS sensors, the unit of exposure is calculated in rows, so the exposure time cannot be continuously adjusted in microseconds. Instead, the entire line will be chosen. After calling this function to set the exposure time, it is recommended to call @link #CameraGetMultiExposureTime @endlink to get the actual set value.
  1368. MVSDK_API CameraSdkStatus __stdcall CameraSetMultiExposureTime(
  1369. CameraHandle hCamera,
  1370. int index,
  1371. double fExposureTime
  1372. );
  1373. /// @ingroup API_EXPOSURE
  1374. /// \~chinese
  1375. /// \brief 获取多重曝光时间。单位为微秒。(此功能仅线阵相机支持)
  1376. /// \param [in] hCamera 相机的句柄。
  1377. /// \param [in] index 曝光索引。
  1378. /// \param [out] fExposureTime 返回曝光时间,单位微秒。
  1379. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1380. /// \~english
  1381. /// \brief Get the multiple exposure time. The unit is microseconds. (This feature is only supported by line camera)
  1382. /// \param [in] hCamera Camera handle.
  1383. /// \param [in] index Exposure index.
  1384. /// \param [out] fExposureTime Returns exposure time in microseconds.
  1385. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1386. MVSDK_API CameraSdkStatus __stdcall CameraGetMultiExposureTime(
  1387. CameraHandle hCamera,
  1388. int index,
  1389. double* fExposureTime
  1390. );
  1391. /// @ingroup API_EXPOSURE
  1392. /// \~chinese
  1393. /// \brief 设置多重曝光使能个数。(此功能仅线阵相机支持)
  1394. /// \param [in] hCamera 相机的句柄。
  1395. /// \param [in] count 使能个数。
  1396. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1397. /// \~english
  1398. /// \brief Set the number of multiple exposure enable. (This feature is only supported by line camera)
  1399. /// \param [in] hCamera Camera handle.
  1400. /// \param [in] count The number of exposures enabled.
  1401. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1402. MVSDK_API CameraSdkStatus __stdcall CameraSetMultiExposureCount(
  1403. CameraHandle hCamera,
  1404. int count
  1405. );
  1406. /// @ingroup API_EXPOSURE
  1407. /// \~chinese
  1408. /// \brief 获取多重曝光使能个数。(此功能仅线阵相机支持)
  1409. /// \param [in] hCamera 相机的句柄。
  1410. /// \param [out] count 使能个数。
  1411. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1412. /// \~english
  1413. /// \brief Get the number of multiple exposure enable. (This feature is only supported by line camera)
  1414. /// \param [in] hCamera Camera handle.
  1415. /// \param [out] count The number of exposures enabled.
  1416. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1417. MVSDK_API CameraSdkStatus __stdcall CameraGetMultiExposureCount(
  1418. CameraHandle hCamera,
  1419. int* count
  1420. );
  1421. /// @ingroup API_EXPOSURE
  1422. /// \~chinese
  1423. /// \brief 获取多重曝光的最大曝光个数。(此功能仅线阵相机支持)
  1424. /// \param [in] hCamera 相机的句柄。
  1425. /// \param [out] max_count 支持的最大曝光个数。
  1426. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1427. /// \~english
  1428. /// \brief Get the maximum number of exposures for multiple exposures. (This feature is only supported by line camera)
  1429. /// \param [in] hCamera Camera handle.
  1430. /// \param [out] max_count The maximum number of exposures supported.
  1431. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1432. MVSDK_API CameraSdkStatus __stdcall CameraGetMultiExposureMaxCount(
  1433. CameraHandle hCamera,
  1434. int* max_count
  1435. );
  1436. /// @ingroup API_EXPOSURE
  1437. /// \~chinese
  1438. /// \brief 设置相机的图像模拟增益值。
  1439. /// \param [in] hCamera 相机的句柄。
  1440. /// \param [in] iAnalogGain 设定的模拟增益值。
  1441. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1442. /// \note 该值乘以@link #tSdkExpose.fAnalogGainStep @endlink,就得到实际的图像信号放大倍数。
  1443. /// \note @link CameraSetAnalogGainX @endlink以放大倍数为单位。
  1444. /// \~english
  1445. /// \brief Set the camera's image analog gain value.
  1446. /// \param [in] hCamera Camera handle.
  1447. /// \param [in] iAnalogGain gain value set
  1448. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1449. /// \note This value is multiplied by @link #tSdkExpose.fAnalogGainStep @endlink to get the actual image signal magnification.
  1450. /// \note @link CameraSetAnalogGainX @endlink takes the magnification as the unit.
  1451. MVSDK_API CameraSdkStatus __stdcall CameraSetAnalogGain(
  1452. CameraHandle hCamera,
  1453. INT iAnalogGain
  1454. );
  1455. /// @ingroup API_EXPOSURE
  1456. /// \~chinese
  1457. /// \brief 获得图像信号的模拟增益值。
  1458. /// \param [in] hCamera 相机的句柄。
  1459. /// \param [out] piAnalogGain 指针,返回当前的模拟增益值。
  1460. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1461. /// \note CameraGetAnalogGainX以放大倍数为单位。
  1462. /// \see CameraSetAnalogGain
  1463. /// \~english
  1464. /// \brief Obtain the analog gain value of the image signal.
  1465. /// \param [in] hCamera Camera handle.
  1466. /// \param [out] piAnalogGain Returns the current analog gain value.
  1467. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1468. /// \note CameraGetAnalogGainX takes the magnification as the unit.
  1469. /// \see CameraSetAnalogGain
  1470. MVSDK_API CameraSdkStatus __stdcall CameraGetAnalogGain(
  1471. CameraHandle hCamera,
  1472. INT* piAnalogGain
  1473. );
  1474. /// @ingroup API_EXPOSURE
  1475. /// \~chinese
  1476. /// \brief 设置相机的模拟增益放大倍数。
  1477. /// \param [in] hCamera 相机的句柄。
  1478. /// \param [in] fGain 设定的模拟增益放大倍数。
  1479. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1480. /// \~english
  1481. /// \brief Set the image gain magnification of the camera.
  1482. /// \param [in] hCamera Camera handle.
  1483. /// \param [in] fGain Gain magnification.
  1484. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1485. MVSDK_API CameraSdkStatus __stdcall CameraSetAnalogGainX(
  1486. CameraHandle hCamera,
  1487. float fGain
  1488. );
  1489. /// @ingroup API_EXPOSURE
  1490. /// \~chinese
  1491. /// \brief 获得图像信号的模拟增益放大倍数。
  1492. /// \param [in] hCamera 相机的句柄。
  1493. /// \param [out] pfGain 指针,返回当前的模拟增益放大倍数。
  1494. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1495. /// \see CameraSetAnalogGainX
  1496. /// \~english
  1497. /// \brief Obtain the gain magnification of the image signal.
  1498. /// \param [in] hCamera Camera handle.
  1499. /// \param [out] pfGain pointer, returns the current gain magnification.
  1500. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1501. /// \see CameraSetAnalogGainX
  1502. MVSDK_API CameraSdkStatus __stdcall CameraGetAnalogGainX(
  1503. CameraHandle hCamera,
  1504. float* pfGain
  1505. );
  1506. /// @ingroup API_EXPOSURE
  1507. /// \~chinese
  1508. /// \brief 获得相机的模拟增益放大倍数取值范围
  1509. /// \param [in] hCamera 相机的句柄。
  1510. /// \param [out] pfMin 指针,返回最小倍数。
  1511. /// \param [out] pfMax 指针,返回最大倍数。
  1512. /// \param [out] pfStep 指针,返回步进值。
  1513. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1514. /// \~english
  1515. /// \brief Get the value range of the camera's gain magnification
  1516. /// \param [in] hCamera Camera handle.
  1517. /// \param [out] pfMin pointer, returns the minimum multiple.
  1518. /// \param [out] pfMax pointer, returns the maximum multiple.
  1519. /// \param [out] pfStep pointer, returns the step value.
  1520. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1521. MVSDK_API CameraSdkStatus __stdcall CameraGetAnalogGainXRange(
  1522. CameraHandle hCamera,
  1523. float* pfMin,
  1524. float* pfMax,
  1525. float* pfStep
  1526. );
  1527. /// @ingroup API_COLOR
  1528. /// \~chinese
  1529. /// \brief 设置图像的数字增益。
  1530. /// \param [in] hCamera 相机的句柄。
  1531. /// \param [in] iRGain 红色通道的增益值。
  1532. /// \param [in] iGGain 绿色通道的增益值。
  1533. /// \param [in] iBGain 蓝色通道的增益值。
  1534. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1535. /// \note 设定范围由@link #tRgbGainRange @endlink成员表述。实际的放大倍数是设定值/100。
  1536. /// \~english
  1537. /// \brief Set the digital gain of the image.
  1538. /// \param [in] hCamera Camera handle.
  1539. /// \param [in] iRGain The gain value of the red channel.
  1540. /// \param [in] iGGain Gain value of green channel.
  1541. /// \param [in] iBGain The gain value of the blue channel.
  1542. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1543. /// \note The set scope is described by the @link #tRgbGainRange @endlink member. The actual magnification is the setting /100.
  1544. MVSDK_API CameraSdkStatus __stdcall CameraSetGain(
  1545. CameraHandle hCamera,
  1546. int iRGain,
  1547. int iGGain,
  1548. int iBGain
  1549. );
  1550. /// @ingroup API_COLOR
  1551. /// \~chinese
  1552. /// \brief 获得图像处理的数字增益。
  1553. /// \param [in] hCamera 相机的句柄。
  1554. /// \param [out] piRGain 指针,返回红色通道的数字增益值。
  1555. /// \param [out] piGGain 指针,返回绿色通道的数字增益值。
  1556. /// \param [out] piBGain 指针,返回蓝色通道的数字增益值。
  1557. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1558. /// \see CameraSetGain
  1559. /// \~english
  1560. /// \brief Get the digital gain of image processing.
  1561. /// \param [in] hCamera Camera handle.
  1562. /// \param [out] piRGain Returns the digital gain value of the red channel.
  1563. /// \param [out] piGGain Returns the digital gain value of the green channel.
  1564. /// \param [out] piBGain Returns the digital gain value of the blue channel.
  1565. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1566. /// \see CameraSetGain
  1567. MVSDK_API CameraSdkStatus __stdcall CameraGetGain(
  1568. CameraHandle hCamera,
  1569. int* piRGain,
  1570. int* piGGain,
  1571. int* piBGain
  1572. );
  1573. /// @ingroup API_ENHANCE
  1574. /// \~chinese
  1575. /// \brief 设定LUT动态生成模式下的Gamma值。
  1576. /// \param [in] hCamera 相机的句柄。
  1577. /// \param [in] iGamma 要设定的Gamma值。
  1578. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1579. /// \note 设定的值会马上保存在SDK内部,但是只有当相机处于动态参数生成的LUT模式时,才会生效。请参考@link #CameraSetLutMode @endlink的函数说明部分。
  1580. /// \~english
  1581. /// \brief Set the gamma value in LUT dynamic generation mode.
  1582. /// \param [in] hCamera Camera handle.
  1583. /// \param [in] iGamma The gamma to be set.
  1584. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1585. /// \note The set value will be stored in the SDK immediately, but it will only take effect when the camera is in LUT mode generated by dynamic parameters. Please refer to the function description part of @link #CameraSetLutMode @endlink.
  1586. MVSDK_API CameraSdkStatus __stdcall CameraSetGamma(
  1587. CameraHandle hCamera,
  1588. int iGamma
  1589. );
  1590. /// @ingroup API_ENHANCE
  1591. /// \~chinese
  1592. /// \brief 获得LUT动态生成模式下的Gamma值
  1593. /// \param [in] hCamera 相机的句柄。
  1594. /// \param [out] piGamma 指针,返回当前的Gamma值。
  1595. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1596. /// \see CameraSetGamma
  1597. /// \~english
  1598. /// \brief Get gamma value in LUT dynamic generation mode
  1599. /// \param [in] hCamera Camera handle.
  1600. /// \param [out] piGamma Returns the current gamma value.
  1601. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1602. /// \see CameraSetGamma
  1603. MVSDK_API CameraSdkStatus __stdcall CameraGetGamma(
  1604. CameraHandle hCamera,
  1605. int* piGamma
  1606. );
  1607. /// @ingroup API_ENHANCE
  1608. /// \~chinese
  1609. /// \brief 设定LUT动态生成模式下的对比度值。
  1610. /// \param [in] hCamera 相机的句柄。
  1611. /// \param [in] iContrast 设定的对比度值。
  1612. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1613. /// \note 设定的值会马上保存在SDK内部,但是只有当相机处于动态参数生成的LUT模式时,才会生效。请参考@link #CameraSetLutMode @endlink的函数说明部分。
  1614. /// \~english
  1615. /// \brief Sets the contrast value in LUT dynamic generation mode.
  1616. /// \param [in] hCamera Camera handle.
  1617. /// \param [in] iContrast Contrast value set by iContrast.
  1618. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1619. /// \note The set value will be stored in the SDK immediately, but it will only take effect when the camera is in LUT mode generated by dynamic parameters. Please refer to the function description part of @link #CameraSetLutMode @endlink.
  1620. MVSDK_API CameraSdkStatus __stdcall CameraSetContrast(
  1621. CameraHandle hCamera,
  1622. int iContrast
  1623. );
  1624. /// @ingroup API_ENHANCE
  1625. /// \~chinese
  1626. /// \brief 获得LUT动态生成模式下的对比度值。
  1627. /// \param [in] hCamera 相机的句柄。
  1628. /// \param [out] piContrast 指针,返回当前的对比度值。
  1629. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1630. /// \see CameraSetContrast
  1631. /// \~english
  1632. /// \brief Get the contrast value in LUT dynamic generation mode.
  1633. /// \param [in] hCamera Camera handle.
  1634. /// \param [out] piContrast Returns the current contrast value.
  1635. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1636. /// \see CameraSetContrast
  1637. MVSDK_API CameraSdkStatus __stdcall CameraGetContrast(
  1638. CameraHandle hCamera,
  1639. int* piContrast
  1640. );
  1641. /// @ingroup API_ENHANCE
  1642. /// \~chinese
  1643. /// \brief 设定图像处理的饱和度。
  1644. /// \param [in] hCamera 相机的句柄。
  1645. /// \param [in] iSaturation 设定的饱和度值。
  1646. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1647. /// \note 对黑白相机无效。设定范围由@link #tSaturationRange @endlink获得。100表示原始色度,不增强。
  1648. /// \~english
  1649. /// \brief Sets the saturation of image processing.
  1650. /// \param [in] hCamera Camera handle.
  1651. /// \param [in] iSaturation saturation value.
  1652. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1653. /// \note is not valid for black and white cameras. The setting range is obtained by @link #tSaturationRange @endlink. 100 represents the original color and is not enhanced.
  1654. MVSDK_API CameraSdkStatus __stdcall CameraSetSaturation(
  1655. CameraHandle hCamera,
  1656. int iSaturation
  1657. );
  1658. /// @ingroup API_ENHANCE
  1659. /// \~chinese
  1660. /// \brief 获得图像处理的饱和度。
  1661. /// \param [in] hCamera 相机的句柄。
  1662. /// \param [out] piSaturation 指针,返回当前图像处理的饱和度值。
  1663. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1664. /// \see CameraSetSaturation
  1665. /// \~english
  1666. /// \brief Get image processing saturation.
  1667. /// \param [in] hCamera Camera handle.
  1668. /// \param [out] piSaturation Returns the saturation value of the current image processing.
  1669. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1670. /// \see CameraSetSaturation
  1671. MVSDK_API CameraSdkStatus __stdcall CameraGetSaturation(
  1672. CameraHandle hCamera,
  1673. int* piSaturation
  1674. );
  1675. /// @ingroup API_ENHANCE
  1676. /// \~chinese
  1677. /// \brief 设置彩色转为黑白功能的使能。
  1678. /// \param [in] hCamera 相机的句柄。
  1679. /// \param [in] bEnable TRUE,表示将彩色图像转为黑白。
  1680. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1681. /// \~english
  1682. /// \brief Set the color to mono function enable.
  1683. /// \param [in] hCamera Camera handle.
  1684. /// \param [in] bEnable TRUE to change the color image to black and white.
  1685. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1686. MVSDK_API CameraSdkStatus __stdcall CameraSetMonochrome(
  1687. CameraHandle hCamera,
  1688. BOOL bEnable
  1689. );
  1690. /// @ingroup API_ENHANCE
  1691. /// \~chinese
  1692. /// \brief 获得彩色转换黑白功能的使能状况。
  1693. /// \param [in] hCamera 相机的句柄。
  1694. /// \param [out] pbEnable 指针。返回TRUE表示开启了彩色图像转换为黑白图像的功能。
  1695. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1696. /// \see CameraSetMonochrome
  1697. /// \~english
  1698. /// \brief Get the status of enabling black and white color conversion.
  1699. /// \param [in] hCamera Camera handle.
  1700. /// \param [out] pbEnable Returns TRUE to enable the conversion of a color image to a mono image.
  1701. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1702. /// \see CameraSetMonochrome
  1703. MVSDK_API CameraSdkStatus __stdcall CameraGetMonochrome(
  1704. CameraHandle hCamera,
  1705. BOOL* pbEnable
  1706. );
  1707. /// @ingroup API_ENHANCE
  1708. /// \~chinese
  1709. /// \brief 设置彩图像颜色翻转功能的使能。
  1710. /// \param [in] hCamera 相机的句柄。
  1711. /// \param [in] bEnable TRUE,表示开启图像颜色翻转功能,可以获得类似胶卷底片的效果。
  1712. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1713. /// \~english
  1714. /// \brief Set the enable for the color image color flip function.
  1715. /// \param [in] hCamera Camera handle.
  1716. /// \param [in] bEnable TRUE, means that the image color flip function is enabled, and the effect of similar film negatives can be obtained.
  1717. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1718. MVSDK_API CameraSdkStatus __stdcall CameraSetInverse(
  1719. CameraHandle hCamera,
  1720. BOOL bEnable
  1721. );
  1722. /// @ingroup API_ENHANCE
  1723. /// \~chinese
  1724. /// \brief 获得图像颜色反转功能的使能状态。
  1725. /// \param [in] hCamera 相机的句柄。
  1726. /// \param [out] pbEnable 指针,返回该功能使能状态。
  1727. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1728. /// \~english
  1729. /// \brief Get the status of the image color inversion function.
  1730. /// \param [in] hCamera Camera handle.
  1731. /// \param [out] pbEnable Returns this function enable state.
  1732. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1733. MVSDK_API CameraSdkStatus __stdcall CameraGetInverse(
  1734. CameraHandle hCamera,
  1735. BOOL* pbEnable
  1736. );
  1737. /// @ingroup API_EXPOSURE
  1738. /// \~chinese
  1739. /// \brief 设置自动曝光时抗频闪功能的使能状态。
  1740. /// \param [in] hCamera 相机的句柄。
  1741. /// \param [in] bEnable TRUE,开启抗频闪功能;FALSE,关闭该功能。
  1742. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1743. /// \note 对于手动曝光模式下无效。
  1744. /// \~english
  1745. /// \brief Set the anti-strobe function's enable state during auto exposure.
  1746. /// \param [in] hCamera Camera handle.
  1747. /// \param [in] bEnable TRUE, enable anti-strobe function; FALSE, disable this function.
  1748. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1749. /// \note Not valid for manual exposure mode.
  1750. MVSDK_API CameraSdkStatus __stdcall CameraSetAntiFlick(
  1751. CameraHandle hCamera,
  1752. BOOL bEnable
  1753. );
  1754. /// @ingroup API_EXPOSURE
  1755. /// \~chinese
  1756. /// \brief 获得自动曝光时抗频闪功能的使能状态。
  1757. /// \param [in] hCamera 相机的句柄。
  1758. /// \param [out] pbEnable 指针,返回该功能的使能状态。
  1759. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1760. /// \~english
  1761. /// \brief Get the anti-strobe function's enable state during auto exposure.
  1762. /// \param [in] hCamera Camera handle.
  1763. /// \param [out] pbEnable Returns the enable state of this function.
  1764. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1765. MVSDK_API CameraSdkStatus __stdcall CameraGetAntiFlick(
  1766. CameraHandle hCamera,
  1767. BOOL* pbEnable
  1768. );
  1769. /// @ingroup API_EXPOSURE
  1770. /// \~chinese
  1771. /// \brief 获得自动曝光时,消频闪的频率选择。
  1772. /// \param [in] hCamera 相机的句柄。
  1773. /// \param [out] piFrequencySel 指针,返回选择的索引号。0:50HZ 1:60HZ
  1774. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1775. /// \~english
  1776. /// \brief When the auto exposure is obtained, the frequency of the deflashing is selected.
  1777. /// \param [in] hCamera Camera handle.
  1778. /// \param [out] piFrequencySel Returns the selected index number. 0:50HZ 1:60HZ
  1779. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1780. MVSDK_API CameraSdkStatus __stdcall CameraGetLightFrequency(
  1781. CameraHandle hCamera,
  1782. int* piFrequencySel
  1783. );
  1784. /// @ingroup API_EXPOSURE
  1785. /// \~chinese
  1786. /// \brief 设置自动曝光时消频闪的频率。
  1787. /// \param [in] hCamera 相机的句柄。
  1788. /// \param [in] iFrequencySel 0:50HZ , 1:60HZ
  1789. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1790. /// \~english
  1791. /// \brief Sets the frequency at which the flash disappears during auto exposure.
  1792. /// \param [in] hCamera Camera handle.
  1793. /// \param [in] iFrequencySel 0:50HZ , 1:60HZ
  1794. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1795. MVSDK_API CameraSdkStatus __stdcall CameraSetLightFrequency(
  1796. CameraHandle hCamera,
  1797. int iFrequencySel
  1798. );
  1799. /// @ingroup API_ADVANCE
  1800. /// \~chinese
  1801. /// \brief 设定相机输出图像的帧率。
  1802. /// \param [in] hCamera 相机的句柄。
  1803. /// \param [in] iFrameSpeed 选择的帧率模式索引号,范围从0到tSdkCameraCapbility.iFrameSpeedDesc - 1
  1804. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1805. /// \~english
  1806. /// \brief Sets the frame rate of the camera output image.
  1807. /// \param [in] hCamera Camera handle.
  1808. /// \param [in] iFrameSpeed Frame rate index, ranging from 0 to tSdkCameraCapbility.iFrameSpeedDesc - 1
  1809. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1810. MVSDK_API CameraSdkStatus __stdcall CameraSetFrameSpeed(
  1811. CameraHandle hCamera,
  1812. int iFrameSpeed
  1813. );
  1814. /// @ingroup API_ADVANCE
  1815. /// \~chinese
  1816. /// \brief 获得相机输出图像的帧率选择索引号。
  1817. /// \param [in] hCamera 相机的句柄。
  1818. /// \param [out] piFrameSpeed 返回选择的帧率模式索引号。
  1819. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1820. /// \see CameraSetFrameSpeed
  1821. /// \~english
  1822. /// \brief Obtain the frame rate selection index number of the camera output image.
  1823. /// \param [in] hCamera Camera handle.
  1824. /// \param [out] piFrameSpeed Returns the selected frame rate mode index number.
  1825. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1826. /// \see CameraSetFrameSpeed
  1827. MVSDK_API CameraSdkStatus __stdcall CameraGetFrameSpeed(
  1828. CameraHandle hCamera,
  1829. int* piFrameSpeed
  1830. );
  1831. /// @ingroup API_ADVANCE
  1832. /// \~chinese
  1833. /// \brief 设定相机的帧频(面阵)或行频(线阵)。(仅部分网口相机支持)
  1834. /// \param [in] hCamera 相机的句柄。
  1835. /// \param [in] RateHZ 帧频或行频(<=0表示最大频率)。
  1836. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1837. /// \~english
  1838. /// \brief Set the frame frequency (area) or line frequency (line scan). (only supported by some gige camera)
  1839. /// \param [in] hCamera Camera handle.
  1840. /// \param [in] RateHZ frame rate or line rate (<=0 means maximum frequency).
  1841. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1842. MVSDK_API CameraSdkStatus __stdcall CameraSetFrameRate(
  1843. CameraHandle hCamera,
  1844. int RateHZ
  1845. );
  1846. /// @ingroup API_ADVANCE
  1847. /// \~chinese
  1848. /// \brief 获取设定的相机帧频(面阵)或行频(线阵)
  1849. /// \param [in] hCamera 相机的句柄。
  1850. /// \param [out] RateHZ 帧频或行频(<=0表示最大频率)。
  1851. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1852. /// \~english
  1853. /// \brief Get the frame frequency (area) or line frequency (line scan).
  1854. /// \param [in] hCamera Camera handle.
  1855. /// \param [out] RateHZ frame rate or line rate (<=0 means maximum frequency).
  1856. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1857. MVSDK_API CameraSdkStatus __stdcall CameraGetFrameRate(
  1858. CameraHandle hCamera,
  1859. int* RateHZ
  1860. );
  1861. /// @ingroup API_PARAMETERS
  1862. /// \~chinese
  1863. /// \brief 设定参数存取的目标对象。
  1864. /// \param [in] hCamera 相机的句柄。
  1865. /// \param [in] iMode 参数存取的对象。参考@link #emSdkParameterMode @endlink
  1866. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1867. /// \~english
  1868. /// \brief Sets the target object for parameter access.
  1869. /// \param [in] hCamera Camera handle.
  1870. /// \param [in] iMode The object accessed by the iMode parameter. Reference @link #emSdkParameterMode @endlink
  1871. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1872. MVSDK_API CameraSdkStatus __stdcall CameraSetParameterMode(
  1873. CameraHandle hCamera,
  1874. int iMode
  1875. );
  1876. /// @ingroup API_PARAMETERS
  1877. /// \~chinese
  1878. /// \brief 获取参数存取的目标对象。
  1879. /// \param [in] hCamera 相机的句柄。
  1880. /// \param [out] piTarget 返回参数存取的对象。参考@link #emSdkParameterMode @endlink
  1881. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1882. /// \~english
  1883. /// \brief Gets the target object for the parameter access.
  1884. /// \param [in] hCamera Camera handle.
  1885. /// \param [out] piTarget Returns the object accessed by the parameter. Reference @link #emSdkParameterMode @endlink
  1886. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1887. MVSDK_API CameraSdkStatus __stdcall CameraGetParameterMode(
  1888. CameraHandle hCamera,
  1889. int* piTarget
  1890. );
  1891. /// @ingroup API_PARAMETERS
  1892. /// \~chinese
  1893. /// \brief 设置参数存取的掩码。参数加载和保存时会根据该掩码来决定各个模块参数的是否加载或者保存。
  1894. /// \param [in] hCamera 相机的句柄。
  1895. /// \param [in] uMask 掩码。参考@link #emSdkPropSheetMask @endlink
  1896. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1897. /// \~english
  1898. /// \brief Sets the mask for parameter access. When the parameters are loaded and saved, the mask is used to determine whether each module parameter is loaded or saved.
  1899. /// \param [in] hCamera Camera handle.
  1900. /// \param [in] uMask mask. Reference @link #emSdkPropSheetMask @endlink
  1901. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1902. MVSDK_API CameraSdkStatus __stdcall CameraSetParameterMask(
  1903. CameraHandle hCamera,
  1904. UINT uMask
  1905. );
  1906. /// @ingroup API_PARAMETERS
  1907. /// \~chinese
  1908. /// \brief 保存当前相机参数到指定的参数组中。相机提供了A,B,C,D四组空间来进行参数的保存。
  1909. /// \param [in] hCamera 相机的句柄。
  1910. /// \param [in] iTeam 参数组,参考@link #emSdkParameterTeam @endlink
  1911. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1912. /// \~english
  1913. /// \brief Save current camera parameters to the specified parameter group. The camera provides A, B, C, D four sets of space for parameter preservation.
  1914. /// \param [in] hCamera Camera handle.
  1915. /// \param [in] iTeam parameter group, refer to @link #emSdkParameterTeam @endlink
  1916. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1917. MVSDK_API CameraSdkStatus __stdcall CameraSaveParameter(
  1918. CameraHandle hCamera,
  1919. int iTeam
  1920. );
  1921. /// @ingroup API_PARAMETERS
  1922. /// \~chinese
  1923. /// \brief 保存当前相机参数到指定的文件中。该文件可以复制到别的电脑上供其他相机加载,也可以做参数备份用。
  1924. /// \param [in] hCamera 相机的句柄。
  1925. /// \param [in] sFileName 参数文件的完整路径。
  1926. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1927. /// \~english
  1928. /// \brief Saves the current camera parameters to the specified file. This file can be copied to another computer for loading by other cameras, or it can be used for parameter backup.
  1929. /// \param [in] hCamera Camera handle.
  1930. /// \param [in] sFileName Full path to the sFileName parameter file.
  1931. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1932. MVSDK_API CameraSdkStatus __stdcall CameraSaveParameterToFile(
  1933. CameraHandle hCamera,
  1934. char* sFileName
  1935. );
  1936. /// @ingroup API_PARAMETERS
  1937. /// \~chinese
  1938. /// \brief 从PC上指定的参数文件中加载参数。我公司相机参数保存在PC上为.config后缀的文件,位于安装下的Camera\\Configs文件夹中。
  1939. /// \param [in] hCamera 相机的句柄。
  1940. /// \param [in] sFileName 参数文件的完整路径。
  1941. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1942. /// \~english
  1943. /// \brief Load parameters from the parameter file specified on the PC. Our camera parameters are saved on the PC as a .config suffix file, which is located in the Camera\\Configs folder under installation.
  1944. /// \param [in] hCamera Camera handle.
  1945. /// \param [in] sFileName Full path to the sFileName parameter file.
  1946. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1947. MVSDK_API CameraSdkStatus __stdcall CameraReadParameterFromFile(
  1948. CameraHandle hCamera,
  1949. char* sFileName
  1950. );
  1951. /// @ingroup API_PARAMETERS
  1952. /// \~chinese
  1953. /// \brief 加载指定组的参数到相机中。
  1954. /// \param [in] hCamera 相机的句柄。
  1955. /// \param [in] iTeam 参数组,参考@link #emSdkParameterTeam @endlink
  1956. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1957. /// \~english
  1958. /// \brief Loads the parameters of the specified group into the camera.
  1959. /// \param [in] hCamera Camera handle.
  1960. /// \param [in] iTeam parameter group, refer to @link #emSdkParameterTeam @endlink
  1961. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1962. MVSDK_API CameraSdkStatus __stdcall CameraLoadParameter(
  1963. CameraHandle hCamera,
  1964. int iTeam
  1965. );
  1966. /// @ingroup API_PARAMETERS
  1967. /// \~chinese
  1968. /// \brief 获得当前选择的参数组。
  1969. /// \param [in] hCamera 相机的句柄。
  1970. /// \param [in] piTeam 指针,返回当前选择的参数组。
  1971. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1972. /// \~english
  1973. /// \brief Get the currently selected parameter group.
  1974. /// \param [in] hCamera Camera handle.
  1975. /// \param [in] piTeam Returns the currently selected parameter group.
  1976. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1977. MVSDK_API CameraSdkStatus __stdcall CameraGetCurrentParameterGroup(
  1978. CameraHandle hCamera,
  1979. int* piTeam
  1980. );
  1981. /// @ingroup API_ADVANCE
  1982. /// \~chinese
  1983. /// \brief 设置相机传输图像数据的分包大小。
  1984. /// \param [in] hCamera 相机的句柄。
  1985. /// \param [in] iPackSel 分包长度选择的索引号。分包长度可由获得相机属性结构体中@link #tSdkCameraCapbility.pPackLenDesc @endlink成员表述,@link #tSdkCameraCapbility.iPackLenDesc @endlink成员则表示最大可选的分包模式个数。
  1986. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  1987. /// \note 目前的SDK版本中,该接口仅对GIGE接口相机有效,用来控制网络传输的分包大小。
  1988. /// \note 对于支持巨帧的网卡,我们建议选择8K的分包大小,可以有效的降低传输所占用的CPU处理时间。
  1989. /// \warning 新版本的SDK无需调用此函数,SDK会自动根据网络情况协商最优的分包大小
  1990. /// \~english
  1991. /// \brief Sets the packet size of the camera's transmitted image data.
  1992. /// \param [in] hCamera Camera handle.
  1993. /// \param [in] iPackSel Index number of the iPackSel packet length selection. The packet length can be expressed by the @link #tSdkCameraCapbility.pPackLenDesc @endlink member in the camera attribute structure. The @link #tSdkCameraCapbility.iPackLenDesc @endlink member represents the maximum number of optional packet modes.
  1994. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  1995. /// \note In the current SDK version, this interface is only valid for GIGE interface cameras and is used to control the packet size of the network transmission.
  1996. /// \note For NICs that support Jumbo Frames, we recommend choosing an 8K packet size that can effectively reduce the CPU processing time taken by the transfer.
  1997. /// \warning New version of the SDK does not need to call this function, the SDK will automatically negotiate the optimal packet size according to the network conditions
  1998. MVSDK_API CameraSdkStatus __stdcall CameraSetTransPackLen(
  1999. CameraHandle hCamera,
  2000. INT iPackSel
  2001. );
  2002. /// @ingroup API_ADVANCE
  2003. /// \~chinese
  2004. /// \brief 获得相机当前传输分包大小的选择索引号。
  2005. /// \param [in] hCamera 相机的句柄。
  2006. /// \param [out] piPackSel 指针,返回当前选择的分包大小索引号。
  2007. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2008. /// \see CameraSetTransPackLen
  2009. /// \~english
  2010. /// \brief Gets the selected index number of the camera's current transmission packet size.
  2011. /// \param [in] hCamera Camera handle.
  2012. /// \param [out] piPackSel Returns the currently selected packet size index number.
  2013. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2014. /// \see CameraSetTransPackLen
  2015. MVSDK_API CameraSdkStatus __stdcall CameraGetTransPackLen(
  2016. CameraHandle hCamera,
  2017. INT* piPackSel
  2018. );
  2019. /// @ingroup API_EXPOSURE
  2020. /// \~chinese
  2021. /// \brief 获得自动曝光参考窗口的显示状态。
  2022. /// \param [in] hCamera 相机的句柄。
  2023. /// \param [out] pbIsVisible 指针,返回TRUE,则表示当前窗口会被叠加在图像内容上。
  2024. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2025. /// \~english
  2026. /// \brief Gets the display status of the auto exposure reference window.
  2027. /// \param [in] hCamera Camera handle.
  2028. /// \param [out] pbIsVisible returns TRUE, indicating that the current window will be overlaid on the image content.
  2029. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2030. MVSDK_API CameraSdkStatus __stdcall CameraIsAeWinVisible(
  2031. CameraHandle hCamera,
  2032. BOOL* pbIsVisible
  2033. );
  2034. /// @ingroup API_EXPOSURE
  2035. /// \~chinese
  2036. /// \brief 设置自动曝光参考窗口的显示状态。
  2037. /// \param [in] hCamera 相机的句柄。
  2038. /// \param [in] bIsVisible TRUE,设置为显示;FALSE,不显示。
  2039. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2040. /// \note 当设置窗口状态为显示,调用@link #CameraImageOverlay @endlink后,能够将窗口位置以矩形的方式叠加在图像上。
  2041. /// \~english
  2042. /// \brief Sets the display status of the auto exposure reference window.
  2043. /// \param [in] hCamera Camera handle.
  2044. /// \param [in] bIsVisible TRUE, set to show; FALSE, not show.
  2045. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2046. /// \note When the window state is set to display, after calling @link #CameraImageOverlay @endlink, the window position can be superimposed on the image in a rectangular manner.
  2047. MVSDK_API CameraSdkStatus __stdcall CameraSetAeWinVisible(
  2048. CameraHandle hCamera,
  2049. BOOL bIsVisible
  2050. );
  2051. /// @ingroup API_EXPOSURE
  2052. /// \~chinese
  2053. /// \brief 获得自动曝光参考窗口的位置。
  2054. /// \param [in] hCamera 相机的句柄。
  2055. /// \param [out] piHOff 指针,返回窗口位置左上角横坐标值。
  2056. /// \param [out] piVOff 指针,返回窗口位置左上角纵坐标值。
  2057. /// \param [out] piWidth 指针,返回窗口的宽度。
  2058. /// \param [out] piHeight 指针,返回窗口的高度。
  2059. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2060. /// \~english
  2061. /// \brief Get the position of the auto exposure reference window.
  2062. /// \param [in] hCamera Camera handle.
  2063. /// \param [out] piHOff Returns the abscissa of the upper-left corner of the window.
  2064. /// \param [out] piVOff Returns the ordinate value in the upper left corner of the window.
  2065. /// \param [out] piWidth Returns the width of the window.
  2066. /// \param [out] piHeight Returns the height of the window.
  2067. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2068. MVSDK_API CameraSdkStatus __stdcall CameraGetAeWindow(
  2069. CameraHandle hCamera,
  2070. INT* piHOff,
  2071. INT* piVOff,
  2072. INT* piWidth,
  2073. INT* piHeight
  2074. );
  2075. /// @ingroup API_EXPOSURE
  2076. /// \~chinese
  2077. /// \brief 设置自动曝光的参考窗口。
  2078. /// \param [in] hCamera 相机的句柄。
  2079. /// \param [in] iHOff 窗口左上角的横坐标
  2080. /// \param [in] iVOff 窗口左上角的纵坐标
  2081. /// \param [in] iWidth 窗口的宽度
  2082. /// \param [in] iHeight 窗口的高度
  2083. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2084. /// \note 如果iHOff、iVOff、iWidth、iHeight全部为0,则窗口设置为每个分辨率下的居中1/2大小。可以随着分辨率的变化而跟随变化。
  2085. /// \note 如果iHOff、iVOff、iWidth、iHeight所决定的窗口位置范围超出了当前分辨率范围内, 则自动使用居中1/2大小窗口。
  2086. /// \~english
  2087. /// \brief Set the reference window for auto exposure.
  2088. /// \param [in] hCamera Camera handle.
  2089. /// \param [in] iHOff The horizontal axis of the window in the upper left corner
  2090. /// \param [in] iVOff The ordinate of the top left corner of the window
  2091. /// \param [in] iWidth width of window
  2092. /// \param [in] iHeight Height of window
  2093. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2094. /// \note If iHOff, iVOff, iWidth, and iHeight are all 0, the window is set to the center 1/2 size for each resolution. It can follow changes as the resolution changes.
  2095. /// \note If the window position range determined by iHOff, iVOff, iWidth, and iHeight exceeds the current resolution range, the centered 1/2 size window is automatically used.
  2096. MVSDK_API CameraSdkStatus __stdcall CameraSetAeWindow(
  2097. CameraHandle hCamera,
  2098. int iHOff,
  2099. int iVOff,
  2100. int iWidth,
  2101. int iHeight
  2102. );
  2103. /// @ingroup API_MIRROR
  2104. /// \~chinese
  2105. /// \brief 设置图像镜像操作。镜像操作分为水平和垂直两个方向。
  2106. /// \param [in] hCamera 相机的句柄。
  2107. /// \param [in] iDir 表示镜像的方向。0,表示水平方向;1,表示垂直方向。
  2108. /// \param [in] bEnable TRUE,使能镜像;FALSE,禁止镜像
  2109. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2110. /// \~english
  2111. /// \brief Set image mirroring operation. The mirroring operation is divided into horizontal and vertical directions.
  2112. /// \param [in] hCamera Camera handle.
  2113. /// \param [in] iDir Indicates the direction of the mirror. 0 means horizontal direction; 1 means vertical direction.
  2114. /// \param [in] bEnable TRUE to enable mirroring; FALSE to disable mirroring
  2115. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2116. MVSDK_API CameraSdkStatus __stdcall CameraSetMirror(
  2117. CameraHandle hCamera,
  2118. int iDir,
  2119. BOOL bEnable
  2120. );
  2121. /// @ingroup API_MIRROR
  2122. /// \~chinese
  2123. /// \brief 获得图像的镜像状态。
  2124. /// \param [in] hCamera 相机的句柄。
  2125. /// \param [in] iDir 表示要获得的镜像方向。0,表示水平方向;1,表示垂直方向。
  2126. /// \param [out] pbEnable 指针,返回TRUE,则表示iDir所指的方向镜像被使能。
  2127. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2128. /// \~english
  2129. /// \brief Get the mirrored state of the image.
  2130. /// \param [in] hCamera Camera handle.
  2131. /// \param [in] iDir Indicates the mirroring direction to be obtained. 0 means horizontal direction; 1 means vertical direction.
  2132. /// \param [out] pbEnable Returns TRUE, indicating that the direction mirror image of iDir is enabled.
  2133. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2134. MVSDK_API CameraSdkStatus __stdcall CameraGetMirror(
  2135. CameraHandle hCamera,
  2136. int iDir,
  2137. BOOL* pbEnable
  2138. );
  2139. /// @ingroup API_MIRROR
  2140. /// \~chinese
  2141. /// \brief 设置硬件镜像。分为水平和垂直两个方向。(仅部分网口、U3相机支持此功能)
  2142. /// \param [in] hCamera 相机的句柄。
  2143. /// \param [in] iDir 表示镜像的方向。0,表示水平方向;1,表示垂直方向。
  2144. /// \param [in] bEnable TRUE,使能镜像;FALSE,禁止镜像
  2145. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2146. /// \~english
  2147. /// \brief Set up the hardware mirror. Divided into two directions, horizontal and vertical. (Only some GigE and U3 cameras support this feature)
  2148. /// \param [in] hCamera Camera handle.
  2149. /// \param [in] iDir Indicates the direction of the mirror. 0 means horizontal direction; 1 means vertical direction.
  2150. /// \param [in] bEnable TRUE to enable mirroring; FALSE to disable mirroring
  2151. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2152. MVSDK_API CameraSdkStatus __stdcall CameraSetHardwareMirror(
  2153. CameraHandle hCamera,
  2154. int iDir,
  2155. BOOL bEnable
  2156. );
  2157. /// @ingroup API_MIRROR
  2158. /// \~chinese
  2159. /// \brief 获取设置的硬件镜像状态。
  2160. /// \param [in] hCamera 相机的句柄。
  2161. /// \param [in] iDir 表示要获得的镜像方向。0,表示水平方向;1,表示垂直方向。
  2162. /// \param [out] pbEnable 指针,返回TRUE,则表示iDir所指的方向镜像被使能。
  2163. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2164. /// \~english
  2165. /// \brief Get the hardware mirrored state of the image.
  2166. /// \param [in] hCamera Camera handle.
  2167. /// \param [in] iDir Indicates the mirroring direction to be obtained. 0 means horizontal direction; 1 means vertical direction.
  2168. /// \param [out] pbEnable Returns TRUE, indicating that the direction mirror image of iDir is enabled.
  2169. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2170. MVSDK_API CameraSdkStatus __stdcall CameraGetHardwareMirror(
  2171. CameraHandle hCamera,
  2172. int iDir,
  2173. BOOL* pbEnable
  2174. );
  2175. /// @ingroup API_MIRROR
  2176. /// \~chinese
  2177. /// \brief 设置图像旋转操作
  2178. /// \param [in] hCamera 相机的句柄。
  2179. /// \param [in] iRot 表示旋转的角度(逆时针方向)(0:不旋转 1:90度 2:180度 3:270度)
  2180. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2181. /// \~english
  2182. /// \brief Set image rotation operation
  2183. /// \param [in] hCamera Camera handle.
  2184. /// \param [in] iRot rotation angle (counterclockwise) (0: no rotation 1:90 degrees 2:180 degrees 3:270 degrees)
  2185. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2186. MVSDK_API CameraSdkStatus __stdcall CameraSetRotate(
  2187. CameraHandle hCamera,
  2188. int iRot
  2189. );
  2190. /// @ingroup API_MIRROR
  2191. /// \~chinese
  2192. /// \brief 获得图像的旋转状态。
  2193. /// \param [in] hCamera 相机的句柄。
  2194. /// \param [out] iRot 表示要获得的旋转方向。(逆时针方向)(0:不旋转 1:90度 2:180度 3:270度)
  2195. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2196. /// \~english
  2197. /// \brief Get the rotation state of the image.
  2198. /// \param [in] hCamera Camera handle.
  2199. /// \param [out] iRot Indicates the direction of rotation to get. (Counterclockwise) (0: Do not rotate 1:90 degree 2: 180 degree 3: 270 degree)
  2200. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2201. MVSDK_API CameraSdkStatus __stdcall CameraGetRotate(
  2202. CameraHandle hCamera,
  2203. int* iRot
  2204. );
  2205. /// @ingroup API_COLOR
  2206. /// \~chinese
  2207. /// \brief 获得白平衡参考窗口的位置。
  2208. /// \param [in] hCamera 相机的句柄。
  2209. /// \param [out] PiHOff 指针,返回参考窗口的左上角横坐标 。
  2210. /// \param [out] PiVOff 指针,返回参考窗口的左上角纵坐标 。
  2211. /// \param [out] PiWidth 指针,返回参考窗口的宽度。
  2212. /// \param [out] PiHeight 指针,返回参考窗口的高度。
  2213. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2214. /// \~english
  2215. /// \brief Get the position of the white balance reference window.
  2216. /// \param [in] hCamera Camera handle.
  2217. /// \param [out] PiHOff Returns the top-left abscissa of the reference window.
  2218. /// \param [out] PiVOff Returns the upper-left ordinate of the reference window.
  2219. /// \param [out] PiWidth Returns the width of the reference window.
  2220. /// \param [out] PiHeight Returns the height of the reference window.
  2221. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2222. MVSDK_API CameraSdkStatus __stdcall CameraGetWbWindow(
  2223. CameraHandle hCamera,
  2224. INT* PiHOff,
  2225. INT* PiVOff,
  2226. INT* PiWidth,
  2227. INT* PiHeight
  2228. );
  2229. /// @ingroup API_COLOR
  2230. /// \~chinese
  2231. /// \brief 设置白平衡参考窗口的位置。
  2232. /// \param [in] hCamera 相机的句柄。
  2233. /// \param [in] iHOff 参考窗口的左上角横坐标。
  2234. /// \param [in] iVOff 参考窗口的左上角纵坐标。
  2235. /// \param [in] iWidth 参考窗口的宽度。
  2236. /// \param [in] iHeight 参考窗口的高度。
  2237. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2238. /// \~english
  2239. /// \brief Sets the position of the white balance reference window.
  2240. /// \param [in] hCamera Camera handle.
  2241. /// \param [in] iHOff The upper left corner of the reference window.
  2242. /// \param [in] iVOff The upper left ordinate of the reference window.
  2243. /// \param [in] iWidth Width of the reference window.
  2244. /// \param [in] iHeight The height of the reference window.
  2245. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2246. MVSDK_API CameraSdkStatus __stdcall CameraSetWbWindow(
  2247. CameraHandle hCamera,
  2248. INT iHOff,
  2249. INT iVOff,
  2250. INT iWidth,
  2251. INT iHeight
  2252. );
  2253. /// @ingroup API_COLOR
  2254. /// \~chinese
  2255. /// \brief 获得白平衡窗口的显示状态。
  2256. /// \param [in] hCamera 相机的句柄。
  2257. /// \param [out] pbShow 指针,返回TRUE,则表示窗口是可见的。
  2258. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2259. /// \~english
  2260. /// \brief Get the display status of the white balance window.
  2261. /// \param [in] hCamera Camera handle.
  2262. /// \param [out] pbShow returns TRUE, indicating that the window is visible.
  2263. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2264. MVSDK_API CameraSdkStatus __stdcall CameraIsWbWinVisible(
  2265. CameraHandle hCamera,
  2266. BOOL* pbShow
  2267. );
  2268. /// @ingroup API_COLOR
  2269. /// \~chinese
  2270. /// \brief 设置白平衡窗口的显示状态。
  2271. /// \param [in] hCamera 相机的句柄。
  2272. /// \param [in] bShow TRUE,则表示设置为可见。
  2273. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2274. /// \note 在调用@link #CameraImageOverlay @endlink后,图像内容上将以矩形的方式叠加白平衡参考窗口的位置。
  2275. /// \~english
  2276. /// \brief Sets the display status of the white balance window.
  2277. /// \param [in] hCamera Camera handle.
  2278. /// \param [in] bShow TRUE indicates that the setting is visible.
  2279. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2280. /// \note After calling @link #CameraImageOverlay @endlink, the white balance reference window's position will be overlaid on the image content in a rectangular manner.
  2281. MVSDK_API CameraSdkStatus __stdcall CameraSetWbWinVisible(
  2282. CameraHandle hCamera,
  2283. BOOL bShow
  2284. );
  2285. /// @ingroup API_ISP
  2286. /// \~chinese
  2287. /// \brief 将输入的图像数据上叠加十字线、白平衡参考窗口、自动曝光参考窗口等图形。只有设置为可见状态的十字线和参考窗口才能被叠加上。
  2288. /// \param [in] hCamera 相机的句柄。
  2289. /// \param [in] pRgbBuffer 图像数据缓冲区。
  2290. /// \param [in] pFrInfo 图像的帧头信息。
  2291. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2292. /// \~english
  2293. /// \brief The cross-line, white balance reference window, auto exposure reference window, etc. are superimposed on the input image data. Only crosshairs and reference windows that are set to visible can be overlaid.
  2294. /// \param [in] hCamera Camera handle.
  2295. /// \param [in] pRgbBuffer image data buffer.
  2296. /// \param [in] pFrInfo Frame header information for the image.
  2297. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2298. MVSDK_API CameraSdkStatus __stdcall CameraImageOverlay(
  2299. CameraHandle hCamera,
  2300. BYTE* pRgbBuffer,
  2301. tSdkFrameHead* pFrInfo
  2302. );
  2303. /// @ingroup API_UTIL
  2304. /// \~chinese
  2305. /// \brief 设置指定十字线的参数。
  2306. /// \param [in] hCamera 相机的句柄。
  2307. /// \param [in] iLine 表示要设置第几条十字线的状态。范围为[0,8],共9条。
  2308. /// \param [in] x 十字线中心位置的横坐标值。
  2309. /// \param [in] y 十字线中心位置的纵坐标值。
  2310. /// \param [in] uColor 十字线的颜色,格式为(R|(G<<8)|(B<<16))
  2311. /// \param [in] bVisible 十字线的显示状态。TRUE,表示显示。
  2312. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2313. /// \note 只有设置为显示状态的十字线,在调用@link #CameraImageOverlay @endlink后才会被叠加到图像上。
  2314. /// \~english
  2315. /// \brief Set the parameters for the specified crosshairs.
  2316. /// \param [in] hCamera Camera handle.
  2317. /// \param [in] iLine Indicates the status of the first few crosshairs. The range is [0,8] for a total of 9.
  2318. /// \param [in] x The abscissa of the crosshair center position.
  2319. /// \param [in] y The y-axis value of the crosshair center position.
  2320. /// \param [in] uColor The color of the crosshair in the format (R|(G<<8)|(B<<16))
  2321. /// \param [in] bVisible Crosshair display status. TRUE, indicates the display.
  2322. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2323. /// \note Only crosshairs set to display state will be superimposed on the image after calling @link #CameraImageOverlay @endlink.
  2324. MVSDK_API CameraSdkStatus __stdcall CameraSetCrossLine(
  2325. CameraHandle hCamera,
  2326. int iLine,
  2327. INT x,
  2328. INT y,
  2329. UINT uColor,
  2330. BOOL bVisible
  2331. );
  2332. /// @ingroup API_UTIL
  2333. /// \~chinese
  2334. /// \brief 获得指定十字线的状态。
  2335. /// \param [in] hCamera 相机的句柄。
  2336. /// \param [in] iLine 表示要获取的第几条十字线的状态。范围为[0,8],共9条。
  2337. /// \param [out] px 指针,返回该十字线中心位置的横坐标。
  2338. /// \param [out] py 指针,返回该十字线中心位置的横坐标。
  2339. /// \param [out] pcolor 指针,返回该十字线的颜色,格式为(R|(G<<8)|(B<<16))。
  2340. /// \param [out] pbVisible 指针,返回TRUE,则表示该十字线可见。
  2341. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2342. /// \~english
  2343. /// \brief Get the status of the designated crosshairs.
  2344. /// \param [in] hCamera Camera handle.
  2345. /// \param [in] iLine Indicates the status of the first few crosshairs to get. The range is [0,8] for a total of 9.
  2346. /// \param [out] px Returns the abscissa of the center of the crosshair.
  2347. /// \param [out] py Returns the abscissa of the center of the crosshair.
  2348. /// \param [out] pcolor Returns the color of this crosshair in the format (R|(G<<8)|(B<<16)).
  2349. /// \param [out] pbVisible returns TRUE, indicating that the crosshairs are visible.
  2350. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2351. MVSDK_API CameraSdkStatus __stdcall CameraGetCrossLine(
  2352. CameraHandle hCamera,
  2353. INT iLine,
  2354. INT* px,
  2355. INT* py,
  2356. UINT* pcolor,
  2357. BOOL* pbVisible
  2358. );
  2359. /// @ingroup API_BASIC
  2360. /// \~chinese
  2361. /// \brief 获得相机的特性描述结构体。该结构体中包含了相机可设置的各种参数的范围信息。决定了相关函数的参数返回,也可用于动态创建相机的配置界面。
  2362. /// \param [in] hCamera 相机的句柄。
  2363. /// \param [out] pCameraInfo 指针,返回该相机特性描述的结构体。
  2364. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2365. /// \~english
  2366. /// \brief Get the camera's characteristic description structure. This structure contains range information of various parameters that the camera can set. Determines the return of parameters for related functions and can also be used to dynamically create camera configuration interfaces.
  2367. /// \param [in] hCamera Camera handle.
  2368. /// \param [out] pCameraInfo Returns the structure of the camera's property description.
  2369. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2370. MVSDK_API CameraSdkStatus __stdcall CameraGetCapability(
  2371. CameraHandle hCamera,
  2372. tSdkCameraCapbility* pCameraInfo
  2373. );
  2374. /******************************************************/
  2375. // 函数名 : CameraGetCapabilityEx
  2376. // 功能描述 : 获得相机的特性描述结构体。该结构体中包含了相机
  2377. // 可设置的各种参数的范围信息。决定了相关函数的参数
  2378. // 返回,也可用于动态创建相机的配置界面。
  2379. // 参数 : sDeviceModel 相机的型号,由扫描列表中获取
  2380. // pCameraInfo 指针,返回该相机特性描述的结构体。
  2381. // tSdkCameraCapbility在CameraDefine.h中定义。
  2382. // 返回值 : 成功时,返回CAMERA_STATUS_SUCCESS (0);
  2383. // 否则返回非0值的错误码,请参考CameraStatus.h
  2384. // 中错误码的定义。
  2385. /******************************************************/
  2386. MVSDK_API CameraSdkStatus __stdcall CameraGetCapabilityEx(
  2387. char* sDeviceModel,
  2388. tSdkCameraCapbility* pCameraInfo,
  2389. PVOID hCameraHandle
  2390. );
  2391. /// @ingroup API_USERDATA
  2392. /// \~chinese
  2393. /// \brief 设置相机的序列号。
  2394. /// \param [in] hCamera 相机的句柄。
  2395. /// \param [in] pbySN 序列号的缓冲区。
  2396. /// \param [in] iLevel 要设定的序列号级别,只能是1或者2。
  2397. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2398. /// \note 我公司相机序列号分为3级。0级的是我公司自定义的相机序列号,出厂时已经设定好且无法修改,1级和2级留给二次开发使用。每级序列号长度都是32个字节。
  2399. /// \~english
  2400. /// \brief Set the camera's serial number.
  2401. /// \param [in] hCamera Camera handle.
  2402. /// \param [in] pbySN The buffer for the serial number.
  2403. /// \param [in] iLevel The serial number to be set can only be 1 or 2.
  2404. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2405. /// \note Our company camera serial number is divided into 3 levels. Level 0 is our company's custom camera serial number, which has been set at the factory and cannot be modified. Levels 1 and 2 are reserved for secondary development. Each serial number length is 32 bytes.
  2406. MVSDK_API CameraSdkStatus __stdcall CameraWriteSN(
  2407. CameraHandle hCamera,
  2408. BYTE* pbySN,
  2409. INT iLevel
  2410. );
  2411. /// @ingroup API_USERDATA
  2412. /// \~chinese
  2413. /// \brief 读取相机指定级别的序列号。
  2414. /// \param [in] hCamera 相机的句柄。
  2415. /// \param [in] pbySN 序列号的缓冲区。
  2416. /// \param [in] iLevel 要读取的序列号级别。可以为0、1和2。
  2417. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2418. /// \see CameraWriteSN
  2419. /// \~english
  2420. /// \brief Reads the camera's assigned level serial number.
  2421. /// \param [in] hCamera Camera handle.
  2422. /// \param [in] pbySN The buffer for the serial number.
  2423. /// \param [in] iLevel The sequence number to read. Can be 0, 1 and 2.
  2424. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2425. /// \see CameraWriteSN
  2426. MVSDK_API CameraSdkStatus __stdcall CameraReadSN(
  2427. CameraHandle hCamera,
  2428. BYTE* pbySN,
  2429. INT iLevel
  2430. );
  2431. /// @ingroup API_TRIGGER
  2432. /// \~chinese
  2433. /// \brief 设置硬件触发模式下的触发延时时间,单位微秒。
  2434. /// \param [in] hCamera 相机的句柄。
  2435. /// \param [in] uDelayTimeUs 硬触发延时。单位微秒。
  2436. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2437. /// \note 当硬触发信号来临后,经过指定的延时,再开始采集图像。
  2438. /// \~english
  2439. /// \brief Set the trigger delay time in hardware trigger mode, in microseconds.
  2440. /// \param [in] hCamera Camera handle.
  2441. /// \param [in] uDelayTimeUs Hard trigger delay. Units microseconds.
  2442. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2443. /// \note When the hard trigger signal arrives, after a specified delay, it begins to capture the image.
  2444. MVSDK_API CameraSdkStatus __stdcall CameraSetTriggerDelayTime(
  2445. CameraHandle hCamera,
  2446. UINT uDelayTimeUs
  2447. );
  2448. /// @ingroup API_TRIGGER
  2449. /// \~chinese
  2450. /// \brief 获得当前设定的硬触发延时时间。
  2451. /// \param [in] hCamera 相机的句柄。
  2452. /// \param [out] puDelayTimeUs 指针,返回延时时间,单位微秒。
  2453. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2454. /// \~english
  2455. /// \brief Get the currently set hard trigger delay time.
  2456. /// \param [in] hCamera Camera handle.
  2457. /// \param [out] puDelayTimeUs Returns the delay time in microseconds.
  2458. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2459. MVSDK_API CameraSdkStatus __stdcall CameraGetTriggerDelayTime(
  2460. CameraHandle hCamera,
  2461. UINT* puDelayTimeUs
  2462. );
  2463. /// @ingroup API_TRIGGER
  2464. /// \~chinese
  2465. /// \brief 设置触发模式下的触发帧数。对软件触发和硬件触发模式都有效。默认为1帧,即一次触发信号采集一帧图像。
  2466. /// \param [in] hCamera 相机的句柄。
  2467. /// \param [in] iCount 一次触发采集的帧数。
  2468. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2469. /// \~english
  2470. /// \brief Sets the number of trigger frames in the trigger mode. Valid for both software and hardware trigger modes. The default is 1 frame, that is, one trigger signal captures a frame of image.
  2471. /// \param [in] hCamera Camera handle.
  2472. /// \param [in] iCount The number of frames triggered at a time.
  2473. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2474. MVSDK_API CameraSdkStatus __stdcall CameraSetTriggerCount(
  2475. CameraHandle hCamera,
  2476. INT iCount
  2477. );
  2478. /// @ingroup API_TRIGGER
  2479. /// \~chinese
  2480. /// \brief 获得一次触发的帧数。
  2481. /// \param [in] hCamera 相机的句柄。
  2482. /// \param [out] piCount 一次触发信号采集的帧数。
  2483. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2484. /// \~english
  2485. /// \brief Get the number of trigger frames.
  2486. /// \param [in] hCamera Camera handle.
  2487. /// \param [out] piCount The number of frames to trigger signal acquisition at one time.
  2488. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2489. MVSDK_API CameraSdkStatus __stdcall CameraGetTriggerCount(
  2490. CameraHandle hCamera,
  2491. INT* piCount
  2492. );
  2493. /// @ingroup API_TRIGGER
  2494. /// \~chinese
  2495. /// \brief 执行一次软触发。执行后,会触发由@link #CameraSetTriggerCount @endlink指定的帧数。
  2496. /// \param [in] hCamera 相机的句柄。
  2497. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2498. /// \see CameraSetTriggerMode
  2499. /// \~english
  2500. /// \brief Perform a soft trigger. After execution, the number of frames specified by @link #CameraSetTriggerCount @endlink is triggered.
  2501. /// \param [in] hCamera Camera handle.
  2502. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2503. /// \see CameraSetTriggerMode
  2504. MVSDK_API CameraSdkStatus __stdcall CameraSoftTrigger(
  2505. CameraHandle hCamera
  2506. );
  2507. /// @ingroup API_TRIGGER
  2508. /// \~chinese
  2509. /// \brief 设置相机的触发模式。
  2510. /// \param [in] hCamera 相机的句柄。
  2511. /// \param [in] iModeSel 模式选择索引号。0表示连续采集模式;1表示软件触发模式;2表示硬件触发模式。
  2512. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2513. /// \~english
  2514. /// \brief Set the camera's trigger mode.
  2515. /// \param [in] hCamera Camera handle.
  2516. /// \param [in] iModeSel mode selects the index number. 0 means continuous acquisition mode; 1 means software trigger mode; 2 means hardware trigger mode.
  2517. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2518. MVSDK_API CameraSdkStatus __stdcall CameraSetTriggerMode(
  2519. CameraHandle hCamera,
  2520. int iModeSel
  2521. );
  2522. /// @ingroup API_TRIGGER
  2523. /// \~chinese
  2524. /// \brief 获得相机的触发模式。
  2525. /// \param [in] hCamera 相机的句柄。
  2526. /// \param [out] piModeSel 指针,返回当前选择的相机触发模式的索引号。
  2527. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2528. /// \~english
  2529. /// \brief Get the camera's trigger mode.
  2530. /// \param [in] hCamera Camera handle.
  2531. /// \param [out] piModeSel Returns the index of the currently selected camera trigger mode.
  2532. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2533. MVSDK_API CameraSdkStatus __stdcall CameraGetTriggerMode(
  2534. CameraHandle hCamera,
  2535. INT* piModeSel
  2536. );
  2537. /// @ingroup API_TRIGGER
  2538. /// \~chinese
  2539. /// \brief 设置IO引脚端子上的STROBE信号。该信号可以做闪光灯控制,也可以做外部机械快门控制。
  2540. /// \param [in] hCamera 相机的句柄。
  2541. /// \param [in] iMode 闪光灯模式,参考@link #emStrobeControl @endlink
  2542. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2543. /// \~english
  2544. /// \brief Set the STROBE signal on the IO pin terminal. This signal can be used for flash control or external mechanical shutter control.
  2545. /// \param [in] hCamera Camera handle.
  2546. /// \param [in] iMode strobe mode, refer to @link #emStrobeControl @endlink
  2547. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2548. MVSDK_API CameraSdkStatus __stdcall CameraSetStrobeMode(
  2549. CameraHandle hCamera,
  2550. INT iMode
  2551. );
  2552. /// @ingroup API_TRIGGER
  2553. /// \~chinese
  2554. /// \brief 获取当前STROBE信号设置的模式。
  2555. /// \param [in] hCamera 相机的句柄。
  2556. /// \param [out] piMode 返回模式
  2557. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2558. /// \~english
  2559. /// \brief Gets the mode of the current STROBE signal setting.
  2560. /// \param [in] hCamera Camera handle.
  2561. /// \param [out] piMode Return Mode
  2562. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2563. MVSDK_API CameraSdkStatus __stdcall CameraGetStrobeMode(
  2564. CameraHandle hCamera,
  2565. INT* piMode
  2566. );
  2567. /// @ingroup API_TRIGGER
  2568. /// \~chinese
  2569. /// \brief 当STROBE信号处于STROBE_SYNC_WITH_TRIG时,通过该函数设置其相对触发信号延时时间。
  2570. /// \param [in] hCamera 相机的句柄。
  2571. /// \param [in] uDelayTimeUs 相对触发信号的延时时间,单位为us。可以为0,但不能为负数。
  2572. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2573. /// \~english
  2574. /// \brief When the STROBE signal is in STROBE_SYNC_WITH_TRIG, set its relative trigger signal delay time by this function.
  2575. /// \param [in] hCamera Camera handle.
  2576. /// \param [in] uDelayTimeUs Delay time relative to the trigger signal, in units of us. Can be 0, but it cannot be negative.
  2577. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2578. MVSDK_API CameraSdkStatus __stdcall CameraSetStrobeDelayTime(
  2579. CameraHandle hCamera,
  2580. UINT uDelayTimeUs
  2581. );
  2582. /// @ingroup API_TRIGGER
  2583. /// \~chinese
  2584. /// \brief 当STROBE信号处于STROBE_SYNC_WITH_TRIG时,通过该函数获得其相对触发信号延时时间。
  2585. /// \param [in] hCamera 相机的句柄。
  2586. /// \param [out] upDelayTimeUs 指针,返回延时时间,单位us。
  2587. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2588. /// \~english
  2589. /// \brief When the STROBE signal is in STROBE_SYNC_WITH_TRIG, the relative trigger signal delay time is obtained through this function.
  2590. /// \param [in] hCamera Camera handle.
  2591. /// \param [out] upDelayTimeUs Returns the delay time in us.
  2592. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2593. MVSDK_API CameraSdkStatus __stdcall CameraGetStrobeDelayTime(
  2594. CameraHandle hCamera,
  2595. UINT* upDelayTimeUs
  2596. );
  2597. /// @ingroup API_TRIGGER
  2598. /// \~chinese
  2599. /// \brief 当STROBE信号处于STROBE_SYNC_WITH_TRIG时,通过该函数设置其脉冲宽度。
  2600. /// \param [in] hCamera 相机的句柄。
  2601. /// \param [in] uTimeUs 脉冲的宽度,单位为时间us。
  2602. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2603. /// \~english
  2604. /// \brief When the STROBE signal is in STROBE_SYNC_WITH_TRIG, set its pulse width by this function.
  2605. /// \param [in] hCamera Camera handle.
  2606. /// \param [in] uTimeUs The width of the pulse in units of time us.
  2607. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2608. MVSDK_API CameraSdkStatus __stdcall CameraSetStrobePulseWidth(
  2609. CameraHandle hCamera,
  2610. UINT uTimeUs
  2611. );
  2612. /// @ingroup API_TRIGGER
  2613. /// \~chinese
  2614. /// \brief 当STROBE信号处于STROBE_SYNC_WITH_TRIG时,通过该函数获得其脉冲宽度。
  2615. /// \param [in] hCamera 相机的句柄。
  2616. /// \param [out] upTimeUs 指针,返回脉冲宽度。单位为us。
  2617. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2618. /// \~english
  2619. /// \brief When the STROBE signal is at STROBE_SYNC_WITH_TRIG, its pulse width is obtained by this function.
  2620. /// \param [in] hCamera Camera handle.
  2621. /// \param [out] upTimeUs Returns the pulse width. The unit is us.
  2622. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2623. MVSDK_API CameraSdkStatus __stdcall CameraGetStrobePulseWidth(
  2624. CameraHandle hCamera,
  2625. UINT* upTimeUs
  2626. );
  2627. /// @ingroup API_TRIGGER
  2628. /// \~chinese
  2629. /// \brief 当STROBE信号处于STROBE_SYNC_WITH_TRIG时,通过该函数设置其有效电平的极性。默认为高有效,当触发信号到来时,STROBE信号被拉高。
  2630. /// \param [in] hCamera 相机的句柄。
  2631. /// \param [in] uPolarity STROBE信号的极性,0为低电平有效,1为高电平有效。默认为高电平有效。
  2632. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2633. /// \~english
  2634. /// \brief When the STROBE signal is at STROBE_SYNC_WITH_TRIG, the polarity of its active level is set by this function. The default is high active. When the trigger signal arrives, the STROBE signal is pulled high.
  2635. /// \param [in] hCamera Camera handle.
  2636. /// \param [in] uPolarity Polarity of STROBE signal, 0 is active low and 1 is active high. The default is active high.
  2637. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2638. MVSDK_API CameraSdkStatus __stdcall CameraSetStrobePolarity(
  2639. CameraHandle hCamera,
  2640. INT uPolarity
  2641. );
  2642. /// @ingroup API_TRIGGER
  2643. /// \~chinese
  2644. /// \brief 获得相机当前STROBE信号的有效极性。默认为高电平有效。
  2645. /// \param [in] hCamera 相机的句柄。
  2646. /// \param [in] upPolarity 指针,返回STROBE信号当前的有效极性。
  2647. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2648. /// \~english
  2649. /// \brief Obtain the effective polarity of the camera's current STROBE signal. The default is active high.
  2650. /// \param [in] hCamera Camera handle.
  2651. /// \param [in] upPolarity Returns the current effective polarity of the STROBE signal.
  2652. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2653. MVSDK_API CameraSdkStatus __stdcall CameraGetStrobePolarity(
  2654. CameraHandle hCamera,
  2655. INT* upPolarity
  2656. );
  2657. /// @ingroup API_TRIGGER
  2658. /// \~chinese
  2659. /// \brief 设置相机外触发信号的种类。上边沿、下边沿、或者高、低电平方式。
  2660. /// \param [in] hCamera 相机的句柄。
  2661. /// \param [in] iType 外触发信号种类,参考@link #emExtTrigSignal @endlink
  2662. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2663. /// \~english
  2664. /// \brief Set the type of trigger signal outside the camera. Upper edge, lower edge, or high and low level.
  2665. /// \param [in] hCamera Camera handle.
  2666. /// \param [in] iType External trigger signal type, refer to @link #emExtTrigSignal @endlink
  2667. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2668. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigSignalType(
  2669. CameraHandle hCamera,
  2670. INT iType
  2671. );
  2672. /// @ingroup API_TRIGGER
  2673. /// \~chinese
  2674. /// \brief 获得相机当前外触发信号的种类。
  2675. /// \param [in] hCamera 相机的句柄。
  2676. /// \param [out] ipType 指针,返回外触发信号种类,参考@link #emExtTrigSignal @endlink
  2677. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2678. /// \~english
  2679. /// \brief Get the type of camera's current external trigger signal.
  2680. /// \param [in] hCamera Camera handle.
  2681. /// \param [out] ipType Returns the type of external trigger signal, see @link #emExtTrigSignal @endlink
  2682. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2683. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigSignalType(
  2684. CameraHandle hCamera,
  2685. INT* ipType
  2686. );
  2687. /// @ingroup API_TRIGGER
  2688. /// \~chinese
  2689. /// \brief 设置外触发模式下,相机快门的方式,默认为标准快门方式。部分滚动快门的CMOS相机支持GRR方式。
  2690. /// \param [in] hCamera 相机的句柄。
  2691. /// \param [in] iType 外触发快门方式。参考@link #emExtTrigShutterMode @endlink
  2692. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2693. /// \~english
  2694. /// \brief In the external trigger mode, the camera shutter mode defaults to the standard shutter mode. Part of the rolling shutter CMOS camera supports GRR mode.
  2695. /// \param [in] hCamera Camera handle.
  2696. /// \param [in] iType triggers the shutter. Reference @link #emExtTrigShutterMode @endlink
  2697. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2698. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigShutterType(
  2699. CameraHandle hCamera,
  2700. INT iType
  2701. );
  2702. /// @ingroup API_TRIGGER
  2703. /// \~chinese
  2704. /// \brief 获得外触发模式下,相机快门的方式
  2705. /// \param [in] hCamera 相机的句柄。
  2706. /// \param [out] ipType 指针,返回当前设定的外触发快门方式。
  2707. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2708. /// \see CameraSetExtTrigShutterType
  2709. /// \~english
  2710. /// \brief Get the camera shutter mode in external trigger mode
  2711. /// \param [in] hCamera Camera handle.
  2712. /// \param [out] ipType Returns the currently set external trigger shutter mode.
  2713. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2714. /// \see CameraSetExtTrigShutterType
  2715. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigShutterType(
  2716. CameraHandle hCamera,
  2717. INT* ipType
  2718. );
  2719. /// @ingroup API_TRIGGER
  2720. /// \~chinese
  2721. /// \brief 设置外触发信号延时时间,默认为0,单位为微秒。
  2722. /// \param [in] hCamera 相机的句柄。
  2723. /// \param [in] uDelayTimeUs 延时时间,单位为微秒,默认为0.
  2724. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2725. /// \~english
  2726. /// \brief Set the delay time of external trigger signal. The default is 0 and the unit is microsecond.
  2727. /// \param [in] hCamera Camera handle.
  2728. /// \param [in] uDelayTimeUs Delay time in microseconds. Default is 0.
  2729. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2730. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigDelayTime(
  2731. CameraHandle hCamera,
  2732. UINT uDelayTimeUs
  2733. );
  2734. /// @ingroup API_TRIGGER
  2735. /// \~chinese
  2736. /// \brief 获得设置的外触发信号延时时间,默认为0,单位为微秒。
  2737. /// \param [in] hCamera 相机的句柄。
  2738. /// \param [out] upDelayTimeUs 触发延时
  2739. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2740. /// \~english
  2741. /// \brief Get the set external trigger signal delay time, the default is 0, the unit is microseconds.
  2742. /// \param [in] hCamera Camera handle.
  2743. /// \param [out] upDelayTimeUs trigger delay
  2744. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2745. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigDelayTime(
  2746. CameraHandle hCamera,
  2747. UINT* upDelayTimeUs
  2748. );
  2749. /// @ingroup API_TRIGGER
  2750. /// \~chinese
  2751. /// \brief 设置外触发信号延时激活时间,默认为0,单位为微秒。当设置的值uDelayTimeUs不为0时,相机接收到外触发信号后,将延时uDelayTimeUs个微秒后再进行图像捕获。并且会把延时期间收到的触发信号缓存起来,被缓存的信号也将延时uDelayTimeUs个微秒后生效(最大缓存个数128)。
  2752. /// \param [in] hCamera 相机的句柄。
  2753. /// \param [in] uDelayTimeUs 延时时间,单位为微秒,默认为0.
  2754. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2755. /// \~english
  2756. /// \brief Set the delay activation time of the external trigger signal. The default is 0, and the unit is microsecond. When the set value uDelayTimeUs is not 0, after the camera receives the external trigger signal, it will delay uDelayTimeUs for several microseconds before performing image capture. And the trigger signal received during the delay period will be buffered, and the buffered signal will also take effect after a delay of uDelayTimeUs (the maximum number of buffers is 128).
  2757. /// \param [in] hCamera Camera handle.
  2758. /// \param [in] uDelayTimeUs Delay time in microseconds. Default is 0.
  2759. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2760. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigBufferedDelayTime(
  2761. CameraHandle hCamera,
  2762. UINT uDelayTimeUs
  2763. );
  2764. /// @ingroup API_TRIGGER
  2765. /// \~chinese
  2766. /// \brief 获得设置的外触发信号延时激活时间,默认为0,单位为微秒。
  2767. /// \param [in] hCamera 相机的句柄。
  2768. /// \param [out] puDelayTimeUs 触发延时
  2769. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2770. /// \~english
  2771. /// \brief Gets the delay activation time of the external trigger signal. The default is 0 and the unit is microsecond.
  2772. /// \param [in] hCamera Camera handle.
  2773. /// \param [out] puDelayTimeUs trigger delay
  2774. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2775. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigBufferedDelayTime(
  2776. CameraHandle hCamera,
  2777. UINT* puDelayTimeUs
  2778. );
  2779. /// @ingroup API_TRIGGER
  2780. /// \~chinese
  2781. /// \brief 设置外触发信号间隔时间,默认为0,单位为微秒。
  2782. /// \param [in] hCamera 相机的句柄。
  2783. /// \param [in] uTimeUs 间隔时间,单位为微秒,默认为0.
  2784. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2785. /// \~english
  2786. /// \brief Set the interval time of external trigger signal. The default is 0 and the unit is microsecond.
  2787. /// \param [in] hCamera Camera handle.
  2788. /// \param [in] uTimeUs Interval time in microseconds. Default is 0.
  2789. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2790. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigIntervalTime(
  2791. CameraHandle hCamera,
  2792. UINT uTimeUs
  2793. );
  2794. /// @ingroup API_TRIGGER
  2795. /// \~chinese
  2796. /// \brief 获得设置的外触发信号间隔时间,默认为0,单位为微秒。
  2797. /// \param [in] hCamera 相机的句柄。
  2798. /// \param [out] upTimeUs 触发间隔
  2799. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2800. /// \~english
  2801. /// \brief Get the set external trigger signal interval time, the default is 0, the unit is microseconds.
  2802. /// \param [in] hCamera Camera handle.
  2803. /// \param [out] upTimeUs trigger interval
  2804. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2805. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigIntervalTime(
  2806. CameraHandle hCamera,
  2807. UINT* upTimeUs
  2808. );
  2809. /// @ingroup API_TRIGGER
  2810. /// \~chinese
  2811. /// \brief 设置相机外触发信号的消抖时间。默认为0,单位为微秒。
  2812. /// \param [in] hCamera 相机的句柄。
  2813. /// \param [in] uTimeUs 时间
  2814. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2815. /// \~english
  2816. /// \brief Sets the debouncing time of the trigger signal outside the camera. The default is 0 and the unit is microseconds.
  2817. /// \param [in] hCamera Camera handle.
  2818. /// \param [in] uTimeUs time
  2819. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2820. MVSDK_API CameraSdkStatus __stdcall CameraSetExtTrigJitterTime(
  2821. CameraHandle hCamera,
  2822. UINT uTimeUs
  2823. );
  2824. /// @ingroup API_TRIGGER
  2825. /// \~chinese
  2826. /// \brief 获得设置的相机外触发消抖时间,默认为0.单位为微秒。
  2827. /// \param [in] hCamera 相机的句柄。
  2828. /// \param [out] upTimeUs 时间
  2829. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2830. /// \~english
  2831. /// \brief Get the set camera trigger debounce time, the default is 0. The unit is microseconds.
  2832. /// \param [in] hCamera Camera handle.
  2833. /// \param [out] upTimeUs time
  2834. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2835. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigJitterTime(
  2836. CameraHandle hCamera,
  2837. UINT* upTimeUs
  2838. );
  2839. /// @ingroup API_TRIGGER
  2840. /// \~chinese
  2841. /// \brief 获得相机外触发的属性掩码
  2842. /// \param [in] hCamera 相机的句柄。
  2843. /// \param [out] puCapabilityMask 指针,返回该相机外触发特性掩码,掩码参考CameraDefine.h中EXT_TRIG_MASK_ 开头的宏定义。
  2844. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2845. /// \~english
  2846. /// \brief Get the triggering attribute mask outside the camera
  2847. /// \param [in] hCamera Camera handle.
  2848. /// \param [out] puCapabilityMask Returns the mask of the camera's triggering property, masked by the macro definition at the beginning of EXT_TRIG_MASK_ in CameraDefine.h.
  2849. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2850. MVSDK_API CameraSdkStatus __stdcall CameraGetExtTrigCapability(
  2851. CameraHandle hCamera,
  2852. UINT* puCapabilityMask
  2853. );
  2854. /// @ingroup API_TRIGGER
  2855. /// \~chinese
  2856. /// \brief 当外触发信号为电平模式时,暂时停止触发相机,直到电平信号跳变后继续触发。
  2857. /// \param [in] hCamera 相机的句柄。
  2858. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2859. /// \~english
  2860. /// \brief When the external trigger signal is in level mode, it temporarily stops triggering the camera until the level signal jumps and continues to trigger.
  2861. /// \param [in] hCamera Camera handle.
  2862. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2863. MVSDK_API CameraSdkStatus __stdcall CameraPauseLevelTrigger(
  2864. CameraHandle hCamera
  2865. );
  2866. /// @ingroup API_ROI
  2867. /// \~chinese
  2868. /// \brief 获得抓拍模式下的分辨率选择索引号。
  2869. /// \param [in] hCamera 相机的句柄。
  2870. /// \param [out] pImageResolution 指针,返回抓拍模式的分辨率。
  2871. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2872. /// \~english
  2873. /// \brief Get the resolution selection index number in snap mode.
  2874. /// \param [in] hCamera Camera handle.
  2875. /// \param [out] pImageResolution Pointer to return the resolution of the snap mode.
  2876. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2877. MVSDK_API CameraSdkStatus __stdcall CameraGetResolutionForSnap(
  2878. CameraHandle hCamera,
  2879. tSdkImageResolution* pImageResolution
  2880. );
  2881. /// @ingroup API_ROI
  2882. /// \~chinese
  2883. /// \brief 设置抓拍模式下相机输出图像的分辨率。
  2884. /// \param [in] hCamera 相机的句柄。
  2885. /// \param [in] pImageResolution 分辨率
  2886. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2887. /// \note 如果pImageResolution->iWidth = pImageResolution->iHeight = 0,则表示设定为跟随当前预览分辨率。抓拍到的图像的分辨率会和当前设定的预览分辨率一样。
  2888. /// \~english
  2889. /// \brief Sets the resolution of the camera's output image in snap shot mode.
  2890. /// \param [in] hCamera Camera handle.
  2891. /// \param [in] pImageResolution Resolution
  2892. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2893. /// \note If pImageResolution->iWidth = pImageResolution->iHeight = 0, then it is set to follow the current preview resolution. The resolution of the captured image will be the same as the currently set preview resolution.
  2894. MVSDK_API CameraSdkStatus __stdcall CameraSetResolutionForSnap(
  2895. CameraHandle hCamera,
  2896. tSdkImageResolution* pImageResolution
  2897. );
  2898. /// @ingroup API_ROI
  2899. /// \~chinese
  2900. /// \brief 打开分辨率自定义面板,并通过可视化的方式来配置一个自定义分辨率。
  2901. /// \param [in] hCamera 相机的句柄。
  2902. /// \param [out] pImageCustom 指针,返回自定义的分辨率。
  2903. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2904. /// \~english
  2905. /// \brief Open the resolution custom panel and configure a custom resolution visually.
  2906. /// \param [in] hCamera Camera handle.
  2907. /// \param [out] pImageCustom Returns the custom resolution.
  2908. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2909. MVSDK_API CameraSdkStatus __stdcall CameraCustomizeResolution(
  2910. CameraHandle hCamera,
  2911. tSdkImageResolution* pImageCustom
  2912. );
  2913. /// @ingroup API_UTIL
  2914. /// \~chinese
  2915. /// \brief 打开参考窗口自定义面板。并通过可视化的方式来获得一个自定义窗口的位置。一般是用自定义白平衡和自动曝光的参考窗口。
  2916. /// \param [in] hCamera 相机的句柄。
  2917. /// \param [in] iWinType 要生成的参考窗口的用途。0:自动曝光参考窗口;1:白平衡参考窗口。
  2918. /// \param [in] hParent 调用该函数的窗口的句柄。可以为NULL。
  2919. /// \param [out] piHOff 指针,返回自定义窗口的左上角横坐标。
  2920. /// \param [out] piVOff 指针,返回自定义窗口的左上角纵坐标。
  2921. /// \param [out] piWidth 指针,返回自定义窗口的宽度。
  2922. /// \param [out] piHeight 指针,返回自定义窗口的高度。
  2923. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2924. /// \~english
  2925. /// \brief Open the reference window custom panel. And through a visual way to get a custom window location. It is generally a reference window with custom white balance and auto exposure.
  2926. /// \param [in] hCamera Camera handle.
  2927. /// \param [in] iWinType Purpose of the reference window to be generated. 0: Auto exposure reference window; 1: White balance reference window.
  2928. /// \param [in] hParent The handle of the window that called the function. Can be NULL.
  2929. /// \param [out] piHOff Returns the upper left-hand abscissa of the custom window.
  2930. /// \param [out] piVOff Returns the upper left ordinate of the custom window.
  2931. /// \param [out] piWidth Returns the width of the custom window.
  2932. /// \param [out] piHeight Returns the height of the custom window.
  2933. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2934. MVSDK_API CameraSdkStatus __stdcall CameraCustomizeReferWin(
  2935. CameraHandle hCamera,
  2936. INT iWinType,
  2937. HWND hParent,
  2938. INT* piHOff,
  2939. INT* piVOff,
  2940. INT* piWidth,
  2941. INT* piHeight
  2942. );
  2943. /// @ingroup API_SETTINGS_PAGE
  2944. /// \~chinese
  2945. /// \brief 设置相机属性配置窗口显示状态。
  2946. /// \param [in] hCamera 相机的句柄。
  2947. /// \param [in] bShow TRUE,显示;FALSE,隐藏。
  2948. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2949. /// \note 必须先调用@link #CameraCreateSettingPage @endlink成功创建相机属性配置窗口后,才能调用本函数进行显示。
  2950. /// \~english
  2951. /// \brief Set the camera property configuration window display status.
  2952. /// \param [in] hCamera Camera handle.
  2953. /// \param [in] bShow TRUE, show; FALSE, hide.
  2954. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2955. /// \note You must call @link #CameraCreateSettingPage @endlink successfully to create the camera property configuration window before calling this function to display.
  2956. MVSDK_API CameraSdkStatus __stdcall CameraShowSettingPage(
  2957. CameraHandle hCamera,
  2958. BOOL bShow
  2959. );
  2960. /// @ingroup API_SETTINGS_PAGE
  2961. /// \~chinese
  2962. /// \brief 创建该相机的属性配置窗口。调用该函数,SDK内部会帮您创建好相机的配置窗口,省去了您重新开发相机配置界面的时间。强烈建议使用您使用该函数让SDK为您创建好配置窗口。
  2963. /// \param [in] hCamera 相机的句柄。
  2964. /// \param [in] hParent 应用程序主窗口的句柄。可以为NULL。
  2965. /// \param [in] pWinText 字符串指针,窗口显示的标题栏。
  2966. /// \param [in] pCallbackFunc 窗口消息的回调函数,当相应的事件发生时,pCallbackFunc所指向的函数会被调用
  2967. /// \param [in] pCallbackCtx 回调函数的附加参数。可以为NULL。
  2968. /// \param [in] uReserved 预留。必须设置为0。
  2969. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2970. /// \~english
  2971. /// \brief Create the camera's property configuration window. Call this function, the SDK will help you create a camera configuration window, eliminating the need to redevelop the camera configuration interface. It is strongly recommended that you use this function to have the SDK create a configuration window for you.
  2972. /// \param [in] hCamera Camera handle.
  2973. /// \param [in] hParent Handle to the main window of the application. Can be NULL.
  2974. /// \param [in] pWinText string pointer, window title bar.
  2975. /// \param [in] pCallbackFunc Callback function of window message. The function pointed to by pCallbackFunc will be called when the corresponding event occurs.
  2976. /// \param [in] pCallbackCtx Additional parameters for the callback function. Can be NULL.
  2977. /// \param [in] uReserved Reserved. Must be set to 0.
  2978. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2979. MVSDK_API CameraSdkStatus __stdcall CameraCreateSettingPage(
  2980. CameraHandle hCamera,
  2981. HWND hParent,
  2982. char* pWinText,
  2983. CAMERA_PAGE_MSG_PROC pCallbackFunc,
  2984. PVOID pCallbackCtx,
  2985. UINT uReserved
  2986. );
  2987. /// @ingroup API_SETTINGS_PAGE
  2988. /// \~chinese
  2989. /// \brief 使用默认参数创建该相机的属性配置窗口。
  2990. /// \param [in] hCamera 相机的句柄。
  2991. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  2992. /// \~english
  2993. /// \brief Use the default parameters to create the camera's property configuration window.
  2994. /// \param [in] hCamera Camera handle.
  2995. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  2996. MVSDK_API CameraSdkStatus __stdcall CameraCreateSettingPageEx(
  2997. CameraHandle hCamera
  2998. );
  2999. /// @ingroup API_SETTINGS_PAGE
  3000. /// \~chinese
  3001. /// \brief 设置相机配置窗口的激活页面。相机配置窗口有多个子页面构成,该函数可以设定当前哪一个子页面为激活状态,显示在最前端。
  3002. /// \param [in] hCamera 相机的句柄。
  3003. /// \param [in] index 子页面的索引号。参考@link #emSdkPropSheetMask @endlink
  3004. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3005. /// \~english
  3006. /// \brief Sets the camera configuration window's activation page. The camera configuration window is composed of multiple sub-pages. This function can set which sub-page is currently active and displayed at the forefront.
  3007. /// \param [in] hCamera Camera handle.
  3008. /// \param [in] index The index number of the subpage. Reference @link #emSdkPropSheetMask @endlink
  3009. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3010. MVSDK_API CameraSdkStatus __stdcall CameraSetActiveSettingSubPage(
  3011. CameraHandle hCamera,
  3012. INT index
  3013. );
  3014. /// @ingroup API_SETTINGS_PAGE
  3015. /// \~chinese
  3016. /// \brief 把相机配置页设置为子窗口风格,并且指定它的父窗口。
  3017. /// \param [in] hCamera 相机的句柄。
  3018. /// \param [in] hParentWnd 父窗口句柄,为NULL(0)则恢复配置页为弹出窗口。
  3019. /// \param [in] Flags 功能标志位,bit0: 隐藏标题栏,bit1-31: 保留(必须为0)
  3020. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3021. /// \~english
  3022. /// \brief Sets the camera configuration page to child window style and specifies its parent window.
  3023. /// \param [in] hCamera Camera handle.
  3024. /// \param [in] hParentWnd The parent window handle, NULL (0) restores the configuration page to a popup window.
  3025. /// \param [in] Flags function flag, bit0: Hide title bar, bit1-31: Reserved (must be 0)
  3026. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3027. MVSDK_API CameraSdkStatus __stdcall CameraSetSettingPageParent(
  3028. CameraHandle hCamera,
  3029. HWND hParentWnd,
  3030. DWORD Flags
  3031. );
  3032. /// @ingroup API_SETTINGS_PAGE
  3033. /// \~chinese
  3034. /// \brief 获取相机配置页的窗口句柄。
  3035. /// \param [in] hCamera 相机的句柄。
  3036. /// \param [out] hWnd 返回配置页的窗口句柄。
  3037. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3038. /// \~english
  3039. /// \brief Gets the window handle of the camera configuration page.
  3040. /// \param [in] hCamera Camera handle.
  3041. /// \param [out] hWnd Returns the window handle of the configuration page.
  3042. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3043. MVSDK_API CameraSdkStatus __stdcall CameraGetSettingPageHWnd(
  3044. CameraHandle hCamera,
  3045. HWND* hWnd
  3046. );
  3047. /// @ingroup API_SETTINGS_PAGE
  3048. /// \~chinese
  3049. /// \brief 刷新相机配置页
  3050. /// \param [in] hCamera 相机的句柄。
  3051. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3052. /// \~english
  3053. /// \brief Refresh camera configuration page
  3054. /// \param [in] hCamera Camera handle.
  3055. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3056. MVSDK_API CameraSdkStatus __stdcall CameraUpdateSettingPage(
  3057. CameraHandle hCamera
  3058. );
  3059. MVSDK_API CameraSdkStatus __stdcall CameraSpecialControl(
  3060. CameraHandle hCamera,
  3061. DWORD dwCtrlCode,
  3062. DWORD dwParam,
  3063. LPVOID lpData
  3064. );
  3065. /// @ingroup API_BASIC
  3066. /// \~chinese
  3067. /// \brief 获得相机接收帧率的统计信息,包括错误帧和丢帧的情况。
  3068. /// \param [in] hCamera 相机的句柄。
  3069. /// \param [out] psFrameStatistic 指针,返回统计信息。
  3070. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3071. /// \~english
  3072. /// \brief Get the frame rate statistics of the camera, including error frame and frame loss.
  3073. /// \param [in] hCamera Camera handle.
  3074. /// \param [out] psFrameStatistic Returns statistics.
  3075. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3076. MVSDK_API CameraSdkStatus __stdcall CameraGetFrameStatistic(
  3077. CameraHandle hCamera,
  3078. tSdkFrameStatistic* psFrameStatistic
  3079. );
  3080. /// @ingroup API_ENHANCE
  3081. /// \~chinese
  3082. /// \brief 设置图像降噪模块的使能状态。
  3083. /// \param [in] hCamera 相机的句柄。
  3084. /// \param [in] bEnable TRUE,使能;FALSE,禁止。
  3085. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3086. /// \~english
  3087. /// \brief Set the enable status of the image noise reduction module.
  3088. /// \param [in] hCamera Camera handle.
  3089. /// \param [in] bEnable TRUE, enable; FALSE, disable.
  3090. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3091. MVSDK_API CameraSdkStatus __stdcall CameraSetNoiseFilter(
  3092. CameraHandle hCamera,
  3093. BOOL bEnable
  3094. );
  3095. /// @ingroup API_ENHANCE
  3096. /// \~chinese
  3097. /// \brief 获得图像降噪模块的使能状态。
  3098. /// \param [in] hCamera 相机的句柄。
  3099. /// \param [out] pEnable 指针,返回状态。TRUE,为使能。
  3100. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3101. /// \~english
  3102. /// \brief Get the image noise reduction module's enable state.
  3103. /// \param [in] hCamera Camera handle.
  3104. /// \param [out] pEnable Returns status. TRUE, to enable.
  3105. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3106. MVSDK_API CameraSdkStatus __stdcall CameraGetNoiseFilterState(
  3107. CameraHandle hCamera,
  3108. BOOL* pEnable
  3109. );
  3110. /// @ingroup API_ADVANCE
  3111. /// \~chinese
  3112. /// \brief 复位图像采集的时间戳,从0开始。
  3113. /// \param [in] hCamera 相机的句柄。
  3114. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3115. /// \~english
  3116. /// \brief Resets the time stamp of the image acquisition, starting from 0.
  3117. /// \param [in] hCamera Camera handle.
  3118. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3119. MVSDK_API CameraSdkStatus __stdcall CameraRstTimeStamp(
  3120. CameraHandle hCamera
  3121. );
  3122. /// @ingroup API_USERDATA
  3123. /// \~chinese
  3124. /// \brief 将用户自定义的数据保存到相机的非易性存储器中。
  3125. /// \param [in] hCamera 相机的句柄。
  3126. /// \param [in] uStartAddr 起始地址,从0开始。
  3127. /// \param [in] pbData 数据缓冲区指针
  3128. /// \param [in] ilen 写入数据的长度,ilen + uStartAddr必须小于用户区最大长度
  3129. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3130. /// \note 每个型号的相机可能支持的用户数据区最大长度不一样。可以从设备的特性描述中获取该长度信息。
  3131. /// \~english
  3132. /// \brief Save user-defined data to the camera's non-volatile memory.
  3133. /// \param [in] hCamera Camera handle.
  3134. /// \param [in] uStartAddr Start address, starting from 0.
  3135. /// \param [in] pbData data buffer pointer
  3136. /// \param [in] ilen The length of the write data, ilen + uStartAddr must be less than the maximum length of the user area
  3137. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3138. /// \note The maximum length of the user data area that each model of camera may support is different. This length information can be obtained from the device's feature description.
  3139. MVSDK_API CameraSdkStatus __stdcall CameraSaveUserData(
  3140. CameraHandle hCamera,
  3141. UINT uStartAddr,
  3142. BYTE *pbData,
  3143. int ilen
  3144. );
  3145. /// @ingroup API_USERDATA
  3146. /// \~chinese
  3147. /// \brief 从相机的非易性存储器中读取用户自定义的数据。
  3148. /// \param [in] hCamera 相机的句柄。
  3149. /// \param [in] uStartAddr 起始地址,从0开始。
  3150. /// \param [out] pbData 数据缓冲区指针
  3151. /// \param [in] ilen 数据的长度,ilen + uStartAddr必须小于用户区最大长度
  3152. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3153. /// \~english
  3154. /// \brief Read user-defined data from the camera's non-volatile memory.
  3155. /// \param [in] hCamera Camera handle.
  3156. /// \param [in] uStartAddr Start address, starting from 0.
  3157. /// \param [out] pbData data buffer pointer
  3158. /// \param [in] ilen The length of the data, ilen + uStartAddr must be less than the maximum length of the user area
  3159. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3160. MVSDK_API CameraSdkStatus __stdcall CameraLoadUserData(
  3161. CameraHandle hCamera,
  3162. UINT uStartAddr,
  3163. BYTE *pbData,
  3164. int ilen
  3165. );
  3166. /// @ingroup API_USERDATA
  3167. /// \~chinese
  3168. /// \brief 读取用户自定义的设备昵称。
  3169. /// \param [in] hCamera 相机的句柄。
  3170. /// \param [out] pName 指针,返回指向0结尾的字符串,设备昵称不超过32个字节,因此该指针指向的缓冲区必须大于等于32个字节空间。
  3171. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3172. /// \~english
  3173. /// \brief Read user-defined device nicknames.
  3174. /// \param [in] hCamera Camera handle.
  3175. /// \param [out] pName returns a string that points to the end of 0, the device nickname does not exceed 32 bytes, so the buffer pointed to by this pointer must be greater than or equal to 32 bytes.
  3176. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3177. MVSDK_API CameraSdkStatus __stdcall CameraGetFriendlyName(
  3178. CameraHandle hCamera,
  3179. char* pName
  3180. );
  3181. /// @ingroup API_USERDATA
  3182. /// \~chinese
  3183. /// \brief 设置用户自定义的设备昵称。
  3184. /// \param [in] hCamera 相机的句柄。
  3185. /// \param [in] pName 指针,指向0结尾的字符串,设备昵称不超过32个字节,因此该指针指向字符串必须小于等于32个字节空间。
  3186. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3187. /// \~english
  3188. /// \brief Set user-defined device nicknames.
  3189. /// \param [in] hCamera Camera handle.
  3190. /// \param [in] pName A string that ends with 0, the device nickname does not exceed 32 bytes, so the pointer to the string must be less than or equal to 32 bytes.
  3191. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3192. MVSDK_API CameraSdkStatus __stdcall CameraSetFriendlyName(
  3193. CameraHandle hCamera,
  3194. char* pName
  3195. );
  3196. /// @ingroup API_BASIC
  3197. /// \~chinese
  3198. /// \brief 读取SDK版本号
  3199. /// \param [out] pVersionString 指针,返回SDK版本字符串。该指针指向的缓冲区大小必须大于32个字节
  3200. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3201. /// \~english
  3202. /// \brief Read the SDK version number
  3203. /// \param [out] pVersionString Returns the SDK version string. The buffer pointed to by this pointer must be larger than 32 bytes
  3204. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3205. MVSDK_API CameraSdkStatus __stdcall CameraSdkGetVersionString(
  3206. char* pVersionString
  3207. );
  3208. /******************************************************/
  3209. // 函数名 : CameraCheckFwUpdate
  3210. // 功能描述 : 检测固件版本,是否需要升级。
  3211. // 参数 : hCamera 相机的句柄,由CameraInit函数获得。
  3212. // pNeedUpdate 指针,返回固件检测状态,TRUE表示需要更新
  3213. // 返回值 : 成功时,返回CAMERA_STATUS_SUCCESS (0);
  3214. // 否则返回非0值的错误码,请参考CameraStatus.h
  3215. // 中错误码的定义。
  3216. /******************************************************/
  3217. MVSDK_API CameraSdkStatus __stdcall CameraCheckFwUpdate(
  3218. CameraHandle hCamera,
  3219. BOOL* pNeedUpdate
  3220. );
  3221. /// @ingroup API_BASIC
  3222. /// \~chinese
  3223. /// \brief 获得固件版本的字符串
  3224. /// \param [in] hCamera 相机的句柄。
  3225. /// \param [out] pVersion 必须指向一个大于32字节的缓冲区,返回固件的版本字符串。
  3226. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3227. /// \~english
  3228. /// \brief Get the firmware version string
  3229. /// \param [in] hCamera Camera handle.
  3230. /// \param [out] pVersion must point to a buffer larger than 32 bytes and return the firmware version string.
  3231. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3232. MVSDK_API CameraSdkStatus __stdcall CameraGetFirmwareVersion(
  3233. CameraHandle hCamera,
  3234. char* pVersion
  3235. );
  3236. // 功能与CameraGetFirmwareVersion相同。Version拼写错误,为了兼容性保留
  3237. // Same function as CameraGetFirmwareVersion. Version misspelled, reserved for compatibility
  3238. MVSDK_API CameraSdkStatus __stdcall CameraGetFirmwareVision(
  3239. CameraHandle hCamera,
  3240. char* pVersion
  3241. );
  3242. /// @ingroup API_BASIC
  3243. /// \~chinese
  3244. /// \brief 获得指定设备的枚举信息
  3245. /// \param [in] hCamera 相机的句柄。
  3246. /// \param [out] pCameraInfo 指针,返回设备的枚举信息。
  3247. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3248. /// \~english
  3249. /// \brief Get enumeration information for the specified device
  3250. /// \param [in] hCamera Camera handle.
  3251. /// \param [out] pCameraInfo Returns the enumeration information for the device.
  3252. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3253. MVSDK_API CameraSdkStatus __stdcall CameraGetEnumInfo(
  3254. CameraHandle hCamera,
  3255. tSdkCameraDevInfo* pCameraInfo
  3256. );
  3257. /// @ingroup API_BASIC
  3258. /// \~chinese
  3259. /// \brief 获得指定设备接口的版本
  3260. /// \param [in] hCamera 相机的句柄。
  3261. /// \param [out] pVersion 指向一个大于32字节的缓冲区,返回接口版本字符串。
  3262. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3263. /// \~english
  3264. /// \brief Get the version of the specified device interface
  3265. /// \param [in] hCamera Camera handle.
  3266. /// \param [out] pVersion points to a buffer larger than 32 bytes and returns the interface version string.
  3267. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3268. MVSDK_API CameraSdkStatus __stdcall CameraGetInerfaceVersion(
  3269. CameraHandle hCamera,
  3270. char* pVersion
  3271. );
  3272. /// @ingroup API_GPIO
  3273. /// \~chinese
  3274. /// \brief 设置指定IO的电平状态,IO为输出型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iOutputIoCounts @endlink决定。
  3275. /// \param [in] hCamera 相机的句柄。
  3276. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3277. /// \param [in] uState 要设定的状态(GE、SUA: 0(高) 1(低))
  3278. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3279. /// \note 已废弃,使用CameraSetIOStateEx,它对所有型号相机的输出状态值统一为1高 0低
  3280. /// \~english
  3281. /// \brief Set the level state of the specified IO. IO is the output IO. The number of programmable output IOs for the camera is determined by @link #tSdkCameraCapbility.iOutputIoCounts @endlink.
  3282. /// \param [in] hCamera Camera handle.
  3283. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3284. /// \param [in] uState The state to set(GE、SUA: 0(high) 1(low))
  3285. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3286. /// \note Obsolete, use CameraSetIOStateEx, which has a unified output state value of 1 high and 0 low for all models of cameras
  3287. MVSDK_API CameraSdkStatus __stdcall CameraSetIOState(
  3288. CameraHandle hCamera,
  3289. INT iOutputIOIndex,
  3290. UINT uState
  3291. );
  3292. /// @ingroup API_GPIO
  3293. /// \~chinese
  3294. /// \brief 设置指定IO的电平状态,IO为输出型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iOutputIoCounts @endlink决定。
  3295. /// \param [in] hCamera 相机的句柄。
  3296. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3297. /// \param [in] uState 要设定的状态(1为高,0为低)
  3298. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3299. /// \~english
  3300. /// \brief Set the level state of the specified IO. IO is the output IO. The number of programmable output IOs for the camera is determined by @link #tSdkCameraCapbility.iOutputIoCounts @endlink.
  3301. /// \param [in] hCamera Camera handle.
  3302. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3303. /// \param [in] uState The state to set, 1 is high, 0 is low
  3304. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3305. MVSDK_API CameraSdkStatus __stdcall CameraSetIOStateEx(
  3306. CameraHandle hCamera,
  3307. INT iOutputIOIndex,
  3308. UINT uState
  3309. );
  3310. /// @ingroup API_GPIO
  3311. /// \~chinese
  3312. /// \brief 读取指定IO的电平状态,IO为输出型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iOutputIoCounts @endlink决定。
  3313. /// \param [in] hCamera 相机的句柄。
  3314. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3315. /// \param [out] puState 返回IO状态(GE、SUA: 0(高) 1(低))
  3316. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3317. /// \note 已废弃,使用CameraGetOutPutIOStateEx,它对所有型号相机的输出状态值统一为1高 0低
  3318. /// \~english
  3319. /// \brief Read the level state of the specified IO. IO is the output IO. The number of programmable output IOs for the camera is determined by @link #tSdkCameraCapbility.iOutputIoCounts @endlink.
  3320. /// \param [in] hCamera Camera handle.
  3321. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3322. /// \param [out] puState return IO state(GE、SUA: 0(high) 1(low))
  3323. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3324. /// \note Obsolete, use CameraGetOutPutIOStateEx, which has a unified output state value of 1 high and 0 low for all models of cameras
  3325. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOState(
  3326. CameraHandle hCamera,
  3327. INT iOutputIOIndex,
  3328. UINT* puState
  3329. );
  3330. /// @ingroup API_GPIO
  3331. /// \~chinese
  3332. /// \brief 读取指定IO的电平状态,IO为输出型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iOutputIoCounts @endlink决定。
  3333. /// \param [in] hCamera 相机的句柄。
  3334. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3335. /// \param [out] puState 返回IO状态,1为高,0为低
  3336. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3337. /// \~english
  3338. /// \brief Read the level state of the specified IO. IO is the output IO. The number of programmable output IOs for the camera is determined by @link #tSdkCameraCapbility.iOutputIoCounts @endlink.
  3339. /// \param [in] hCamera Camera handle.
  3340. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3341. /// \param [out] puState return IO state, 1 is high, 0 is low
  3342. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3343. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOStateEx(
  3344. CameraHandle hCamera,
  3345. INT iOutputIOIndex,
  3346. UINT* puState
  3347. );
  3348. /// @ingroup API_GPIO
  3349. /// \~chinese
  3350. /// \brief 读取指定IO的电平状态,IO为输入型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iInputIoCounts @endlink决定。
  3351. /// \param [in] hCamera 相机的句柄。
  3352. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3353. /// \param [out] puState 指针,返回IO状态(GE、SUA: 0(高) 1(低))
  3354. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3355. /// \note 已废弃,使用CameraGetIOStateEx,它对所有型号相机的输入状态值统一为1高 0低
  3356. /// \~english
  3357. /// \brief Read the level state of the specified IO, IO is input type IO, the number of programmable output IOs that the camera reserves is decided by @link #tSdkCameraCapbility.iInputIoCounts @endlink.
  3358. /// \param [in] hCamera Camera handle.
  3359. /// \param [in] iInputIOIndex IO index, starting from 0.
  3360. /// \param [out] puState returns IO state(GE、SUA: 0(high) 1(low))
  3361. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3362. /// \note Obsolete, use CameraGetIOStateEx, which has a unified input state value of 1 high and 0 low for all models of cameras
  3363. MVSDK_API CameraSdkStatus __stdcall CameraGetIOState(
  3364. CameraHandle hCamera,
  3365. INT iInputIOIndex,
  3366. UINT* puState
  3367. );
  3368. /// @ingroup API_GPIO
  3369. /// \~chinese
  3370. /// \brief 读取指定IO的电平状态,IO为输入型IO,相机预留可编程输出IO的个数由@link #tSdkCameraCapbility.iInputIoCounts @endlink决定。
  3371. /// \param [in] hCamera 相机的句柄。
  3372. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3373. /// \param [out] puState 指针,返回IO状态,1为高,0为低
  3374. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3375. /// \~english
  3376. /// \brief Read the level state of the specified IO, IO is input type IO, the number of programmable output IOs that the camera reserves is decided by @link #tSdkCameraCapbility.iInputIoCounts @endlink.
  3377. /// \param [in] hCamera Camera handle.
  3378. /// \param [in] iInputIOIndex IO index, starting from 0.
  3379. /// \param [out] puState returns IO state, 1 is high, 0 is low
  3380. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3381. MVSDK_API CameraSdkStatus __stdcall CameraGetIOStateEx(
  3382. CameraHandle hCamera,
  3383. INT iInputIOIndex,
  3384. UINT* puState
  3385. );
  3386. /// @ingroup API_GPIO
  3387. /// \~chinese
  3388. /// \brief 设置输入IO的模式
  3389. /// \param [in] hCamera 相机的句柄。
  3390. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3391. /// \param [in] iMode IO模式,参考@link #emCameraGPIOMode @endlink
  3392. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3393. /// \~english
  3394. /// \brief Set the input IO mode
  3395. /// \param [in] hCamera Camera handle.
  3396. /// \param [in] iInputIOIndex IO index, starting from 0.
  3397. /// \param [in] iMode IO mode, reference @link #emCameraGPIOMode @endlink
  3398. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3399. MVSDK_API CameraSdkStatus __stdcall CameraSetInPutIOMode(
  3400. CameraHandle hCamera,
  3401. INT iInputIOIndex,
  3402. INT iMode
  3403. );
  3404. /// @ingroup API_GPIO
  3405. /// \~chinese
  3406. /// \brief 获取输入IO的模式
  3407. /// \param [in] hCamera 相机的句柄。
  3408. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3409. /// \param [out] piMode IO模式,参考@link #emCameraGPIOMode @endlink
  3410. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3411. /// \~english
  3412. /// \brief Get the input IO mode
  3413. /// \param [in] hCamera Camera handle.
  3414. /// \param [in] iInputIOIndex IO index, starting from 0.
  3415. /// \param [out] piMode IO mode, reference @link #emCameraGPIOMode @endlink
  3416. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3417. MVSDK_API CameraSdkStatus __stdcall CameraGetInPutIOMode(
  3418. CameraHandle hCamera,
  3419. INT iInputIOIndex,
  3420. INT* piMode
  3421. );
  3422. /// @ingroup API_GPIO
  3423. /// \~chinese
  3424. /// \brief 设置输出IO的模式
  3425. /// \param [in] hCamera 相机的句柄。
  3426. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3427. /// \param [in] iMode IO模式,参考@link #emCameraGPIOMode @endlink
  3428. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3429. /// \~english
  3430. /// \brief Set the output IO mode
  3431. /// \param [in] hCamera Camera handle.
  3432. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3433. /// \param [in] iMode IO mode, reference @link #emCameraGPIOMode @endlink
  3434. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3435. MVSDK_API CameraSdkStatus __stdcall CameraSetOutPutIOMode(
  3436. CameraHandle hCamera,
  3437. INT iOutputIOIndex,
  3438. INT iMode
  3439. );
  3440. /// @ingroup API_GPIO
  3441. /// \~chinese
  3442. /// \brief 获取输出IO的模式
  3443. /// \param [in] hCamera 相机的句柄。
  3444. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3445. /// \param [out] piMode IO模式,参考@link #emCameraGPIOMode @endlink
  3446. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3447. /// \~english
  3448. /// \brief Get the output IO mode
  3449. /// \param [in] hCamera Camera handle.
  3450. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3451. /// \param [out] piMode IO mode, reference @link #emCameraGPIOMode @endlink
  3452. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3453. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOMode(
  3454. CameraHandle hCamera,
  3455. INT iOutputIOIndex,
  3456. INT* piMode
  3457. );
  3458. /// @ingroup API_GPIO
  3459. /// \~chinese
  3460. /// \brief 获取输入IO的模式支持能力
  3461. /// \param [in] hCamera 相机的句柄。
  3462. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3463. /// \param [out] piCapbility IO模式支持位掩码
  3464. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3465. /// \~english
  3466. /// \brief Get the mode support capability of the input IO
  3467. /// \param [in] hCamera Camera handle.
  3468. /// \param [in] iInputIOIndex IO index, starting from 0.
  3469. /// \param [out] piCapbility IO mode support bit mask
  3470. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3471. MVSDK_API CameraSdkStatus __stdcall CameraGetInPutIOModeCapbility(
  3472. CameraHandle hCamera,
  3473. INT iInputIOIndex,
  3474. UINT* piCapbility
  3475. );
  3476. /// @ingroup API_GPIO
  3477. /// \~chinese
  3478. /// \brief 获取输出IO的模式支持能力
  3479. /// \param [in] hCamera 相机的句柄。
  3480. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3481. /// \param [out] piCapbility IO模式支持位掩码
  3482. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3483. /// \~english
  3484. /// \brief Get the mode support capability of the output IO
  3485. /// \param [in] hCamera Camera handle.
  3486. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3487. /// \param [out] piCapbility IO mode support bit mask
  3488. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3489. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOModeCapbility(
  3490. CameraHandle hCamera,
  3491. INT iOutputIOIndex,
  3492. UINT* piCapbility
  3493. );
  3494. /// @ingroup API_GPIO
  3495. /// \~chinese
  3496. /// \brief 设置PWM型输出的参数
  3497. /// \param [in] hCamera 相机的句柄。
  3498. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3499. /// \param [in] iCycle PWM的周期,单位(us)
  3500. /// \param [in] uDuty 占用比,取值1%~99%
  3501. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3502. /// \~english
  3503. /// \brief Set the PWM output parameters
  3504. /// \param [in] hCamera Camera handle.
  3505. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3506. /// \param [in] iCycle Cycle of PWM, unit (us)
  3507. /// \param [in] uDuty Occupancy ratio, 1%~99%
  3508. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3509. MVSDK_API CameraSdkStatus __stdcall CameraSetOutPutPWM(
  3510. CameraHandle hCamera,
  3511. INT iOutputIOIndex,
  3512. UINT iCycle,
  3513. UINT uDuty
  3514. );
  3515. /// @ingroup API_GPIO
  3516. /// \~chinese
  3517. /// \brief 设置编码器有效方向
  3518. /// \param [in] hCamera 相机的句柄。
  3519. /// \param [in] dir 有效方向(0:正反转都有效 1:顺时针(A相超前于B) 2:逆时针)
  3520. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3521. /// \~english
  3522. /// \brief Set the effective direction of the rotary encoder
  3523. /// \param [in] hCamera Camera handle.
  3524. /// \param [in] dir Valid direction (0: Both positive and negative are valid 1: Clockwise (A phase leads B) 2: Counterclockwise)
  3525. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3526. MVSDK_API CameraSdkStatus __stdcall CameraSetRotaryEncDir(
  3527. CameraHandle hCamera,
  3528. INT dir
  3529. );
  3530. /// @ingroup API_GPIO
  3531. /// \~chinese
  3532. /// \brief 获取编码器有效方向
  3533. /// \param [in] hCamera 相机的句柄。
  3534. /// \param [out] dir 有效方向(0:正反转都有效 1:顺时针(A相超前于B) 2:逆时针)
  3535. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3536. /// \~english
  3537. /// \brief Get the effective direction of the rotary encoder
  3538. /// \param [in] hCamera Camera handle.
  3539. /// \param [out] dir Valid direction (0: Both positive and negative are valid 1: Clockwise (A phase leads B) 2: Counterclockwise)
  3540. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3541. MVSDK_API CameraSdkStatus __stdcall CameraGetRotaryEncDir(
  3542. CameraHandle hCamera,
  3543. INT* dir
  3544. );
  3545. /// @ingroup API_GPIO
  3546. /// \~chinese
  3547. /// \brief 设置编码器频率
  3548. /// \param [in] hCamera 相机的句柄。
  3549. /// \param [in] mul 倍频
  3550. /// \param [in] div 分频
  3551. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3552. /// \~english
  3553. /// \brief Set the frequency of the rotary encoder
  3554. /// \param [in] hCamera Camera handle.
  3555. /// \param [in] mul frequency multiplier
  3556. /// \param [in] div frequency division
  3557. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3558. MVSDK_API CameraSdkStatus __stdcall CameraSetRotaryEncFreq(
  3559. CameraHandle hCamera,
  3560. INT mul,
  3561. INT div
  3562. );
  3563. /// @ingroup API_GPIO
  3564. /// \~chinese
  3565. /// \brief 获取编码器频率
  3566. /// \param [in] hCamera 相机的句柄。
  3567. /// \param [out] mul 倍频
  3568. /// \param [out] div 分频
  3569. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3570. /// \~english
  3571. /// \brief Get the frequency of the rotary encoder
  3572. /// \param [in] hCamera Camera handle.
  3573. /// \param [out] mul frequency multiplier
  3574. /// \param [out] div frequency division
  3575. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3576. MVSDK_API CameraSdkStatus __stdcall CameraGetRotaryEncFreq(
  3577. CameraHandle hCamera,
  3578. INT* mul,
  3579. INT* div
  3580. );
  3581. /// @ingroup API_GPIO
  3582. /// \~chinese
  3583. /// \brief 设置输入IO的格式
  3584. /// \param [in] hCamera 相机的句柄。
  3585. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3586. /// \param [in] iFormat IO格式,参考@link #emCameraGPIOFormat @endlink
  3587. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3588. /// \~english
  3589. /// \brief Set the input IO format
  3590. /// \param [in] hCamera Camera handle.
  3591. /// \param [in] iInputIOIndex IO index, starting from 0.
  3592. /// \param [in] iFormat IO format, reference @link #emCameraGPIOFormat @endlink
  3593. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3594. MVSDK_API CameraSdkStatus __stdcall CameraSetInPutIOFormat(
  3595. CameraHandle hCamera,
  3596. INT iInputIOIndex,
  3597. INT iFormat
  3598. );
  3599. /// @ingroup API_GPIO
  3600. /// \~chinese
  3601. /// \brief 获取输入IO的格式
  3602. /// \param [in] hCamera 相机的句柄。
  3603. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3604. /// \param [out] piFormat IO格式,参考@link #emCameraGPIOFormat @endlink
  3605. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3606. /// \~english
  3607. /// \brief Get the input IO format
  3608. /// \param [in] hCamera Camera handle.
  3609. /// \param [in] iInputIOIndex IO index, starting from 0.
  3610. /// \param [out] piFormat IO format, reference @link #emCameraGPIOFormat @endlink
  3611. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3612. MVSDK_API CameraSdkStatus __stdcall CameraGetInPutIOFormat(
  3613. CameraHandle hCamera,
  3614. INT iInputIOIndex,
  3615. INT* piFormat
  3616. );
  3617. /// @ingroup API_GPIO
  3618. /// \~chinese
  3619. /// \brief 设置输出IO的格式
  3620. /// \param [in] hCamera 相机的句柄。
  3621. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3622. /// \param [in] iFormat IO格式,参考@link #emCameraGPIOFormat @endlink
  3623. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3624. /// \~english
  3625. /// \brief Set the output IO format
  3626. /// \param [in] hCamera Camera handle.
  3627. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3628. /// \param [in] iFormat IO format, reference @link #emCameraGPIOFormat @endlink
  3629. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3630. MVSDK_API CameraSdkStatus __stdcall CameraSetOutPutIOFormat(
  3631. CameraHandle hCamera,
  3632. INT iOutputIOIndex,
  3633. INT iFormat
  3634. );
  3635. /// @ingroup API_GPIO
  3636. /// \~chinese
  3637. /// \brief 获取输出IO的格式
  3638. /// \param [in] hCamera 相机的句柄。
  3639. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3640. /// \param [out] piFormat IO格式,参考@link #emCameraGPIOFormat @endlink
  3641. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3642. /// \~english
  3643. /// \brief Get the output IO format
  3644. /// \param [in] hCamera Camera handle.
  3645. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3646. /// \param [out] piFormat IO format, reference @link #emCameraGPIOFormat @endlink
  3647. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3648. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOFormat(
  3649. CameraHandle hCamera,
  3650. INT iOutputIOIndex,
  3651. INT* piFormat
  3652. );
  3653. /// @ingroup API_GPIO
  3654. /// \~chinese
  3655. /// \brief 获取输入IO的格式支持能力
  3656. /// \param [in] hCamera 相机的句柄。
  3657. /// \param [in] iInputIOIndex IO的索引号,从0开始。
  3658. /// \param [out] piCapbility IO格式支持位掩码
  3659. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3660. /// \~english
  3661. /// \brief Get the format support capability of the input IO
  3662. /// \param [in] hCamera Camera handle.
  3663. /// \param [in] iInputIOIndex IO index, starting from 0.
  3664. /// \param [out] piCapbility IO format support bit mask
  3665. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3666. MVSDK_API CameraSdkStatus __stdcall CameraGetInPutIOFormatCapbility(
  3667. CameraHandle hCamera,
  3668. INT iInputIOIndex,
  3669. UINT* piCapbility
  3670. );
  3671. /// @ingroup API_GPIO
  3672. /// \~chinese
  3673. /// \brief 获取输出IO的格式支持能力
  3674. /// \param [in] hCamera 相机的句柄。
  3675. /// \param [in] iOutputIOIndex IO的索引号,从0开始。
  3676. /// \param [out] piCapbility IO格式支持位掩码
  3677. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3678. /// \~english
  3679. /// \brief Get the format support capability of the output IO
  3680. /// \param [in] hCamera Camera handle.
  3681. /// \param [in] iOutputIOIndex IO index, starting from 0.
  3682. /// \param [out] piCapbility IO format support bit mask
  3683. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3684. MVSDK_API CameraSdkStatus __stdcall CameraGetOutPutIOFormatCapbility(
  3685. CameraHandle hCamera,
  3686. INT iOutputIOIndex,
  3687. UINT* piCapbility
  3688. );
  3689. // @ingroup API_EXPOSURE
  3690. /// \~chinese
  3691. /// \brief 设置自动曝光时选择的算法,不同的算法适用于不同的场景。
  3692. /// \param [in] hCamera 相机的句柄。
  3693. /// \param [in] iIspProcessor 选择执行该算法的对象,参考@link #emSdkIspProcessor @endlink
  3694. /// \param [in] iAeAlgorithmSel 要选择的算法编号。从0开始,最大值由@link #tSdkCameraCapbility.iAeAlmSwDesc @endlink和@link #tSdkCameraCapbility.iAeAlmHdDesc @endlink决定。
  3695. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3696. /// \~english
  3697. /// \brief The algorithm selected when setting up the automatic exposure, different algorithms are suitable for different scenes.
  3698. /// \param [in] hCamera Camera handle.
  3699. /// \param [in] iIspProcessor Select the object to execute the algorithm, refer to @link #emSdkIspProcessor @endlink
  3700. /// \param [in] iAeAlgorithmSel The algorithm number to select. From 0, the maximum value is determined by @link #tSdkCameraCapbility.iAeAlmSwDesc @endlink and @link #tSdkCameraCapbility.iAeAlmHdDesc @endlink.
  3701. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3702. MVSDK_API CameraSdkStatus __stdcall CameraSetAeAlgorithm(
  3703. CameraHandle hCamera,
  3704. INT iIspProcessor,
  3705. INT iAeAlgorithmSel
  3706. );
  3707. // @ingroup API_EXPOSURE
  3708. /// \~chinese
  3709. /// \brief 获得当前自动曝光所选择的算法
  3710. /// \param [in] hCamera 相机的句柄。
  3711. /// \param [in] iIspProcessor 选择执行该算法的对象,参考@link #emSdkIspProcessor @endlink
  3712. /// \param [out] piAlgorithmSel 返回当前选择的算法编号。
  3713. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3714. /// \~english
  3715. /// \brief Get the current auto exposure selected algorithm
  3716. /// \param [in] hCamera Camera handle.
  3717. /// \param [in] iIspProcessor Select the object to execute the algorithm, refer to @link #emSdkIspProcessor @endlink
  3718. /// \param [out] piAlgorithmSel Returns the currently selected algorithm number.
  3719. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3720. MVSDK_API CameraSdkStatus __stdcall CameraGetAeAlgorithm(
  3721. CameraHandle hCamera,
  3722. INT iIspProcessor,
  3723. INT* piAlgorithmSel
  3724. );
  3725. /// @ingroup API_ISP
  3726. /// \~chinese
  3727. /// \brief 设置Bayer数据转彩色的算法。
  3728. /// \param [in] hCamera 相机的句柄。
  3729. /// \param [in] iIspProcessor 选择执行该算法的对象,参考@link #emSdkIspProcessor @endlink
  3730. /// \param [in] iAlgorithmSel 要选择的算法编号。从0开始,最大值由tSdkCameraCapbility.iBayerDecAlmSwDesc和tSdkCameraCapbility.iBayerDecAlmHdDesc决定。
  3731. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3732. /// \~english
  3733. /// \brief Set Bayer data to color algorithm.
  3734. /// \param [in] hCamera Camera handle.
  3735. /// \param [in] iIspProcessor Select the object to execute the algorithm, refer to @link #emSdkIspProcessor @endlink
  3736. /// \param [in] iAlgorithmSel The algorithm number to select. From 0, the maximum value is determined by tSdkCameraCapbility.iBayerDecAlmSwDesc and tSdkCameraCapbility.iBayerDecAlmHdDesc.
  3737. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3738. MVSDK_API CameraSdkStatus __stdcall CameraSetBayerDecAlgorithm(
  3739. CameraHandle hCamera,
  3740. INT iIspProcessor,
  3741. INT iAlgorithmSel
  3742. );
  3743. /// @ingroup API_ISP
  3744. /// \~chinese
  3745. /// \brief 获得Bayer数据转彩色所选择的算法。
  3746. /// \param [in] hCamera 相机的句柄。
  3747. /// \param [in] iIspProcessor 选择执行该算法的对象,参考@link #emSdkIspProcessor @endlink
  3748. /// \param [in] piAlgorithmSel 返回当前选择的算法编号。
  3749. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3750. /// \~english
  3751. /// \brief Get the algorithm chosen by Bayer data to color.
  3752. /// \param [in] hCamera Camera handle.
  3753. /// \param [in] iIspProcessor Select the object to execute the algorithm, refer to @link #emSdkIspProcessor @endlink
  3754. /// \param [in] piAlgorithmSel Returns the currently selected algorithm number.
  3755. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3756. MVSDK_API CameraSdkStatus __stdcall CameraGetBayerDecAlgorithm(
  3757. CameraHandle hCamera,
  3758. INT iIspProcessor,
  3759. INT* piAlgorithmSel
  3760. );
  3761. // @ingroup API_ISP
  3762. /// \~chinese
  3763. /// \brief 设置图像处理单元的算法执行对象,由PC端或者相机端来执行算法,当由相机端执行时,会降低PC端的CPU占用率。
  3764. /// \param [in] hCamera 相机的句柄。
  3765. /// \param [in] iIspProcessor 参考@link #emSdkIspProcessor @endlink
  3766. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3767. /// \~english
  3768. /// \brief Sets the algorithm execution object of the image processing unit. The algorithm is executed by the PC or the camera. When executed by the camera, the CPU usage of the PC is reduced.
  3769. /// \param [in] hCamera Camera handle.
  3770. /// \param [in] iIspProcessor Reference @link #emSdkIspProcessor @endlink
  3771. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3772. MVSDK_API CameraSdkStatus __stdcall CameraSetIspProcessor(
  3773. CameraHandle hCamera,
  3774. INT iIspProcessor
  3775. );
  3776. // @ingroup API_ISP
  3777. /// \~chinese
  3778. /// \brief 获得图像处理单元的算法执行对象。
  3779. /// \param [in] hCamera 相机的句柄。
  3780. /// \param [out] piIspProcessor 返回选择的对象
  3781. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3782. /// \~english
  3783. /// \brief Get the image processing unit's algorithm execution object.
  3784. /// \param [in] hCamera Camera handle.
  3785. /// \param [out] piIspProcessor returns the selected object
  3786. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3787. MVSDK_API CameraSdkStatus __stdcall CameraGetIspProcessor(
  3788. CameraHandle hCamera,
  3789. INT* piIspProcessor
  3790. );
  3791. /// @ingroup API_ISP
  3792. /// \~chinese
  3793. /// \brief 设置图像的黑电平基准,默认值为0
  3794. /// \param [in] hCamera 相机的句柄。
  3795. /// \param [in] iBlackLevel 要设定的电平值。范围为0到255。
  3796. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3797. /// \~english
  3798. /// \brief Sets the black level reference of the image. The default value is 0
  3799. /// \param [in] hCamera Camera handle.
  3800. /// \param [in] iBlackLevel The value to set. The range is 0 to 255.
  3801. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3802. MVSDK_API CameraSdkStatus __stdcall CameraSetBlackLevel(
  3803. CameraHandle hCamera,
  3804. INT iBlackLevel
  3805. );
  3806. /// @ingroup API_ISP
  3807. /// \~chinese
  3808. /// \brief 获得图像的黑电平基准,默认值为0
  3809. /// \param [in] hCamera 相机的句柄。
  3810. /// \param [out] piBlackLevel 返回当前的黑电平值。范围为0到255。
  3811. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3812. /// \~english
  3813. /// \brief Get the black level of the image, the default value is 0
  3814. /// \param [in] hCamera Camera handle.
  3815. /// \param [out] piBlackLevel Returns the current black level value. The range is 0 to 255.
  3816. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3817. MVSDK_API CameraSdkStatus __stdcall CameraGetBlackLevel(
  3818. CameraHandle hCamera,
  3819. INT* piBlackLevel
  3820. );
  3821. /// @ingroup API_ISP
  3822. /// \~chinese
  3823. /// \brief 设置图像的白电平基准,默认值为255
  3824. /// \param [in] hCamera 相机的句柄。
  3825. /// \param [in] iWhiteLevel 要设定的电平值。范围为0到255。
  3826. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3827. /// \~english
  3828. /// \brief Sets the white level reference of the image. The default value is 255
  3829. /// \param [in] hCamera Camera handle.
  3830. /// \param [in] iWhiteLevel The level to be set. The range is 0 to 255.
  3831. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3832. MVSDK_API CameraSdkStatus __stdcall CameraSetWhiteLevel(
  3833. CameraHandle hCamera,
  3834. INT iWhiteLevel
  3835. );
  3836. /// @ingroup API_ISP
  3837. /// \~chinese
  3838. /// \brief 获得图像的白电平基准,默认值为255
  3839. /// \param [in] hCamera 相机的句柄。
  3840. /// \param [out] piWhiteLevel 返回当前的白电平值。范围为0到255。
  3841. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3842. /// \~english
  3843. /// \brief Get the white level of the image, the default value is 255
  3844. /// \param [in] hCamera Camera handle.
  3845. /// \param [out] piWhiteLevel Returns the current white level value. The range is 0 to 255.
  3846. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3847. MVSDK_API CameraSdkStatus __stdcall CameraGetWhiteLevel(
  3848. CameraHandle hCamera,
  3849. INT* piWhiteLevel
  3850. );
  3851. /// @ingroup API_ISP
  3852. /// \~chinese
  3853. /// \brief 设置@link #CameraImageProcess @endlink函数的图像处理的输出格式。
  3854. /// \param [in] hCamera 相机的句柄。
  3855. /// \param [in] uFormat 输出格式。
  3856. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3857. /// \note 支持的格式:CAMERA_MEDIA_TYPE_MONO8、CAMERA_MEDIA_TYPE_MONO16、CAMERA_MEDIA_TYPE_RGB8、CAMERA_MEDIA_TYPE_RGBA8 、CAMERA_MEDIA_TYPE_BGR8、CAMERA_MEDIA_TYPE_BGRA8
  3858. /// \~english
  3859. /// \brief Sets the output format of image processing for the @link #CameraImageProcess @endlink function.
  3860. /// \param [in] hCamera Camera handle.
  3861. /// \param [in] uFormat output format.
  3862. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3863. /// \note Supported formats: CAMERA_MEDIA_TYPE_MONO8, CAMERA_MEDIA_TYPE_MONO16, CAMERA_MEDIA_TYPE_RGB8, CAMERA_MEDIA_TYPE_RGBA8, CAMERA_MEDIA_TYPE_BGR8, CAMERA_MEDIA_TYPE_BGRA8
  3864. MVSDK_API CameraSdkStatus __stdcall CameraSetIspOutFormat(
  3865. CameraHandle hCamera,
  3866. UINT uFormat
  3867. );
  3868. /// @ingroup API_ISP
  3869. /// \~chinese
  3870. /// \brief 获取输出格式
  3871. /// \param [in] hCamera 相机的句柄。
  3872. /// \param [out] puFormat 返回当前输出格式
  3873. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3874. /// \see CameraSetIspOutFormat
  3875. /// \~english
  3876. /// \brief Get output format
  3877. /// \param [in] hCamera Camera handle.
  3878. /// \param [out] puFormat returns the current output format
  3879. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3880. /// \see CameraSetIspOutFormat
  3881. MVSDK_API CameraSdkStatus __stdcall CameraGetIspOutFormat(
  3882. CameraHandle hCamera,
  3883. UINT* puFormat
  3884. );
  3885. /// @ingroup API_UTIL
  3886. /// \~chinese
  3887. /// \brief 获得错误码对应的描述字符串
  3888. /// \param [in] iStatusCode 错误码。(定义于CameraStatus.h中)
  3889. /// \return 成功时,返回错误码对应的字符串首地址;否则返回NULL。
  3890. /// \~english
  3891. /// \brief Get the description string corresponding to the error code
  3892. /// \param [in] iStatusCode error code. (Defined in CameraStatus.h)
  3893. /// When the return is successful, the first address of the string corresponding to the error code is returned; otherwise it returns NULL.
  3894. MVSDK_API char* __stdcall CameraGetErrorString(
  3895. CameraSdkStatus iStatusCode
  3896. );
  3897. /// @ingroup API_GRAB
  3898. /// \~chinese
  3899. /// \brief 获得一帧图像数据。该接口获得的图像是经过处理后的RGB格式。
  3900. /// \param [in] hCamera 相机的句柄。
  3901. /// \param [out] pImageData 接收图像数据的缓冲区,大小必须和uOutFormat指定的格式相匹配,否则数据会溢出
  3902. /// \param [in] uOutFormat 输出格式 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  3903. /// \param [out] piWidth 整形指针,返回图像的宽度
  3904. /// \param [out] piHeight 整形指针,返回图像的高度
  3905. /// \param [in] wTimes 抓取图像的超时时间。
  3906. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3907. /// \note 不需要调用 @link #CameraReleaseImageBuffer @endlink
  3908. /// \~english
  3909. /// \brief Get a frame of image data. The image obtained by this interface is the processed RGB format.
  3910. /// \param [in] hCamera Camera handle.
  3911. /// \param [out] pImageData The buffer to receive the image data, the size must match the format specified by uOutFormat, otherwise the data will overflow
  3912. /// \param [in] uOutFormat output format 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  3913. /// \param [out] piWidth Returns the width of the image
  3914. /// \param [out] piHeight Returns the height of the image
  3915. /// \param [in] wTimes The time-out time for capturing images.
  3916. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3917. /// \note does not need to call @link #CameraReleaseImageBuffer @endlink
  3918. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBufferEx2(
  3919. CameraHandle hCamera,
  3920. BYTE* pImageData,
  3921. UINT uOutFormat,
  3922. int* piWidth,
  3923. int* piHeight,
  3924. UINT wTimes
  3925. );
  3926. /// @ingroup API_GRAB
  3927. /// \~chinese
  3928. /// \brief 获得一帧图像数据。该接口获得的图像是经过处理后的RGB格式。
  3929. /// \param [in] hCamera 相机的句柄。
  3930. /// \param [out] pImageData 接收图像数据的缓冲区,大小必须和uOutFormat指定的格式相匹配,否则数据会溢出
  3931. /// \param [in] uOutFormat 输出格式 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  3932. /// \param [out] piWidth 整形指针,返回图像的宽度
  3933. /// \param [out] piHeight 整形指针,返回图像的高度
  3934. /// \param [out] puTimeStamp 返回图像时间戳
  3935. /// \param [in] wTimes 抓取图像的超时时间。
  3936. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3937. /// \note 不需要调用 @link #CameraReleaseImageBuffer @endlink
  3938. /// \~english
  3939. /// \brief Get a frame of image data. The image obtained by this interface is the processed RGB format.
  3940. /// \param [in] hCamera Camera handle.
  3941. /// \param [out] pImageData The buffer to receive the image data, the size must match the format specified by uOutFormat, otherwise the data will overflow
  3942. /// \param [in] uOutFormat output format 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  3943. /// \param [out] piWidth Returns the width of the image
  3944. /// \param [out] piHeight Returns the height of the image
  3945. /// \param [out] puTimeStamp returns image timestamp
  3946. /// \param [in] wTimes The time-out time for capturing images.
  3947. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3948. /// \note does not need to call @link #CameraReleaseImageBuffer @endlink
  3949. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBufferEx3(
  3950. CameraHandle hCamera,
  3951. BYTE*pImageData,
  3952. UINT uOutFormat,
  3953. int *piWidth,
  3954. int *piHeight,
  3955. UINT* puTimeStamp,
  3956. UINT wTimes
  3957. );
  3958. /// @ingroup API_BASIC
  3959. /// \~chinese
  3960. /// \brief 获得该相机的一些特性。
  3961. /// \param [in] hCamera 相机的句柄。
  3962. /// \param [out] pMaxWidth 返回该相机最大分辨率的宽度
  3963. /// \param [out] pMaxHeight 返回该相机最大分辨率的高度
  3964. /// \param [out] pbColorCamera 返回该相机是否是彩色相机。1表示彩色相机,0表示黑白相机
  3965. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3966. /// \~english
  3967. /// \brief Get some of the camera's features.
  3968. /// \param [in] hCamera Camera handle.
  3969. /// \param [out] pMaxWidth Returns the width of the camera's maximum resolution
  3970. /// \param [out] pMaxHeight Returns the height of the camera's maximum resolution
  3971. /// \param [out] pbColorCamera Returns whether the camera is a color camera. 1 indicates a color camera, 0 indicates a black and white camera
  3972. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3973. MVSDK_API CameraSdkStatus __stdcall CameraGetCapabilityEx2(
  3974. CameraHandle hCamera,
  3975. int* pMaxWidth,
  3976. int* pMaxHeight,
  3977. int* pbColorCamera
  3978. );
  3979. /// @ingroup API_RECONNECT
  3980. /// \~chinese
  3981. /// \brief 重新连接设备,用于连接恢复后手动重连
  3982. /// \param [in] hCamera 相机的句柄。
  3983. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  3984. /// \warning 相机默认使能了自动重连,在自动重连模式中请勿调用本函数。@see CameraSetAutoConnect
  3985. /// \~english
  3986. /// \brief Reconnect the device to manually reconnect after the connection is restored
  3987. /// \param [in] hCamera Camera handle.
  3988. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  3989. /// \warning The camera automatically enables reconnection by default. Do not call this function in auto reconnect mode. @see CameraSetAutoConnect
  3990. MVSDK_API CameraSdkStatus __stdcall CameraReConnect(
  3991. CameraHandle hCamera
  3992. );
  3993. /// @ingroup API_RECONNECT
  3994. /// \~chinese
  3995. /// \brief 测试相机的连接状态,用于检测相机是否掉线
  3996. /// \param [in] hCamera 相机的句柄。
  3997. /// \return 连接正常返回CAMERA_STATUS_SUCCESS(0)。否则表示已掉线
  3998. /// \~english
  3999. /// \brief Test camera connection status to detect if camera is dropped
  4000. /// \param [in] hCamera Camera handle.
  4001. /// \return The connection normally returns CAMERA_STATUS_SUCCESS(0). Otherwise it is dropped
  4002. MVSDK_API CameraSdkStatus __stdcall CameraConnectTest(
  4003. CameraHandle hCamera
  4004. );
  4005. /// @ingroup API_ADVANCE
  4006. /// \~chinese
  4007. /// \brief 设置相机的LED使能状态,不带LED的型号,此函数返回错误代码,表示不支持。
  4008. /// \param [in] hCamera 相机的句柄。
  4009. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4010. /// \param [in] enable 使能状态
  4011. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4012. /// \~english
  4013. /// \brief Set the camera's LED enable status, without the LED's model, this function returns an error code indicating that it is not supported.
  4014. /// \param [in] hCamera Camera handle.
  4015. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4016. /// \param [in] enable enable state
  4017. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4018. MVSDK_API CameraSdkStatus __stdcall CameraSetLedEnable(
  4019. CameraHandle hCamera,
  4020. int index,
  4021. BOOL enable
  4022. );
  4023. /// @ingroup API_ADVANCE
  4024. /// \~chinese
  4025. /// \brief 获得相机的LED使能状态,不带LED的型号,此函数返回错误代码,表示不支持。
  4026. /// \param [in] hCamera 相机的句柄。
  4027. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4028. /// \param [out] enable 指针,返回LED使能状态
  4029. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4030. /// \~english
  4031. /// \brief Get the camera's LED enable status, without the LED's model, this function returns an error code indicating that it is not supported.
  4032. /// \param [in] hCamera Camera handle.
  4033. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4034. /// \param [out] enable Return LED enable status
  4035. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4036. MVSDK_API CameraSdkStatus __stdcall CameraGetLedEnable(
  4037. CameraHandle hCamera,
  4038. int index,
  4039. BOOL* enable
  4040. );
  4041. /// @ingroup API_ADVANCE
  4042. /// \~chinese
  4043. /// \brief 设置相机的LED开关状态,不带LED的型号,此函数返回错误代码,表示不支持。
  4044. /// \param [in] hCamera 相机的句柄。
  4045. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4046. /// \param [in] onoff LED开关状态
  4047. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4048. /// \~english
  4049. /// \brief Set the camera's LED switch status, without the LED's model, this function returns an error code indicating that it is not supported.
  4050. /// \param [in] hCamera Camera handle.
  4051. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4052. /// \param [in] onoff LED on/off status
  4053. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4054. MVSDK_API CameraSdkStatus __stdcall CameraSetLedOnOff(
  4055. CameraHandle hCamera,
  4056. int index,
  4057. BOOL onoff
  4058. );
  4059. /// @ingroup API_ADVANCE
  4060. /// \~chinese
  4061. /// \brief 获得相机的LED开关状态,不带LED的型号,此函数返回错误代码,表示不支持。
  4062. /// \param [in] hCamera 相机的句柄。
  4063. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4064. /// \param [out] onoff 返回LED开关状态
  4065. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4066. /// \~english
  4067. /// \brief Get the camera's LED switch status, without the LED model, this function returns an error code that does not support.
  4068. /// \param [in] hCamera Camera handle.
  4069. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4070. /// \param [out] onoff Returns LED switch status
  4071. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4072. MVSDK_API CameraSdkStatus __stdcall CameraGetLedOnOff(
  4073. CameraHandle hCamera,
  4074. int index,
  4075. BOOL* onoff
  4076. );
  4077. /// @ingroup API_ADVANCE
  4078. /// \~chinese
  4079. /// \brief 设置相机的LED持续时间,不带LED的型号,此函数返回错误代码,表示不支持。
  4080. /// \param [in] hCamera 相机的句柄。
  4081. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4082. /// \param [in] duration LED持续时间,单位毫秒
  4083. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4084. /// \~english
  4085. /// \brief Set the camera's LED duration, without the LED model, this function returns an error code indicating that it is not supported.
  4086. /// \param [in] hCamera Camera handle.
  4087. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4088. /// \param [in] duration LED duration in milliseconds
  4089. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4090. MVSDK_API CameraSdkStatus __stdcall CameraSetLedDuration(
  4091. CameraHandle hCamera,
  4092. int index,
  4093. UINT duration
  4094. );
  4095. /// @ingroup API_ADVANCE
  4096. /// \~chinese
  4097. /// \brief 获得相机的LED持续时间,不带LED的型号,此函数返回错误代码,表示不支持。
  4098. /// \param [in] hCamera 相机的句柄。
  4099. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4100. /// \param [out] duration 返回LED持续时间,单位毫秒
  4101. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4102. /// \~english
  4103. /// \brief Get the camera's LED duration, without the LED model, this function returns an error code indicating that it is not supported.
  4104. /// \param [in] hCamera Camera handle.
  4105. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4106. /// \param [out] duration Returns the LED duration in milliseconds
  4107. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4108. MVSDK_API CameraSdkStatus __stdcall CameraGetLedDuration(
  4109. CameraHandle hCamera,
  4110. int index,
  4111. UINT* duration
  4112. );
  4113. /// @ingroup API_ADVANCE
  4114. /// \~chinese
  4115. /// \brief 设置相机的LED亮度,不带LED的型号,此函数返回错误代码,表示不支持。
  4116. /// \param [in] hCamera 相机的句柄。
  4117. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4118. /// \param [in] uBrightness LED亮度值,范围0到255. 0表示关闭,255最亮。
  4119. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4120. /// \~english
  4121. /// \brief Set the camera's LED brightness, without the LED model, this function returns an error code indicating that it is not supported.
  4122. /// \param [in] hCamera Camera handle.
  4123. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4124. /// \param [in] uBrightness LED brightness value, range 0 to 255. 0 means off, 255 brightest.
  4125. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4126. MVSDK_API CameraSdkStatus __stdcall CameraSetLedBrightness(
  4127. CameraHandle hCamera,
  4128. int index,
  4129. UINT uBrightness
  4130. );
  4131. /// @ingroup API_ADVANCE
  4132. /// \~chinese
  4133. /// \brief 获得相机的LED亮度,不带LED的型号,此函数返回错误代码,表示不支持。
  4134. /// \param [in] hCamera 相机的句柄。
  4135. /// \param [in] index LED灯的索引号,从0开始。如果只有一个可控制亮度的LED,则该参数为0 。
  4136. /// \param [out] uBrightness 指针,返回LED亮度值,范围0到255. 0表示关闭,255最亮。
  4137. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4138. /// \~english
  4139. /// \brief Get the camera's LED brightness, without the LED model, this function returns an error code that does not support.
  4140. /// \param [in] hCamera Camera handle.
  4141. /// \param [in] index The index of the LED, starting from 0. If there is only one LED that can control the brightness, this parameter is 0.
  4142. /// \param [out] uBrightness Returns the LED brightness value in the range 0 to 255. 0 means off, 255 is the brightest.
  4143. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4144. MVSDK_API CameraSdkStatus __stdcall CameraGetLedBrightness(
  4145. CameraHandle hCamera,
  4146. int index,
  4147. UINT* uBrightness
  4148. );
  4149. /// @ingroup API_ADVANCE
  4150. /// \~chinese
  4151. /// \brief 使能或者禁止相机的多区域传输功能,不带该功能的型号,此函数返回错误代码,表示不支持。
  4152. /// \param [in] hCamera 相机的句柄。
  4153. /// \param [in] uEnableMask 区域使能状态掩码,对应的比特位为1表示使能。0为禁止。目前SDK支持4个可编辑区域,index范围为0到3,即bit0 ,bit1,bit2,bit3控制4个区域的使能状态。
  4154. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4155. /// \note 该功能主要用于在相机端将采集的整幅画面切分,只传输指定的多个区域,以提高传输帧率。多个区域传输到PC上后,会自动拼接成整幅画面,没有被传输的部分,会用黑色填充。
  4156. /// \~english
  4157. /// \brief Enables or disables the camera's multi-zone transfer function. For models without this function, this function returns an error code indicating that it is not supported.
  4158. /// \param [in] hCamera Camera handle.
  4159. /// \param [in] uEnableMask Area enable mask. The corresponding bit is 1 to enable. 0 is prohibited. Currently, the SDK supports four editable regions. The index range is 0 to 3, that is, bit0, bit1, bit2, and bit3 control the enabling status of the four regions.
  4160. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4161. /// \note This function is mainly used to split the entire picture collected on the camera side and only transmit specified multiple areas to increase the transmission frame rate. After multiple areas are transferred to the PC, they will be automatically spliced into an entire frame. Parts that have not been transmitted will be filled with black.
  4162. MVSDK_API CameraSdkStatus __stdcall CameraEnableTransferRoi(
  4163. CameraHandle hCamera,
  4164. UINT uEnableMask
  4165. );
  4166. /// @ingroup API_ADVANCE
  4167. /// \~chinese
  4168. /// \brief 设置相机传输的裁剪区域。在相机端,图像从传感器上被采集后,将会被裁剪成指定的区域来传送,此函数返回错误代码,表示不支持。
  4169. /// \param [in] hCamera 相机的句柄。
  4170. /// \param [in] index ROI区域的索引号,从0开始。
  4171. /// \param [in] X1 ROI区域的左上角X坐标
  4172. /// \param [in] Y1 ROI区域的左上角Y坐标
  4173. /// \param [in] X2 ROI区域的右下角X坐标
  4174. /// \param [in] Y2 ROI区域的右下角Y坐标
  4175. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4176. /// \~english
  4177. /// \brief Sets the clipping area for camera transmission. On the camera side, after the image is captured from the sensor, it will be cropped to the specified area for transmission. This function returns an error code indicating that it is not supported.
  4178. /// \param [in] hCamera Camera handle.
  4179. /// \param [in] index The index number of the ROI region, starting at 0.
  4180. /// \param [in] X1 The X coordinate of the upper left corner of ROI area
  4181. /// \param [in] Y1 The Y coordinate of the upper left corner of ROI area
  4182. /// \param [in] X2 The X coordinate of the lower right corner of ROI area
  4183. /// \param [in] Y2 The Y coordinate of the lower right corner of ROI area
  4184. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4185. MVSDK_API CameraSdkStatus __stdcall CameraSetTransferRoi(
  4186. CameraHandle hCamera,
  4187. int index,
  4188. UINT X1,
  4189. UINT Y1,
  4190. UINT X2,
  4191. UINT Y2
  4192. );
  4193. /// @ingroup API_ADVANCE
  4194. /// \~chinese
  4195. /// \brief 获取相机传输的裁剪区域。在相机端,图像从传感器上被采集后,将会被裁剪成指定的区域来传送,此函数返回错误代码,表示不支持。
  4196. /// \param [in] hCamera 相机的句柄。
  4197. /// \param [in] index ROI区域的索引号,从0开始。
  4198. /// \param [out] pX1 ROI区域的左上角X坐标
  4199. /// \param [out] pY1 ROI区域的左上角Y坐标
  4200. /// \param [out] pX2 ROI区域的右下角X坐标
  4201. /// \param [out] pY2 ROI区域的右下角Y坐标
  4202. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4203. /// \~english
  4204. /// \brief Get the cropped area of the camera transmission. On the camera side, after the image is captured from the sensor, it will be cropped to the specified area for transmission. This function returns an error code indicating that it is not supported.
  4205. /// \param [in] hCamera Camera handle.
  4206. /// \param [in] index The index number of the ROI region, starting at 0.
  4207. /// \param [out] pX1 Returns the X coordinate of the upper left corner of the ROI area
  4208. /// \param [out] pY1 Returns the Y coordinate of the upper left corner of the ROI area
  4209. /// \param [out] pX2 Returns the X coordinate of the lower right corner of the ROI area
  4210. /// \param [out] pY2 Returns the Y coordinate of the lower right corner of the ROI area
  4211. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4212. MVSDK_API CameraSdkStatus __stdcall CameraGetTransferRoi(
  4213. CameraHandle hCamera,
  4214. int index,
  4215. UINT* pX1,
  4216. UINT* pY1,
  4217. UINT* pX2,
  4218. UINT* pY2
  4219. );
  4220. /// @ingroup API_UTIL
  4221. /// \~chinese
  4222. /// \brief 申请一段对齐的内存空间。功能和malloc类似,但是返回的内存是以align指定的字节数对齐的。
  4223. /// \param [in] size 空间的大小。
  4224. /// \param [in] align 地址对齐的字节数。
  4225. /// \return 成功时,返回非0值,表示内存首地址。失败返回NULL。
  4226. /// \note 分配的内存必须使用@link #CameraAlignFree @endlink释放
  4227. /// \~english
  4228. /// \brief Apply for an aligned memory space. The function is similar to malloc, but the returned memory is aligned with the number of bytes specified by align.
  4229. /// \param [in] size Size of the space.
  4230. /// \param [in] align The number of aligned bytes.
  4231. /// \return Successful a non-zero value is returned indicating the first address of the memory. Fails to return NULL.
  4232. /// \note Memory allocated must be freed using @link #CameraAlignFree @endlink
  4233. MVSDK_API BYTE* __stdcall CameraAlignMalloc(
  4234. int size,
  4235. int align
  4236. );
  4237. /// @ingroup API_UTIL
  4238. /// \~chinese
  4239. /// \brief 释放由@link #CameraAlignMalloc @endlink函数分配的内存空间。
  4240. /// \param [in] membuffer 内存地址
  4241. /// \~english
  4242. /// \brief Releases the memory space allocated by the @link #CameraAlignMalloc @endlink function.
  4243. /// \param [in] membuffer memory address
  4244. MVSDK_API void __stdcall CameraAlignFree(
  4245. BYTE* membuffer
  4246. );
  4247. /// @ingroup API_RECONNECT
  4248. /// \~chinese
  4249. /// \brief 启用或禁用自动重连,默认为启用。
  4250. /// \param [in] hCamera 相机的句柄。
  4251. /// \param [in] bEnable 使能相机重连,当位TRUE时,SDK内部自动检测相机是否掉线,掉线后自己重连。
  4252. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4253. /// \~english
  4254. /// \brief Enables or disables automatic reconnection. The default is enabled.
  4255. /// \param [in] hCamera Camera handle.
  4256. /// \param [in] bEnable Enables the camera to reconnect. When TRUE, the SDK automatically detects if the camera is dropped and reconnects itself after disconnection.
  4257. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4258. MVSDK_API CameraSdkStatus __stdcall CameraSetAutoConnect(CameraHandle hCamera,BOOL bEnable);
  4259. /// @ingroup API_RECONNECT
  4260. /// \~chinese
  4261. /// \brief 获取自动重连使能状态
  4262. /// \param [in] hCamera 相机的句柄。
  4263. /// \param [out] pbEnable 返回相机自动重连使能状态
  4264. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4265. /// \~english
  4266. /// \brief Get Automatic Reconnect Enable Status
  4267. /// \param [in] hCamera Camera handle.
  4268. /// \param [out] pbEnable Returns the camera's auto reconnect status
  4269. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4270. MVSDK_API CameraSdkStatus __stdcall CameraGetAutoConnect(CameraHandle hCamera,BOOL *pbEnable);
  4271. /// @ingroup API_RECONNECT
  4272. /// \~chinese
  4273. /// \brief 获得相机自动重连的次数,前提是@link #CameraSetAutoConnect @endlink使能相机自动重连功能。默认是使能的。
  4274. /// \param [in] hCamera 相机的句柄。
  4275. /// \param [out] puCounts 返回自动重连的次数
  4276. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4277. /// \~english
  4278. /// \brief Get the number of times the camera automatically reconnects, provided @link #CameraSetAutoConnect @endlink enables automatic camera reconnection. The default is enabled.
  4279. /// \param [in] hCamera Camera handle.
  4280. /// \param [out] puCounts returns the number of automatic reconnections
  4281. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4282. MVSDK_API CameraSdkStatus __stdcall CameraGetReConnectCounts(CameraHandle hCamera,UINT* puCounts);
  4283. /// @ingroup API_ADVANCE
  4284. /// \~chinese
  4285. /// \brief 启用或禁用单帧抓取模式,默认为禁用。(本功能仅USB2.0相机支持)
  4286. /// \param [in] hCamera 相机的句柄。
  4287. /// \param [in] bEnable 使能单帧抓取模式
  4288. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4289. /// \note 每当成功抓取到一帧后SDK会进入暂停状态,从而不再占用USB带宽,主要用于多相机轮流拍照的场景。
  4290. /// \~english
  4291. /// \brief Enables or disables single-frame crawl mode, which is disabled by default. (This function is only supported by USB2.0 camera)
  4292. /// \param [in] hCamera Camera handle.
  4293. /// \param [in] bEnable enables single-frame mode
  4294. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4295. /// \note Whenever a frame is successfully captured, the SDK enters a pause state, so that it no longer occupies the USB bandwidth. It is mainly used in scenes where multiple cameras take pictures.
  4296. MVSDK_API CameraSdkStatus __stdcall CameraSetSingleGrabMode(CameraHandle hCamera, BOOL bEnable);
  4297. /// @ingroup API_ADVANCE
  4298. /// \~chinese
  4299. /// \brief 获得相机的单帧抓取使能状态
  4300. /// \param [in] hCamera 相机的句柄。
  4301. /// \param [out] pbEnable 返回相机的单帧抓取模式使能状态
  4302. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4303. /// \~english
  4304. /// \brief Get the camera's single frame capture enable status
  4305. /// \param [in] hCamera Camera handle.
  4306. /// \param [out] pbEnable Returns the camera's single frame capture mode enable status
  4307. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4308. MVSDK_API CameraSdkStatus __stdcall CameraGetSingleGrabMode(CameraHandle hCamera, BOOL* pbEnable);
  4309. /// @ingroup API_ADVANCE
  4310. /// \~chinese
  4311. /// \brief 当相机处于单帧抓取模式时,每当成功抓取到一帧后SDK会进入暂停状态,调用此函数可使SDK退出暂停状态并开始抓取下一帧
  4312. /// \param [in] hCamera 相机的句柄。
  4313. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4314. /// \~english
  4315. /// \brief When the camera is in the single frame capture mode, the SDK will enter a pause state after successfully capturing a frame. Calling this function will cause the SDK to exit the pause state and start to grab the next frame.
  4316. /// \param [in] hCamera Camera handle.
  4317. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4318. MVSDK_API CameraSdkStatus __stdcall CameraRestartGrab(CameraHandle hCamera);
  4319. /// @ingroup API_UTIL
  4320. /// \~chinese
  4321. /// \brief 图片清晰度评估
  4322. /// \param [in] hCamera 相机的句柄。
  4323. /// \param [in] iAlgorithSel 使用的评估算法,参考@link emEvaluateDefinitionAlgorith @endlink的定义
  4324. /// \param [in] pbyIn 输入图像数据的缓冲区地址,不能为NULL。
  4325. /// \param [in] pFrInfo 输入图像的帧头信息
  4326. /// \param [out] DefinitionValue 返回的清晰度估值(越大越清晰)
  4327. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4328. /// \~english
  4329. /// \brief Image clarity assessment
  4330. /// \param [in] hCamera Camera handle.
  4331. /// \param [in] iAlgorithSel The currently used evaluation algorithm, see @link emEvaluateDefinitionAlgorith @endlink
  4332. /// \param [in] pbyIn The buffer address of the input image data. Cannot be NULL.
  4333. /// \param [in] pFrInfo input image frame header information
  4334. /// \param [out] DefinitionValue Returns the sharpness value (greater the clearer)
  4335. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4336. MVSDK_API CameraSdkStatus __stdcall CameraEvaluateImageDefinition(
  4337. CameraHandle hCamera,
  4338. INT iAlgorithSel,
  4339. BYTE* pbyIn,
  4340. tSdkFrameHead* pFrInfo,
  4341. double* DefinitionValue
  4342. );
  4343. /// @ingroup API_UTIL
  4344. /// \~chinese
  4345. /// \brief 在输入的图像数据中绘制文字
  4346. /// \param [inout] pRgbBuffer 图像数据缓冲区
  4347. /// \param [in] pFrInfo 图像的帧头信息
  4348. /// \param [in] pFontFileName 字体文件名
  4349. /// \param [in] FontWidth 字体宽度
  4350. /// \param [in] FontHeight 字体高度
  4351. /// \param [in] pText 要输出的文字
  4352. /// \param [in] Left 文字的输出矩形
  4353. /// \param [in] Top 文字的输出矩形
  4354. /// \param [in] Width 文字的输出矩形
  4355. /// \param [in] Height 文字的输出矩形
  4356. /// \param [in] TextColor 文字颜色RGB
  4357. /// \param [in] uFlags 输出标志,详见@link #emCameraDrawTextFlags @endlink中的定义
  4358. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4359. /// \~english
  4360. /// \brief Draw text in the input image data
  4361. /// \param [inout] pRgbBuffer image data buffer
  4362. /// \param [in] pFrInfo frame header information
  4363. /// \param [in] pFontFileName font file name
  4364. /// \param [in] FontWidth font width
  4365. /// \param [in] FontHeight font height
  4366. /// \param [in] pText Text to output
  4367. /// \param [in] Left text output rectangle
  4368. /// \param [in] Top text output rectangle
  4369. /// \param [in] Width Output rectangle of text
  4370. /// \param [in] Height the output rectangle of the text
  4371. /// \param [in] TextColor Text Color RGB
  4372. /// \param [in] uFlags output flags, as defined in @link #emCameraDrawTextFlags @endlink
  4373. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4374. MVSDK_API CameraSdkStatus __stdcall CameraDrawText(
  4375. BYTE* pRgbBuffer,
  4376. tSdkFrameHead* pFrInfo,
  4377. char const* pFontFileName,
  4378. UINT FontWidth,
  4379. UINT FontHeight,
  4380. char const* pText,
  4381. INT Left,
  4382. INT Top,
  4383. UINT Width,
  4384. UINT Height,
  4385. UINT TextColor,
  4386. UINT uFlags
  4387. );
  4388. /// @ingroup API_ENUM
  4389. /// \~chinese
  4390. /// \brief 从指定IP枚举GIGE设备,并建立设备列表(适用于相机和电脑不在同一网段的情况)
  4391. /// \param [in] ppIpList 目标IP
  4392. /// \param [in] numIp 目标IP个数
  4393. /// \param [out] pCameraList 设备列表数组指针
  4394. /// \param [inout] piNums 设备的个数指针,调用时传入pCameraList数组的元素个数,函数返回时,保存实际找到的设备个数
  4395. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义
  4396. /// \warning piNums指向的值必须初始化,且不超过pCameraList数组元素个数,否则有可能造成内存溢出
  4397. /// \note 返回的相机信息列表,会根据acFriendlyName排序的。例如可以将两个相机分别改为“Camera1”和“Camera2”的名字后,名字为“Camera1”的相机会排前面,名为“Camera2”的相机排后面。
  4398. /// \~english
  4399. /// \brief Enumerates GIGE devices from the specified IP and builds a device list (applicable when the camera and computer are not on the same network segment)
  4400. /// \param [in] ppIpList target IP
  4401. /// \param [in] numIp number of target IPs
  4402. /// \param [out] pCameraList Device list array pointer
  4403. /// \param [inout] piNums The number of pointers to the device, the number of elements passed to the pCameraList array at the time of the call. When the function returns, the number of devices actually found is saved.
  4404. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4405. /// \warning piNums The value pointed to must be initialized and does not exceed the number of pCameraList array elements, otherwise it may cause memory overflow
  4406. /// \note The list of returned camera information will be sorted according to acFriendlyName. For example, after changing the two cameras to the names of "Camera1" and "Camera2," the camera named "Camera1" will be in front, and the camera named "Camera2" will be behind the row.
  4407. MVSDK_API CameraSdkStatus __stdcall CameraGigeEnumerateDevice(
  4408. char const** ppIpList,
  4409. int numIp,
  4410. tSdkCameraDevInfo* pCameraList,
  4411. int* piNums
  4412. );
  4413. /// @ingroup API_UTIL
  4414. /// \~chinese
  4415. /// \brief 获取GIGE相机的IP地址
  4416. /// \param [in] pCameraInfo 相机的设备描述信息,可由@link #CameraEnumerateDevice @endlink函数获得。
  4417. /// \param [out] CamIp 相机IP(注意:必须保证传入的缓冲区大于等于16字节)
  4418. /// \param [out] CamMask 相机子网掩码(注意:必须保证传入的缓冲区大于等于16字节)
  4419. /// \param [out] CamGateWay 相机网关(注意:必须保证传入的缓冲区大于等于16字节)
  4420. /// \param [out] EtIp 网卡IP(注意:必须保证传入的缓冲区大于等于16字节)
  4421. /// \param [out] EtMask 网卡子网掩码(注意:必须保证传入的缓冲区大于等于16字节)
  4422. /// \param [out] EtGateWay 网卡网关(注意:必须保证传入的缓冲区大于等于16字节)
  4423. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4424. /// \~english
  4425. /// \brief Get the GIGE camera's IP address
  4426. /// \param [in] pCameraInfo camera's device description information can be obtained by @link #CameraEnumerateDevice @endlink function.
  4427. /// \param [out] CamIp camera IP (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4428. /// \param [out] CamMask camera subnet mask (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4429. /// \param [out] CamGateWay camera gateway (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4430. /// \param [out] EtIp network card IP (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4431. /// \param [out] EtMask subnet mask (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4432. /// \param [out] EtGateWay NIC Gateway (Note: must ensure that the incoming buffer is greater than or equal to 16 bytes)
  4433. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4434. MVSDK_API CameraSdkStatus __stdcall CameraGigeGetIp(
  4435. tSdkCameraDevInfo* pCameraInfo,
  4436. char* CamIp,
  4437. char* CamMask,
  4438. char* CamGateWay,
  4439. char* EtIp,
  4440. char* EtMask,
  4441. char* EtGateWay
  4442. );
  4443. /// @ingroup API_UTIL
  4444. /// \~chinese
  4445. /// \brief 设置GIGE相机的IP地址
  4446. /// \param [in] pCameraInfo 相机的设备描述信息,可由@link #CameraEnumerateDevice @endlink函数获得。
  4447. /// \param [in] Ip 相机IP(如:192.168.1.100)
  4448. /// \param [in] SubMask 相机子网掩码(如:255.255.255.0)
  4449. /// \param [in] GateWay 相机网关(如:192.168.1.1)
  4450. /// \param [in] bPersistent TRUE: 设置相机为固定IP,FALSE:设置相机自动分配IP(忽略参数Ip, SubMask, GateWay)
  4451. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4452. /// \~english
  4453. /// \brief Set the GIGE camera's IP address
  4454. /// \param [in] pCameraInfo camera's device description information can be obtained by @link #CameraEnumerateDevice @endlink function.
  4455. /// \param [in] Ip camera IP (eg 192.168.1.100)
  4456. /// \param [in] SubMask camera subnet mask (eg 255.255.255.0)
  4457. /// \param [in] GateWay Camera Gateway (eg 192.168.1.1)
  4458. /// \param [in] bPersistent TRUE: Set camera to fixed IP, FALSE: Set camera to assign IP automatically (ignoring parameters Ip, SubMask, GateWay)
  4459. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4460. MVSDK_API CameraSdkStatus __stdcall CameraGigeSetIp(
  4461. tSdkCameraDevInfo* pCameraInfo,
  4462. char const* Ip,
  4463. char const* SubMask,
  4464. char const* GateWay,
  4465. BOOL bPersistent
  4466. );
  4467. /// @ingroup API_UTIL
  4468. /// \~chinese
  4469. /// \brief 获取GIGE相机的MAC地址
  4470. /// \param [in] pCameraInfo 相机的设备描述信息,可由@link #CameraEnumerateDevice @endlink函数获得。
  4471. /// \param [out] CamMac 相机MAC(注意:必须保证传入的缓冲区大于等于18字节)
  4472. /// \param [out] EtMac 网卡MAC(注意:必须保证传入的缓冲区大于等于18字节)
  4473. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4474. /// \~english
  4475. /// \brief Select the LUT table in the preset LUT mode.
  4476. /// \param [in] pCameraInfo camera's device description information can be obtained by @link #CameraEnumerateDevice @endlink function.
  4477. /// \param [out] CamMac camera MAC (Note: must ensure that the incoming buffer is greater than or equal to 18 bytes)
  4478. /// \param [out] EtMac network card MAC (Note: must ensure that the incoming buffer is greater than or equal to 18 bytes)
  4479. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4480. MVSDK_API CameraSdkStatus __stdcall CameraGigeGetMac(
  4481. tSdkCameraDevInfo* pCameraInfo,
  4482. char* CamMac,
  4483. char* EtMac
  4484. );
  4485. /// @ingroup API_ADVANCE
  4486. /// \~chinese
  4487. /// \brief 使能快速响应
  4488. /// \param [in] hCamera 相机的句柄。
  4489. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4490. /// \~english
  4491. /// \brief Enable quick response
  4492. /// \param [in] hCamera Camera handle.
  4493. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4494. MVSDK_API CameraSdkStatus __stdcall CameraEnableFastResponse(
  4495. CameraHandle hCamera
  4496. );
  4497. /// @ingroup API_DEAD_PIXEL
  4498. /// \~chinese
  4499. /// \brief 使能坏点修正
  4500. /// \param [in] hCamera 相机的句柄。
  4501. /// \param [in] bEnable TRUE: 使能坏点修正 FALSE: 关闭坏点修正
  4502. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4503. /// \~english
  4504. /// \brief Enable dead pixel correction
  4505. /// \param [in] hCamera Camera handle.
  4506. /// \param [in] bEnable TRUE: Enable dead pixel correction FALSE: Turn off dead pixel correction
  4507. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4508. MVSDK_API CameraSdkStatus __stdcall CameraSetCorrectDeadPixel(
  4509. CameraHandle hCamera,
  4510. BOOL bEnable
  4511. );
  4512. /// @ingroup API_DEAD_PIXEL
  4513. /// \~chinese
  4514. /// \brief 获取坏点修正使能状态
  4515. /// \param [in] hCamera 相机的句柄。
  4516. /// \param [out] pbEnable 返回使能状态
  4517. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4518. /// \~english
  4519. /// \brief Get dead pixel correction enabled
  4520. /// \param [in] hCamera Camera handle.
  4521. /// \param [out] pbEnable Returns enable state
  4522. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4523. MVSDK_API CameraSdkStatus __stdcall CameraGetCorrectDeadPixel(
  4524. CameraHandle hCamera,
  4525. BOOL* pbEnable
  4526. );
  4527. /// @ingroup API_ENHANCE
  4528. /// \~chinese
  4529. /// \brief 使能平场校正
  4530. /// \param [in] hCamera 相机的句柄。
  4531. /// \param [in] bEnable TRUE: 使能平场校正 FALSE: 关闭平场校正
  4532. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4533. /// \~english
  4534. /// \brief Enable flat field correction
  4535. /// \param [in] hCamera Camera handle.
  4536. /// \param [in] bEnable TRUE: Enable flat field correction FALSE: Turn off flat field correction
  4537. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4538. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectSetEnable(
  4539. CameraHandle hCamera,
  4540. BOOL bEnable
  4541. );
  4542. /// @ingroup API_ENHANCE
  4543. /// \~chinese
  4544. /// \brief 获取平场校正使能状态
  4545. /// \param [in] hCamera 相机的句柄。
  4546. /// \param [out] pbEnable 返回使能状态
  4547. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4548. /// \~english
  4549. /// \brief Get Plane Correction Enable Status
  4550. /// \param [in] hCamera Camera handle.
  4551. /// \param [out] pbEnable Returns enable state
  4552. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4553. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectGetEnable(
  4554. CameraHandle hCamera,
  4555. BOOL* pbEnable
  4556. );
  4557. /// @ingroup API_ENHANCE
  4558. /// \~chinese
  4559. /// \brief 设置平场校正参数
  4560. /// \param [in] hCamera 相机的句柄。
  4561. /// \param [in] pDarkFieldingImage 暗场图片
  4562. /// \param [in] pDarkFieldingFrInfo 暗场图片信息
  4563. /// \param [in] pLightFieldingImage 明场图片
  4564. /// \param [in] pLightFieldingFrInfo 明场图片信息
  4565. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4566. /// \~english
  4567. /// \brief Set flat field correction parameters
  4568. /// \param [in] hCamera Camera handle.
  4569. /// \param [in] pDarkFieldingImage dark field image
  4570. /// \param [in] pDarkFieldingFrInfo dark field image information
  4571. /// \param [in] pLightFieldingImage Brightfield image
  4572. /// \param [in] pLightFieldingFrInfo Brightfield image information
  4573. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4574. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectSetParameter(
  4575. CameraHandle hCamera,
  4576. BYTE const* pDarkFieldingImage,
  4577. tSdkFrameHead const* pDarkFieldingFrInfo,
  4578. BYTE const* pLightFieldingImage,
  4579. tSdkFrameHead const* pLightFieldingFrInfo
  4580. );
  4581. /// @ingroup API_ENHANCE
  4582. /// \~chinese
  4583. /// \brief 获取平场校正参数的状态
  4584. /// \param [in] hCamera 相机的句柄。
  4585. /// \param [out] pbValid 返回参数是否有效
  4586. /// \param [out] pFilePath 返回参数文件的路径
  4587. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4588. /// \~english
  4589. /// \brief Get status of flat field correction parameters
  4590. /// \param [in] hCamera Camera handle.
  4591. /// \param [out] pbValid Return whether the parameter is valid
  4592. /// \param [out] pFilePath Returns the path of the parameter file
  4593. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4594. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectGetParameterState(
  4595. CameraHandle hCamera,
  4596. BOOL *pbValid,
  4597. char *pFilePath
  4598. );
  4599. /// @ingroup API_ENHANCE
  4600. /// \~chinese
  4601. /// \brief 保存平场校正参数到文件
  4602. /// \param [in] hCamera 相机的句柄。
  4603. /// \param [in] pszFileName 文件路径
  4604. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4605. /// \~english
  4606. /// \brief Save flat correction parameters to file
  4607. /// \param [in] hCamera Camera handle.
  4608. /// \param [in] pszFileName file path
  4609. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4610. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectSaveParameterToFile(
  4611. CameraHandle hCamera,
  4612. char const* pszFileName
  4613. );
  4614. /// @ingroup API_ENHANCE
  4615. /// \~chinese
  4616. /// \brief 从文件中加载平场校正参数
  4617. /// \param [in] hCamera 相机的句柄。
  4618. /// \param [in] pszFileName 文件路径
  4619. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4620. /// \~english
  4621. /// \brief Load flat field correction parameters from file
  4622. /// \param [in] hCamera Camera handle.
  4623. /// \param [in] pszFileName file path
  4624. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4625. MVSDK_API CameraSdkStatus __stdcall CameraFlatFieldingCorrectLoadParameterFromFile(
  4626. CameraHandle hCamera,
  4627. char const* pszFileName
  4628. );
  4629. /******************************************************/
  4630. // 函数名 : CameraCommonCall
  4631. // 功能描述 : 相机的一些特殊功能调用,二次开发时一般不需要调用。
  4632. // 参数 : hCamera 相机的句柄,由CameraInit函数获得。
  4633. // pszCall 功能及参数
  4634. // pszResult 调用结果,不同的pszCall时,意义不同。
  4635. // uResultBufSize pszResult指向的缓冲区的字节大小
  4636. // 返回值 : 成功时,返回CAMERA_STATUS_SUCCESS (0);
  4637. // 否则返回非0值的错误码,请参考CameraStatus.h
  4638. // 中错误码的定义。
  4639. /******************************************************/
  4640. MVSDK_API CameraSdkStatus __stdcall CameraCommonCall(
  4641. CameraHandle hCamera,
  4642. char const* pszCall,
  4643. char* pszResult,
  4644. UINT uResultBufSize
  4645. );
  4646. /// @ingroup API_ENHANCE
  4647. /// \~chinese
  4648. /// \brief 设置3D降噪参数
  4649. /// \param [in] hCamera 相机的句柄。
  4650. /// \param [in] bEnable 启用或禁用
  4651. /// \param [in] nCount 使用几张图片进行降噪(2-8张)
  4652. /// \param [in] Weights 降噪权重,如当使用3张图片进行降噪则这个参数可以传入3个浮点(0.3,0.3,0.4),最后一张图片的权重大于前2张。如果不需要使用权重,则把这个参数传入0,表示所有图片的权重相同(0.33,0.33,0.33)
  4653. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4654. /// \~english
  4655. /// \brief Set 3D noise reduction parameters
  4656. /// \param [in] hCamera Camera handle.
  4657. /// \param [in] bEnable enable or disable
  4658. /// \param [in] nCount Noise reduction using several pictures (2-8)
  4659. /// \param [in] Weights Noise reduction weight, such as when using 3 pictures for noise reduction, this parameter can be passed in 3 floating points (0.3, 0.3, 0.4). The weight of the last picture is larger than the first 2 pictures. . If you do not need to use weights, then pass this parameter to 0, indicating that all images have the same weight (0.33, 0.33, 0.33)
  4660. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4661. MVSDK_API CameraSdkStatus __stdcall CameraSetDenoise3DParams(
  4662. CameraHandle hCamera,
  4663. BOOL bEnable,
  4664. int nCount,
  4665. float *Weights
  4666. );
  4667. /// @ingroup API_ENHANCE
  4668. /// \~chinese
  4669. /// \brief 获取当前的3D降噪参数
  4670. /// \param [in] hCamera 相机的句柄。
  4671. /// \param [out] bEnable 启用或禁用
  4672. /// \param [out] nCount 使用了几张图片进行降噪
  4673. /// \param [out] bUseWeight 是否使用了降噪权重
  4674. /// \param [out] Weights 降噪权重
  4675. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4676. /// \~english
  4677. /// \brief Get current 3D noise reduction parameters
  4678. /// \param [in] hCamera Camera handle.
  4679. /// \param [out] bEnable enable or disable
  4680. /// \param [out] nCount uses several pictures for noise reduction
  4681. /// \param [out] bUseWeight whether to use noise reduction weights
  4682. /// \param [out] Weights Noise Reduction Weights
  4683. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4684. MVSDK_API CameraSdkStatus __stdcall CameraGetDenoise3DParams(
  4685. CameraHandle hCamera,
  4686. BOOL *bEnable,
  4687. int *nCount,
  4688. BOOL *bUseWeight,
  4689. float *Weights
  4690. );
  4691. /// @ingroup API_ENHANCE
  4692. /// \~chinese
  4693. /// \brief 对一组帧进行一次降噪处理
  4694. /// \param [in] InFramesHead 输入帧头
  4695. /// \param [in] InFramesData 输入帧数据
  4696. /// \param [in] nCount 输入帧的数量
  4697. /// \param [in] Weights 降噪权重
  4698. /// \param [out] OutFrameHead 输出帧头
  4699. /// \param [out] OutFrameData 输出帧数据
  4700. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4701. /// \~english
  4702. /// \brief Perform a noise reduction on a group of frames
  4703. /// \param [in] InFramesHead input frame header
  4704. /// \param [in] InFramesData input frame data
  4705. /// \param [in] nCount Number of input frames
  4706. /// \param [in] Weights Noise Reduction Weight
  4707. /// \param [out] OutFrameHead output frame header
  4708. /// \param [out] OutFrameData output frame data
  4709. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4710. MVSDK_API CameraSdkStatus __stdcall CameraManualDenoise3D(
  4711. tSdkFrameHead *InFramesHead,
  4712. BYTE **InFramesData,
  4713. int nCount,
  4714. float *Weights,
  4715. tSdkFrameHead *OutFrameHead,
  4716. BYTE *OutFrameData
  4717. );
  4718. /// @ingroup API_DEAD_PIXEL
  4719. /// \~chinese
  4720. /// \brief 打开坏点编辑面板
  4721. /// \param [in] hCamera 相机的句柄。
  4722. /// \param [in] hParent 调用该函数的窗口的句柄。可以为NULL。
  4723. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4724. /// \~english
  4725. /// \brief Open the dead pixels editing panel
  4726. /// \param [in] hCamera Camera handle.
  4727. /// \param [in] hParent The handle of the window that called the function. Can be NULL.
  4728. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4729. MVSDK_API CameraSdkStatus __stdcall CameraCustomizeDeadPixels(
  4730. CameraHandle hCamera,
  4731. HWND hParent
  4732. );
  4733. /// @ingroup API_DEAD_PIXEL
  4734. /// \~chinese
  4735. /// \brief 读取相机坏点
  4736. /// \param [in] hCamera 相机的句柄。
  4737. /// \param [out] pRows 坏点y坐标
  4738. /// \param [out] pCols 坏点x坐标
  4739. /// \param [out] pNumPixel 输入时表示行列缓冲区的大小,返回时表示行列缓冲区中返回的坏点数量。
  4740. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4741. /// \note 当pRows或者pCols为NULL时函数会把相机当前的坏点个数通过pNumPixel返回
  4742. /// \~english
  4743. /// \brief Reading camera dead pixels
  4744. /// \param [in] hCamera Camera handle.
  4745. /// \param [out] pRows dead pixels y coordinates
  4746. /// \param [out] pCols bad x coordinate
  4747. /// \param [out] pNumPixel Inputs the size of the row and column buffers. When returned, it indicates the number of bad pixels returned in the row and column buffers.
  4748. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4749. /// \note When pRows or pCols is NULL, the function will return the camera's current number of dead pixels through pNumPixel.
  4750. MVSDK_API CameraSdkStatus __stdcall CameraReadDeadPixels(
  4751. CameraHandle hCamera,
  4752. USHORT* pRows,
  4753. USHORT* pCols,
  4754. UINT* pNumPixel
  4755. );
  4756. /// @ingroup API_DEAD_PIXEL
  4757. /// \~chinese
  4758. /// \brief 添加相机坏点
  4759. /// \param [in] hCamera 相机的句柄。
  4760. /// \param [in] pRows 坏点y坐标
  4761. /// \param [in] pCols 坏点x坐标
  4762. /// \param [in] NumPixel 行列缓冲区中的坏点个数
  4763. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4764. /// \~english
  4765. /// \brief Add camera dead pixels
  4766. /// \param [in] hCamera Camera handle.
  4767. /// \param [in] pRows dead point y coordinates
  4768. /// \param [in] pCols bad x coordinate
  4769. /// \param [in] NumPixel Number of dead pixels in row buffer
  4770. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4771. MVSDK_API CameraSdkStatus __stdcall CameraAddDeadPixels(
  4772. CameraHandle hCamera,
  4773. USHORT* pRows,
  4774. USHORT* pCols,
  4775. UINT NumPixel
  4776. );
  4777. /// @ingroup API_DEAD_PIXEL
  4778. /// \~chinese
  4779. /// \brief 删除相机指定坏点
  4780. /// \param [in] hCamera 相机的句柄。
  4781. /// \param [in] pRows 坏点y坐标
  4782. /// \param [in] pCols 坏点x坐标
  4783. /// \param [in] NumPixel 行列缓冲区中的坏点个数
  4784. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4785. /// \~english
  4786. /// \brief Delete camera specified dead pixels
  4787. /// \param [in] hCamera Camera handle.
  4788. /// \param [in] pRows dead point y coordinates
  4789. /// \param [in] pCols bad x coordinate
  4790. /// \param [in] NumPixel Number of dead pixels in row buffer
  4791. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4792. MVSDK_API CameraSdkStatus __stdcall CameraRemoveDeadPixels(
  4793. CameraHandle hCamera,
  4794. USHORT* pRows,
  4795. USHORT* pCols,
  4796. UINT NumPixel
  4797. );
  4798. /// @ingroup API_DEAD_PIXEL
  4799. /// \~chinese
  4800. /// \brief 删除相机的所有坏点
  4801. /// \param [in] hCamera 相机的句柄。
  4802. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4803. /// \~english
  4804. /// \brief Remove all camera's dead pixels
  4805. /// \param [in] hCamera Camera handle.
  4806. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4807. MVSDK_API CameraSdkStatus __stdcall CameraRemoveAllDeadPixels(
  4808. CameraHandle hCamera
  4809. );
  4810. /// @ingroup API_DEAD_PIXEL
  4811. /// \~chinese
  4812. /// \brief 保存相机坏点到相机存储中
  4813. /// \param [in] hCamera 相机的句柄。
  4814. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4815. /// \~english
  4816. /// \brief Save camera dead pixels to camera memory
  4817. /// \param [in] hCamera Camera handle.
  4818. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4819. MVSDK_API CameraSdkStatus __stdcall CameraSaveDeadPixels(
  4820. CameraHandle hCamera
  4821. );
  4822. /// @ingroup API_DEAD_PIXEL
  4823. /// \~chinese
  4824. /// \brief 保存相机坏点到文件中
  4825. /// \param [in] hCamera 相机的句柄。
  4826. /// \param [in] sFileName 文件的完整路径。
  4827. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4828. /// \~english
  4829. /// \brief Save Camera Dead Points to File
  4830. /// \param [in] hCamera Camera handle.
  4831. /// \param [in] sFileName Full path to the file.
  4832. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4833. MVSDK_API CameraSdkStatus __stdcall CameraSaveDeadPixelsToFile(
  4834. CameraHandle hCamera,
  4835. char const* sFileName
  4836. );
  4837. /// @ingroup API_DEAD_PIXEL
  4838. /// \~chinese
  4839. /// \brief 从文件加载相机坏点
  4840. /// \param [in] hCamera 相机的句柄。
  4841. /// \param [in] sFileName 文件的完整路径。
  4842. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4843. /// \~english
  4844. /// \brief Loading camera dead pixels from file
  4845. /// \param [in] hCamera Camera handle.
  4846. /// \param [in] sFileName Full path to the file.
  4847. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4848. MVSDK_API CameraSdkStatus __stdcall CameraLoadDeadPixelsFromFile(
  4849. CameraHandle hCamera,
  4850. char const* sFileName
  4851. );
  4852. /// @ingroup API_GRAB
  4853. /// \~chinese
  4854. /// \brief 获得一帧图像数据。
  4855. /// \param [in] hCamera 相机的句柄。
  4856. /// \param [out] pFrameInfo 图像的帧头信息指针。
  4857. /// \param [out] pbyBuffer 指向图像的数据的缓冲区指针。
  4858. /// \param [in] wTimes 抓取图像的超时时间。
  4859. /// \param [in] Priority 取图优先级 详见:@link #emCameraGetImagePriority @endlink
  4860. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4861. /// \note 除了多一个优先级参数外与@link #CameraGetImageBuffer @endlink相同
  4862. /// \~english
  4863. /// \brief Get a frame of image data.
  4864. /// \param [in] hCamera Camera handle.
  4865. /// \param [out] pFrameInfo Frame header information pointer
  4866. /// \param [out] pbyBuffer Pointer to the buffer of data for the image.
  4867. /// \param [in] wTimes The time-out time for capturing images.
  4868. /// \param [in] Priority map priority See: @link #emCameraGetImagePriority @endlink
  4869. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4870. /// \note Same as @link #CameraGetImageBuffer @endlink except one more priority parameter
  4871. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBufferPriority(
  4872. CameraHandle hCamera,
  4873. tSdkFrameHead* pFrameInfo,
  4874. BYTE** pbyBuffer,
  4875. UINT wTimes,
  4876. UINT Priority
  4877. );
  4878. /// @ingroup API_GRAB
  4879. /// \~chinese
  4880. /// \brief 获得一帧图像数据。该接口获得的图像是经过处理后的RGB格式。
  4881. /// \param [in] hCamera 相机的句柄。
  4882. /// \param [out] piWidth 整形指针,返回图像的宽度
  4883. /// \param [out] piHeight 整形指针,返回图像的高度
  4884. /// \param [in] wTimes 抓取图像的超时时间。单位毫秒。
  4885. /// \param [in] Priority 取图优先级 详见:@link #emCameraGetImagePriority @endlink
  4886. /// \return 成功时,返回RGB数据缓冲区的首地址;否则返回0。
  4887. /// \note 除了多一个优先级参数外与@link #CameraGetImageBufferEx @endlink相同
  4888. /// \~english
  4889. /// \brief Get a frame of image data. The image obtained by this interface is the processed RGB format.
  4890. /// \param [in] hCamera Camera handle.
  4891. /// \param [out] piWidth Returns the width of the image
  4892. /// \param [out] piHeight Returns the height of the image
  4893. /// \param [in] wTimes The time-out time for capturing images. The unit is milliseconds.
  4894. /// \param [in] Priority map priority See: @link #emCameraGetImagePriority @endlink
  4895. /// \return Returns the first address of the RGB data buffer when successful; otherwise returns 0.
  4896. /// \note Same as @link #CameraGetImageBufferEx @endlink except one more priority parameter
  4897. MVSDK_API unsigned char* __stdcall CameraGetImageBufferPriorityEx(
  4898. CameraHandle hCamera,
  4899. INT* piWidth,
  4900. INT* piHeight,
  4901. UINT wTimes,
  4902. UINT Priority
  4903. );
  4904. /// @ingroup API_GRAB
  4905. /// \~chinese
  4906. /// \brief 获得一帧图像数据。该接口获得的图像是经过处理后的RGB格式。
  4907. /// \param [in] hCamera 相机的句柄。
  4908. /// \param [out] pImageData 接收图像数据的缓冲区,大小必须和uOutFormat指定的格式相匹配,否则数据会溢出
  4909. /// \param [in] uOutFormat 输出格式 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  4910. /// \param [out] piWidth 整形指针,返回图像的宽度
  4911. /// \param [out] piHeight 整形指针,返回图像的高度
  4912. /// \param [in] wTimes 抓取图像的超时时间。单位毫秒。
  4913. /// \param [in] Priority 取图优先级 详见:@link #emCameraGetImagePriority @endlink
  4914. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4915. /// \note 除了多一个优先级参数外与@link #CameraGetImageBufferEx2 @endlink相同
  4916. /// \~english
  4917. /// \brief Get a frame of image data. The image obtained by this interface is the processed RGB format.
  4918. /// \param [in] hCamera Camera handle.
  4919. /// \param [out] pImageData The buffer to receive the image data, the size must match the format specified by uOutFormat, otherwise the data will overflow
  4920. /// \param [in] uOutFormat Output Format 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  4921. /// \param [out] piWidth Returns the width of the image
  4922. /// \param [out] piHeight Returns the height of the image
  4923. /// \param [in] wTimes The time-out time for capturing images. The unit is milliseconds.
  4924. /// \param [in] Priority map priority See: @link #emCameraGetImagePriority @endlink
  4925. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4926. /// \note Same as @link #CameraGetImageBufferEx2 @endlink except one more priority parameter
  4927. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBufferPriorityEx2(
  4928. CameraHandle hCamera,
  4929. BYTE* pImageData,
  4930. UINT uOutFormat,
  4931. int* piWidth,
  4932. int* piHeight,
  4933. UINT wTimes,
  4934. UINT Priority
  4935. );
  4936. /// @ingroup API_GRAB
  4937. /// \~chinese
  4938. /// \brief 获得一帧图像数据。该接口获得的图像是经过处理后的RGB格式。
  4939. /// \param [in] hCamera 相机的句柄。
  4940. /// \param [out] pImageData 接收图像数据的缓冲区,大小必须和uOutFormat指定的格式相匹配,否则数据会溢出
  4941. /// \param [in] uOutFormat 输出格式 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  4942. /// \param [out] piWidth 整形指针,返回图像的宽度
  4943. /// \param [out] piHeight 整形指针,返回图像的高度
  4944. /// \param [out] puTimeStamp 返回图像时间戳
  4945. /// \param [in] wTimes 抓取图像的超时时间。
  4946. /// \param [in] Priority 取图优先级 详见:@link #emCameraGetImagePriority @endlink
  4947. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4948. /// \note 除了多一个优先级参数外与@link #CameraGetImageBufferEx3 @endlink相同
  4949. /// \~english
  4950. /// \brief Get a frame of image data. The image obtained by this interface is the processed RGB format.
  4951. /// \param [in] hCamera Camera handle.
  4952. /// \param [out] pImageData The buffer to receive the image data, the size must match the format specified by uOutFormat, otherwise the data will overflow
  4953. /// \param [in] uOutFormat output format 0:Mono8 1:rgb24 2:rgba32 3:bgr24 4:bgra32
  4954. /// \param [out] piWidth Returns the width of the image
  4955. /// \param [out] piHeight Returns the height of the image
  4956. /// \param [out] puTimeStamp returns image timestamp
  4957. /// \param [in] wTimes The time-out time for capturing images.
  4958. /// \param [in] Priority map priority See: @link #emCameraGetImagePriority @endlink
  4959. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4960. /// \note Same as @link #CameraGetImageBufferEx3 @endlink except one more priority parameter
  4961. MVSDK_API CameraSdkStatus __stdcall CameraGetImageBufferPriorityEx3(
  4962. CameraHandle hCamera,
  4963. BYTE*pImageData,
  4964. UINT uOutFormat,
  4965. int *piWidth,
  4966. int *piHeight,
  4967. UINT* puTimeStamp,
  4968. UINT wTimes,
  4969. UINT Priority
  4970. );
  4971. /// @ingroup API_GRAB
  4972. /// \~chinese
  4973. /// \brief 清空相机内已缓存的所有帧
  4974. /// \param [in] hCamera 相机的句柄。
  4975. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4976. /// \~english
  4977. /// \brief Clear all cached frames in the camera
  4978. /// \param [in] hCamera Camera handle.
  4979. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4980. MVSDK_API CameraSdkStatus __stdcall CameraClearBuffer(
  4981. CameraHandle hCamera
  4982. );
  4983. /// @ingroup API_TRIGGER
  4984. /// \~chinese
  4985. /// \brief 执行软触发。
  4986. /// \param [in] hCamera 相机的句柄。
  4987. /// \param [in] uFlags 功能标志,详见@link #emCameraSoftTriggerExFlags @endlink中的定义
  4988. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  4989. /// \see CameraSoftTrigger
  4990. /// \~english
  4991. /// \brief Perform a soft trigger.
  4992. /// \param [in] hCamera Camera handle.
  4993. /// \param [in] uFlags function flags, as defined in @link #emCameraSoftTriggerExFlags @endlink
  4994. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  4995. /// \see CameraSoftTrigger
  4996. MVSDK_API CameraSdkStatus __stdcall CameraSoftTriggerEx(
  4997. CameraHandle hCamera,
  4998. UINT uFlags
  4999. );
  5000. /// @ingroup API_ADVANCE
  5001. /// \~chinese
  5002. /// \brief 设置相机的HDR,需要相机支持,不带HDR功能的型号,此函数返回错误代码,表示不支持。
  5003. /// \param [in] hCamera 相机的句柄。
  5004. /// \param [in] value HDR系数,范围0.0到1.0
  5005. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5006. /// \~english
  5007. /// \brief Setting the HDR of the camera requires camera support. Models without the HDR function. This function returns an error code indicating that it is not supported.
  5008. /// \param [in] hCamera Camera handle.
  5009. /// \param [in] value HDR coefficient, range 0.0 to 1.0
  5010. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5011. MVSDK_API CameraSdkStatus __stdcall CameraSetHDR(
  5012. CameraHandle hCamera,
  5013. float value
  5014. );
  5015. /// @ingroup API_ADVANCE
  5016. /// \~chinese
  5017. /// \brief 获取相机的HDR,需要相机支持,不带HDR功能的型号,此函数返回错误代码,表示不支持。
  5018. /// \param [in] hCamera 相机的句柄。
  5019. /// \param [out] value HDR系数,范围0.0到1.0
  5020. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5021. /// \~english
  5022. /// \brief Get camera HDR, need camera support, model without HDR function, this function returns an error code, indicating that it is not supported.
  5023. /// \param [in] hCamera Camera handle.
  5024. /// \param [out] value HDR coefficient, range 0.0 to 1.0
  5025. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5026. MVSDK_API CameraSdkStatus __stdcall CameraGetHDR(
  5027. CameraHandle hCamera,
  5028. float* value
  5029. );
  5030. /// @ingroup API_ADVANCE
  5031. /// \~chinese
  5032. /// \brief 获取当前帧的ID,需相机支持(网口全系列支持),此函数返回错误代码,表示不支持。
  5033. /// \param [in] hCamera 相机的句柄。
  5034. /// \param [out] id 帧ID
  5035. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5036. /// \~english
  5037. /// \brief The ID of the current frame needs to be supported by the camera (supported by the full range of network ports). This function returns an error code indicating that it is not supported.
  5038. /// \param [in] hCamera Camera handle.
  5039. /// \param [out] id Frame ID
  5040. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5041. MVSDK_API CameraSdkStatus __stdcall CameraGetFrameID(
  5042. CameraHandle hCamera,
  5043. UINT* id
  5044. );
  5045. /// @ingroup API_ADVANCE
  5046. /// \~chinese
  5047. /// \brief 获取当前帧的时间戳(单位微秒)
  5048. /// \param [in] hCamera 相机的句柄。
  5049. /// \param [out] TimeStampL 时间戳低32位
  5050. /// \param [out] TimeStampH 时间戳高32位
  5051. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5052. /// \~english
  5053. /// \brief Get the timestamp of the current frame (in microseconds)
  5054. /// \param [in] hCamera Camera handle.
  5055. /// \param [out] TimeStampL timestamp low 32 bits
  5056. /// \param [out] TimeStampH Timestamp high 32 bits
  5057. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5058. MVSDK_API CameraSdkStatus __stdcall CameraGetFrameTimeStamp(
  5059. CameraHandle hCamera,
  5060. UINT* TimeStampL,
  5061. UINT* TimeStampH
  5062. );
  5063. /// @ingroup API_ADVANCE
  5064. /// \~chinese
  5065. /// \brief 设置相机的增益模式,需要相机支持,不带增益模式切换功能的型号,此函数返回错误代码,表示不支持。
  5066. /// \param [in] hCamera 相机的句柄。
  5067. /// \param [in] value 0:低增益 1:高增益
  5068. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5069. /// \~english
  5070. /// \brief Setting the camera's gain mode requires camera support. Models without the gain mode switching function. This function returns an error code indicating that it is not supported.
  5071. /// \param [in] hCamera Camera handle.
  5072. /// \param [in] value 0: low gain 1: high gain
  5073. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5074. MVSDK_API CameraSdkStatus __stdcall CameraSetHDRGainMode(
  5075. CameraHandle hCamera,
  5076. int value
  5077. );
  5078. /// @ingroup API_ADVANCE
  5079. /// \~chinese
  5080. /// \brief 获取相机的增益模式,需要相机支持,不带增益模式切换功能的型号,此函数返回错误代码,表示不支持。
  5081. /// \param [in] hCamera 相机的句柄。
  5082. /// \param [out] value 0:低增益 1:高增益
  5083. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5084. /// \~english
  5085. /// \brief Get camera's gain mode, need camera support, model without gain mode switching function, this function returns error code, indicating that it is not supported.
  5086. /// \param [in] hCamera Camera handle.
  5087. /// \param [out] value 0: low gain 1: high gain
  5088. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5089. MVSDK_API CameraSdkStatus __stdcall CameraGetHDRGainMode(
  5090. CameraHandle hCamera,
  5091. int* value
  5092. );
  5093. /// @ingroup API_UTIL
  5094. /// \~chinese
  5095. /// \brief 从帧数据创建HBITMAP
  5096. /// \param [in] hDC Handle to a device context(WIN32 API CreateDIBitmap的参数hdc)
  5097. /// \param [in] pFrameBuffer 帧数据
  5098. /// \param [in] pFrameHead 帧头
  5099. /// \param [out] outBitmap 新创建的HBITMAP(使用完后需要调用WIN32 API DeleteObject释放)
  5100. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5101. /// \~english
  5102. /// \brief Create HBITMAP from Frame Data
  5103. /// \param [in] hDC Handle to a device context (parameter hdc of WIN32 API CreateDIBitmap)
  5104. /// \param [in] pFrameBuffer Frame data
  5105. /// \param [in] pFrameHead Frame Header
  5106. /// \param [out] outBitmap newly created HBITMAP (need to call WIN32 API DeleteObject after use)
  5107. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5108. MVSDK_API CameraSdkStatus __stdcall CameraCreateDIBitmap(
  5109. HDC hDC,
  5110. BYTE *pFrameBuffer,
  5111. tSdkFrameHead* pFrameHead,
  5112. HBITMAP* outBitmap
  5113. );
  5114. /// @ingroup API_UTIL
  5115. /// \~chinese
  5116. /// \brief 绘制帧到指定窗口
  5117. /// \param [in] pFrameBuffer 帧数据
  5118. /// \param [in] pFrameHead 帧头
  5119. /// \param [in] hWnd 目的窗口
  5120. /// \param [in] Algorithm 缩放算法 0:快速但质量稍差 1:速度慢但质量好
  5121. /// \param [in] Mode 缩放模式 0: 等比缩放 1:拉伸缩放
  5122. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5123. /// \~english
  5124. /// \brief Draw frames to the specified window
  5125. /// \param [in] pFrameBuffer frame data
  5126. /// \param [in] pFrameHead Frame Header
  5127. /// \param [in] hWnd destination window
  5128. /// \param [in] Algorithm scaling algorithm 0: fast but slightly worse quality 1 slower but better quality
  5129. /// \param [in] Mode Zoom Mode 0: Scale 1: Scale Zoom
  5130. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5131. MVSDK_API CameraSdkStatus __stdcall CameraDrawFrameBuffer(
  5132. BYTE *pFrameBuffer,
  5133. tSdkFrameHead* pFrameHead,
  5134. HWND hWnd,
  5135. int Algorithm,
  5136. int Mode
  5137. );
  5138. /// @ingroup API_UTIL
  5139. /// \~chinese
  5140. /// \brief 翻转帧数据
  5141. /// \param [inout] pFrameBuffer 帧数据
  5142. /// \param [in] pFrameHead 帧头
  5143. /// \param [in] Flags 1:上下 2:左右 3:上下、左右皆做一次翻转(相当于旋转180度)
  5144. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5145. /// \~english
  5146. /// \brief Flip frame data
  5147. /// \param [inout] pFrameBuffer frame data
  5148. /// \param [in] pFrameHead Frame Header
  5149. /// \param [in] Flags 1: Up and down 2: Around 3: Up and down, left and right are all flipped (equivalent to 180 degrees rotation)
  5150. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5151. MVSDK_API CameraSdkStatus __stdcall CameraFlipFrameBuffer(
  5152. BYTE *pFrameBuffer,
  5153. tSdkFrameHead* pFrameHead,
  5154. int Flags
  5155. );
  5156. /// @ingroup API_UTIL
  5157. /// \~chinese
  5158. /// \brief 转换帧数据格式
  5159. /// \param [in] hCamera 相机的句柄。
  5160. /// \param [in] pInFrameBuffer 输入帧数据
  5161. /// \param [out] pOutFrameBuffer 输出帧数据
  5162. /// \param [in] outWidth 输出宽度
  5163. /// \param [in] outHeight 输出高度
  5164. /// \param [in] outMediaType 输出格式 @see CameraSetIspOutFormat
  5165. /// \param [inout] pFrameHead 帧头信息(转换成功后,里面的信息会被修改为输出帧的信息)
  5166. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5167. /// \~english
  5168. /// \brief Conversion frame data format
  5169. /// \param [in] hCamera Camera handle.
  5170. /// \param [in] pInFrameBuffer input frame data
  5171. /// \param [out] pOutFrameBuffer output frame data
  5172. /// \param [in] outWidth output width
  5173. /// \param [in] outHeight output height
  5174. /// \param [in] outMediaType output format @see CameraSetIspOutFormat
  5175. /// \param [inout] pFrameHead frame header information (after successful conversion, the information inside will be modified to output frame information)
  5176. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5177. MVSDK_API CameraSdkStatus __stdcall CameraConvertFrameBufferFormat(
  5178. CameraHandle hCamera,
  5179. BYTE *pInFrameBuffer,
  5180. BYTE *pOutFrameBuffer,
  5181. int outWidth,
  5182. int outHeight,
  5183. UINT outMediaType,
  5184. tSdkFrameHead* pFrameHead
  5185. );
  5186. /// @ingroup API_RECONNECT
  5187. /// \~chinese
  5188. /// \brief 设置相机连接状态改变的回调通知函数。当相机掉线、重连时,pCallBack所指向的回调函数就会被调用。
  5189. /// \param [in] hCamera 相机的句柄。
  5190. /// \param [in] pCallBack 回调函数指针。
  5191. /// \param [in] pContext 回调函数的附加参数,在回调函数被调用时该附加参数会被传入,可以为NULL。
  5192. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5193. /// \~english
  5194. /// \brief Sets the callback notification function for camera connection state changes. When the camera is disconnected and reconnected, the callback function pointed to by pCallBack will be called.
  5195. /// \param [in] hCamera Camera handle.
  5196. /// \param [in] pCallBack callback function pointer.
  5197. /// \param [in] pContext Additional parameter of the callback function. This additional parameter will be passed in when the callback function is called. It can be NULL.
  5198. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5199. MVSDK_API CameraSdkStatus __stdcall CameraSetConnectionStatusCallback(
  5200. CameraHandle hCamera,
  5201. CAMERA_CONNECTION_STATUS_CALLBACK pCallBack,
  5202. PVOID pContext
  5203. );
  5204. /// @ingroup API_ADVANCE
  5205. /// \~chinese
  5206. /// \brief 设置光源控制器的输出模式(智能相机系列且需要硬件支持)
  5207. /// \param [in] hCamera 相机的句柄。
  5208. /// \param [in] index 控制器索引
  5209. /// \param [in] mode 输出模式(0:跟随闪光灯 1:手动)
  5210. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5211. /// \~english
  5212. /// \brief Set the output mode of the light controller (Smart camera series and hardware support required)
  5213. /// \param [in] hCamera Camera handle.
  5214. /// \param [in] index controller index
  5215. /// \param [in] mode output mode (0: follow strobe 1: manual)
  5216. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5217. MVSDK_API CameraSdkStatus __stdcall CameraSetLightingControllerMode(
  5218. CameraHandle hCamera,
  5219. int index,
  5220. int mode
  5221. );
  5222. /// @ingroup API_ADVANCE
  5223. /// \~chinese
  5224. /// \brief 设置光源控制器的输出状态(智能相机系列且需要硬件支持)
  5225. /// \param [in] hCamera 相机的句柄。
  5226. /// \param [in] index 控制器索引
  5227. /// \param [in] state 输出状态(0:关闭 1:打开)
  5228. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5229. /// \~english
  5230. /// \brief Set the output status of the light controller (Smart camera series and hardware support required)
  5231. /// \param [in] hCamera Camera handle.
  5232. /// \param [in] index controller index
  5233. /// \param [in] state output state (0: off 1: on)
  5234. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5235. MVSDK_API CameraSdkStatus __stdcall CameraSetLightingControllerState(
  5236. CameraHandle hCamera,
  5237. int index,
  5238. int state
  5239. );
  5240. /// @ingroup API_ADVANCE
  5241. /// \~chinese
  5242. /// \brief 当相机处于触发模式(软触发或硬触发)时,相机发送一帧到PC,如相机未收到PC端的接收确认,相机可以把帧重发几次。用本函数设置相机重发次数。(仅网口相机支持)
  5243. /// \param [in] hCamera 相机的句柄。
  5244. /// \param [in] count 重发次数(<=0表示禁用重发功能)
  5245. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5246. /// \~english
  5247. /// \brief When the camera is in the trigger mode (soft trigger or hard trigger), the camera sends a frame to the PC. If the camera does not receive the reception confirmation from the PC, the camera can retransmit the frame several times. Use this function to set the number of camera resends. (only supported by Gige camera)
  5248. /// \param [in] hCamera Camera handle.
  5249. /// \param [in] count number of resends (<=0 means disable resends)
  5250. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5251. MVSDK_API CameraSdkStatus __stdcall CameraSetFrameResendCount(
  5252. CameraHandle hCamera,
  5253. int count
  5254. );
  5255. /// @ingroup API_UNDISTORT
  5256. /// \~chinese
  5257. /// \brief 设置校正参数
  5258. /// \param [in] hCamera 相机的句柄。
  5259. /// \param [in] width 图片宽度
  5260. /// \param [in] height 图片高度
  5261. /// \param [in] cameraMatrix 内参(fx, fy, cx, cy)
  5262. /// \param [in] distCoeffs 畸变系数(k1,k2,p1,p2,k3)
  5263. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5264. /// \~english
  5265. /// \brief Set undistort parameters
  5266. /// \param [in] hCamera Camera handle.
  5267. /// \param [in] width image width
  5268. /// \param [in] height image height
  5269. /// \param [in] cameraMatrix internal matrix(fx, fy, cx, cy)
  5270. /// \param [in] distCoeffs distortion coefficient (k1, k2, p1, p2, k3)
  5271. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5272. MVSDK_API CameraSdkStatus __stdcall CameraSetUndistortParams(
  5273. CameraHandle hCamera,
  5274. int width,
  5275. int height,
  5276. double cameraMatrix[4],
  5277. double distCoeffs[5]
  5278. );
  5279. /// @ingroup API_UNDISTORT
  5280. /// \~chinese
  5281. /// \brief 获取校正参数
  5282. /// \param [in] hCamera 相机的句柄。
  5283. /// \param [out] width 图片宽度
  5284. /// \param [out] height 图片高度
  5285. /// \param [out] cameraMatrix 内参(fx, fy, cx, cy)
  5286. /// \param [out] distCoeffs 畸变系数(k1,k2,p1,p2,k3)
  5287. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5288. /// \~english
  5289. /// \brief Get undistort parameters
  5290. /// \param [in] hCamera Camera handle.
  5291. /// \param [out] width image width
  5292. /// \param [out] height image height
  5293. /// \param [out] cameraMatrix internal matrix(fx, fy, cx, cy)
  5294. /// \param [out] distCoeffs distortion coefficient (k1, k2, p1, p2, k3)
  5295. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5296. MVSDK_API CameraSdkStatus __stdcall CameraGetUndistortParams(
  5297. CameraHandle hCamera,
  5298. int *width,
  5299. int *height,
  5300. double cameraMatrix[4],
  5301. double distCoeffs[5]
  5302. );
  5303. /// @ingroup API_UNDISTORT
  5304. /// \~chinese
  5305. /// \brief 使能镜头校正
  5306. /// \param [in] hCamera 相机的句柄。
  5307. /// \param [in] bEnable 使能校正
  5308. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5309. /// \~english
  5310. /// \brief Set undistort enable status
  5311. /// \param [in] hCamera Camera handle.
  5312. /// \param [in] bEnable enable status
  5313. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5314. MVSDK_API CameraSdkStatus __stdcall CameraSetUndistortEnable(
  5315. CameraHandle hCamera,
  5316. BOOL bEnable
  5317. );
  5318. /// @ingroup API_UNDISTORT
  5319. /// \~chinese
  5320. /// \brief 获取镜头校正使能状态
  5321. /// \param [in] hCamera 相机的句柄。
  5322. /// \param [out] bEnable 使能校正
  5323. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5324. /// \~english
  5325. /// \brief Get undistort enable status
  5326. /// \param [in] hCamera Camera handle.
  5327. /// \param [out] bEnable enable status
  5328. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5329. MVSDK_API CameraSdkStatus __stdcall CameraGetUndistortEnable(
  5330. CameraHandle hCamera,
  5331. BOOL* bEnable
  5332. );
  5333. /// @ingroup API_UNDISTORT
  5334. /// \~chinese
  5335. /// \brief 打开校正编辑面板
  5336. /// \param [in] hCamera 相机的句柄。
  5337. /// \param [in] hParent 调用该函数的窗口的句柄。可以为NULL。
  5338. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5339. /// \~english
  5340. /// \brief Open the undistort editing panel
  5341. /// \param [in] hCamera Camera handle.
  5342. /// \param [in] hParent The handle of the window that called the function. Can be NULL.
  5343. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5344. MVSDK_API CameraSdkStatus __stdcall CameraCustomizeUndistort(
  5345. CameraHandle hCamera,
  5346. HWND hParent
  5347. );
  5348. /// @ingroup API_MULTI_EYE
  5349. /// \~chinese
  5350. /// \brief 获取多目相机的目数
  5351. /// \param [in] hCamera 相机的句柄。
  5352. /// \param [out] EyeCount 目数
  5353. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5354. /// \~english
  5355. /// \brief Get the number of eyes in the camera
  5356. /// \param [in] hCamera Camera handle.
  5357. /// \param [out] EyeCount eye count
  5358. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5359. MVSDK_API CameraSdkStatus __stdcall CameraGetEyeCount(
  5360. CameraHandle hCamera,
  5361. int* EyeCount
  5362. );
  5363. /// @ingroup API_MULTI_EYE
  5364. /// \~chinese
  5365. /// \brief 对多目相机帧内的某个单目图做ISP
  5366. /// \param [in] hCamera 相机的句柄。
  5367. /// \param [in] iEyeIndex 单目索引。
  5368. /// \param [in] pbyIn 输入图像数据的缓冲区地址,不能为NULL。
  5369. /// \param [in] pInFrInfo 输入图像数据的帧头,不能为NULL。
  5370. /// \param [out] pbyOut 处理后图像输出的缓冲区地址,不能为NULL。
  5371. /// \param [out] pOutFrInfo 处理后图像的帧头信息,不能为NULL。
  5372. /// \param [in] uOutFormat 处理完后图像的输出格式。
  5373. /// \param [in] uReserved 预留参数,必须设置为0。
  5374. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5375. /// \~english
  5376. /// \brief Do ISP for a certain monocular in the multi-camera frame.
  5377. /// \param [in] hCamera Camera handle.
  5378. /// \param [in] iEyeIndex eye index.
  5379. /// \param [in] pbyIn Input the buffer address of the image data, which cannot be NULL.
  5380. /// \param [in] pInFrInfo Input the frame header of the image data, which cannot be NULL.
  5381. /// \param [out] pbyOut The buffer address of the image output after processing, cannot be NULL.
  5382. /// \param [out] pOutFrInfo The header information of the processed image cannot be NULL.
  5383. /// \param [in] uOutFormat The output format of the image after processing.
  5384. /// \param [in] uReserved Reservation parameters must be set to 0.
  5385. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5386. MVSDK_API CameraSdkStatus __stdcall CameraMultiEyeImageProcess(
  5387. CameraHandle hCamera,
  5388. int iEyeIndex,
  5389. BYTE* pbyIn,
  5390. tSdkFrameHead* pInFrInfo,
  5391. BYTE* pbyOut,
  5392. tSdkFrameHead* pOutFrInfo,
  5393. UINT uOutFormat,
  5394. UINT uReserved
  5395. );
  5396. /// @ingroup API_UTIL
  5397. /// \~chinese
  5398. /// \brief 计算区域的平均灰度值
  5399. /// \param [in] pFrameBuffer 帧数据
  5400. /// \param [in] pFrameHead 帧头
  5401. /// \param [in] Left 矩形区域的起始x坐标
  5402. /// \param [in] Top 矩形区域的起始y坐标
  5403. /// \param [in] Width 矩形区域的宽度
  5404. /// \param [in] Height 矩形区域的高度
  5405. /// \param [out] AvgGray 返回计算结果
  5406. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5407. /// \note Width或者Height为0则忽略Left、Top并返回整帧的平均灰度值
  5408. /// \~english
  5409. /// \brief Calculate the average gray value of the area
  5410. /// \param [in] pFrameBuffer frame data
  5411. /// \param [in] pFrameHead Frame Header
  5412. /// \param [in] Left The starting x coordinate of the rectangular area
  5413. /// \param [in] Top The starting y coordinate of the rectangular area
  5414. /// \param [in] Width The width of the rectangular area
  5415. /// \param [in] Height The Height of the rectangular area
  5416. /// \param [out] AvgGray returns the result of the calculation
  5417. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5418. /// \note Width or Height is 0, then ignore Left, Top and return the average gray value of the entire frame
  5419. MVSDK_API CameraSdkStatus __stdcall CameraGetRegionAverageGray(
  5420. BYTE *pFrameBuffer,
  5421. tSdkFrameHead* pFrameHead,
  5422. int Left,
  5423. int Top,
  5424. int Width,
  5425. int Height,
  5426. int *AvgGray
  5427. );
  5428. /// @ingroup API_ADVANCE
  5429. /// \~chinese
  5430. /// \brief 获取输出格式的特性支持。(比如:H264、H265支持设置码率)
  5431. /// \param [in] hCamera 相机的句柄。
  5432. /// \param [in] iMediaType 输出格式索引
  5433. /// \param [out] uCap 特性支持
  5434. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5435. /// \~english
  5436. /// \brief Get the feature support of the output format. (For example: H264, H265 support setting bit rate)
  5437. /// \param [in] hCamera Handle of the camera.
  5438. /// \param [in] iMediaType output format index
  5439. /// \param [out] uCap feature support
  5440. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5441. MVSDK_API CameraSdkStatus __stdcall CameraGetMediaCapability(
  5442. CameraHandle hCamera,
  5443. int iMediaType,
  5444. UINT *uCap
  5445. );
  5446. /// @ingroup API_ADVANCE
  5447. /// \~chinese
  5448. /// \brief 设置码率。(仅部分输出格式支持,比如:H264、H265)
  5449. /// \param [in] hCamera 相机的句柄。
  5450. /// \param [in] iMediaType 输出格式索引
  5451. /// \param [in] uRate 码率
  5452. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5453. /// \~english
  5454. /// \brief Set the bit rate. (Only some output formats are supported, such as H264, H265)
  5455. /// \param [in] hCamera Handle of the camera.
  5456. /// \param [in] iMediaType output format index
  5457. /// \param [in] uRate bit rate
  5458. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5459. MVSDK_API CameraSdkStatus __stdcall CameraSetMediaBitRate(
  5460. CameraHandle hCamera,
  5461. int iMediaType,
  5462. UINT uRate
  5463. );
  5464. /// @ingroup API_ADVANCE
  5465. /// \~chinese
  5466. /// \brief 获取码率设置。(仅部分输出格式支持,比如:H264、H265)
  5467. /// \param [in] hCamera 相机的句柄。
  5468. /// \param [in] iMediaType 输出格式索引
  5469. /// \param [out] uRate 码率
  5470. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5471. /// \~english
  5472. /// \brief Get the bit rate. (Only some output formats are supported, such as H264, H265)
  5473. /// \param [in] hCamera Handle of the camera.
  5474. /// \param [in] iMediaType output format index
  5475. /// \param [out] uRate bit rate
  5476. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5477. MVSDK_API CameraSdkStatus __stdcall CameraGetMediaBitRate(
  5478. CameraHandle hCamera,
  5479. int iMediaType,
  5480. UINT *uRate
  5481. );
  5482. /// @ingroup API_ADVANCE
  5483. /// \~chinese
  5484. /// \brief 设置相机帧事件回调函数。当帧开始以及帧完成时,pCallBack所指向的回调函数就会被调用。
  5485. /// \param [in] hCamera 相机的句柄。
  5486. /// \param [in] pCallBack 回调函数指针。
  5487. /// \param [in] pContext 回调函数的附加参数,在回调函数被调用时该附加参数会被传入,可以为NULL。
  5488. /// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
  5489. /// \note 对于全局快门相机帧开始表示一帧曝光结束
  5490. /// \~english
  5491. /// \brief Set the camera frame event callback function. When the frame starts and when the frame is completed, the callback function pointed to by pCallBack will be called.
  5492. /// \param [in] hCamera Camera handle.
  5493. /// \param [in] pCallBack callback function pointer.
  5494. /// \param [in] pContext Additional parameter of the callback function. This additional parameter will be passed in when the callback function is called. It can be NULL.
  5495. /// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
  5496. /// \note For the start of the global shutter camera frame, it means the end of a frame exposure
  5497. MVSDK_API CameraSdkStatus __stdcall CameraSetFrameEventCallback(
  5498. CameraHandle hCamera,
  5499. CAMERA_FRAME_EVENT_CALLBACK pCallBack,
  5500. PVOID pContext
  5501. );
  5502. #endif