Calib3d.cs 258 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155
  1. 
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.Calib3dModule {
  8. // C++: class Calib3d
  9. //javadoc: Calib3d
  10. public class Calib3d {
  11. // C++: enum UndistortTypes
  12. public const int PROJ_SPHERICAL_ORTHO = 0;
  13. public const int PROJ_SPHERICAL_EQRECT = 1;
  14. // C++: enum <unnamed>
  15. public const int CALIB_USE_INTRINSIC_GUESS = 1;
  16. public const int CALIB_RECOMPUTE_EXTRINSIC = 2;
  17. public const int CALIB_CHECK_COND = 4;
  18. public const int CALIB_FIX_SKEW = 8;
  19. public const int CALIB_FIX_K1 = 16;
  20. public const int CALIB_FIX_K2 = 32;
  21. public const int CALIB_FIX_K3 = 64;
  22. public const int CALIB_FIX_K4 = 128;
  23. public const int CALIB_FIX_INTRINSIC = 256;
  24. public const int CV_ITERATIVE = 0;
  25. public const int CV_EPNP = 1;
  26. public const int CV_P3P = 2;
  27. public const int CV_DLS = 3;
  28. public const int LMEDS = 4;
  29. public const int RANSAC = 8;
  30. public const int RHO = 16;
  31. public const int SOLVEPNP_ITERATIVE = 0;
  32. public const int SOLVEPNP_EPNP = 1;
  33. public const int SOLVEPNP_P3P = 2;
  34. public const int SOLVEPNP_DLS = 3;
  35. public const int SOLVEPNP_UPNP = 4;
  36. public const int SOLVEPNP_AP3P = 5;
  37. public const int SOLVEPNP_MAX_COUNT = 5 + 1;
  38. public const int CALIB_CB_ADAPTIVE_THRESH = 1;
  39. public const int CALIB_CB_NORMALIZE_IMAGE = 2;
  40. public const int CALIB_CB_FILTER_QUADS = 4;
  41. public const int CALIB_CB_FAST_CHECK = 8;
  42. public const int CALIB_CB_EXHAUSTIVE = 16;
  43. public const int CALIB_CB_ACCURACY = 32;
  44. public const int CALIB_CB_SYMMETRIC_GRID = 1;
  45. public const int CALIB_CB_ASYMMETRIC_GRID = 2;
  46. public const int CALIB_CB_CLUSTERING = 4;
  47. public const int CALIB_NINTRINSIC = 18;
  48. public const int CALIB_FIX_ASPECT_RATIO = 0x00002;
  49. public const int CALIB_FIX_PRINCIPAL_POINT = 0x00004;
  50. public const int CALIB_ZERO_TANGENT_DIST = 0x00008;
  51. public const int CALIB_FIX_FOCAL_LENGTH = 0x00010;
  52. public const int CALIB_FIX_K5 = 0x01000;
  53. public const int CALIB_FIX_K6 = 0x02000;
  54. public const int CALIB_RATIONAL_MODEL = 0x04000;
  55. public const int CALIB_THIN_PRISM_MODEL = 0x08000;
  56. public const int CALIB_FIX_S1_S2_S3_S4 = 0x10000;
  57. public const int CALIB_TILTED_MODEL = 0x40000;
  58. public const int CALIB_FIX_TAUX_TAUY = 0x80000;
  59. public const int CALIB_USE_QR = 0x100000;
  60. public const int CALIB_FIX_TANGENT_DIST = 0x200000;
  61. public const int CALIB_SAME_FOCAL_LENGTH = 0x00200;
  62. public const int CALIB_ZERO_DISPARITY = 0x00400;
  63. public const int CALIB_USE_LU = (1 << 17);
  64. public const int CALIB_USE_EXTRINSIC_GUESS = (1 << 22);
  65. public const int FM_7POINT = 1;
  66. public const int FM_8POINT = 2;
  67. public const int FM_LMEDS = 4;
  68. public const int FM_RANSAC = 8;
  69. public const int fisheye_CALIB_USE_INTRINSIC_GUESS = 1 << 0;
  70. public const int fisheye_CALIB_RECOMPUTE_EXTRINSIC = 1 << 1;
  71. public const int fisheye_CALIB_CHECK_COND = 1 << 2;
  72. public const int fisheye_CALIB_FIX_SKEW = 1 << 3;
  73. public const int fisheye_CALIB_FIX_K1 = 1 << 4;
  74. public const int fisheye_CALIB_FIX_K2 = 1 << 5;
  75. public const int fisheye_CALIB_FIX_K3 = 1 << 6;
  76. public const int fisheye_CALIB_FIX_K4 = 1 << 7;
  77. public const int fisheye_CALIB_FIX_INTRINSIC = 1 << 8;
  78. public const int fisheye_CALIB_FIX_PRINCIPAL_POINT = 1 << 9;
  79. //
  80. // C++: Mat cv::estimateAffine2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
  81. //
  82. //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence, refineIters)
  83. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters) {
  84. if (from != null)
  85. from.ThrowIfDisposed();
  86. if (to != null)
  87. to.ThrowIfDisposed();
  88. if (inliers != null)
  89. inliers.ThrowIfDisposed();
  90. #if (UNITY_ANDROID && !UNITY_EDITOR)
  91. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_10(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence, refineIters));
  92. return retVal;
  93. #else
  94. return null;
  95. #endif
  96. }
  97. //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence)
  98. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence) {
  99. if (from != null)
  100. from.ThrowIfDisposed();
  101. if (to != null)
  102. to.ThrowIfDisposed();
  103. if (inliers != null)
  104. inliers.ThrowIfDisposed();
  105. #if (UNITY_ANDROID && !UNITY_EDITOR)
  106. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_11(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence));
  107. return retVal;
  108. #else
  109. return null;
  110. #endif
  111. }
  112. //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold, maxIters)
  113. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters) {
  114. if (from != null)
  115. from.ThrowIfDisposed();
  116. if (to != null)
  117. to.ThrowIfDisposed();
  118. if (inliers != null)
  119. inliers.ThrowIfDisposed();
  120. #if (UNITY_ANDROID && !UNITY_EDITOR)
  121. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_12(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters));
  122. return retVal;
  123. #else
  124. return null;
  125. #endif
  126. }
  127. //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold)
  128. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold) {
  129. if (from != null)
  130. from.ThrowIfDisposed();
  131. if (to != null)
  132. to.ThrowIfDisposed();
  133. if (inliers != null)
  134. inliers.ThrowIfDisposed();
  135. #if (UNITY_ANDROID && !UNITY_EDITOR)
  136. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_13(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold));
  137. return retVal;
  138. #else
  139. return null;
  140. #endif
  141. }
  142. //javadoc: estimateAffine2D(from, to, inliers, method)
  143. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method) {
  144. if (from != null)
  145. from.ThrowIfDisposed();
  146. if (to != null)
  147. to.ThrowIfDisposed();
  148. if (inliers != null)
  149. inliers.ThrowIfDisposed();
  150. #if (UNITY_ANDROID && !UNITY_EDITOR)
  151. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_14(from.nativeObj, to.nativeObj, inliers.nativeObj, method));
  152. return retVal;
  153. #else
  154. return null;
  155. #endif
  156. }
  157. //javadoc: estimateAffine2D(from, to, inliers)
  158. public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers) {
  159. if (from != null)
  160. from.ThrowIfDisposed();
  161. if (to != null)
  162. to.ThrowIfDisposed();
  163. if (inliers != null)
  164. inliers.ThrowIfDisposed();
  165. #if (UNITY_ANDROID && !UNITY_EDITOR)
  166. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_15(from.nativeObj, to.nativeObj, inliers.nativeObj));
  167. return retVal;
  168. #else
  169. return null;
  170. #endif
  171. }
  172. //javadoc: estimateAffine2D(from, to)
  173. public static Mat estimateAffine2D(Mat from, Mat to) {
  174. if (from != null)
  175. from.ThrowIfDisposed();
  176. if (to != null)
  177. to.ThrowIfDisposed();
  178. #if (UNITY_ANDROID && !UNITY_EDITOR)
  179. Mat retVal = new Mat(calib3d_Calib3d_estimateAffine2D_16(from.nativeObj, to.nativeObj));
  180. return retVal;
  181. #else
  182. return null;
  183. #endif
  184. }
  185. //
  186. // C++: Mat cv::estimateAffinePartial2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
  187. //
  188. //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence, refineIters)
  189. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters) {
  190. if (from != null)
  191. from.ThrowIfDisposed();
  192. if (to != null)
  193. to.ThrowIfDisposed();
  194. if (inliers != null)
  195. inliers.ThrowIfDisposed();
  196. #if (UNITY_ANDROID && !UNITY_EDITOR)
  197. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_10(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence, refineIters));
  198. return retVal;
  199. #else
  200. return null;
  201. #endif
  202. }
  203. //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence)
  204. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence) {
  205. if (from != null)
  206. from.ThrowIfDisposed();
  207. if (to != null)
  208. to.ThrowIfDisposed();
  209. if (inliers != null)
  210. inliers.ThrowIfDisposed();
  211. #if (UNITY_ANDROID && !UNITY_EDITOR)
  212. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_11(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence));
  213. return retVal;
  214. #else
  215. return null;
  216. #endif
  217. }
  218. //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold, maxIters)
  219. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters) {
  220. if (from != null)
  221. from.ThrowIfDisposed();
  222. if (to != null)
  223. to.ThrowIfDisposed();
  224. if (inliers != null)
  225. inliers.ThrowIfDisposed();
  226. #if (UNITY_ANDROID && !UNITY_EDITOR)
  227. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_12(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters));
  228. return retVal;
  229. #else
  230. return null;
  231. #endif
  232. }
  233. //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold)
  234. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold) {
  235. if (from != null)
  236. from.ThrowIfDisposed();
  237. if (to != null)
  238. to.ThrowIfDisposed();
  239. if (inliers != null)
  240. inliers.ThrowIfDisposed();
  241. #if (UNITY_ANDROID && !UNITY_EDITOR)
  242. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_13(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold));
  243. return retVal;
  244. #else
  245. return null;
  246. #endif
  247. }
  248. //javadoc: estimateAffinePartial2D(from, to, inliers, method)
  249. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method) {
  250. if (from != null)
  251. from.ThrowIfDisposed();
  252. if (to != null)
  253. to.ThrowIfDisposed();
  254. if (inliers != null)
  255. inliers.ThrowIfDisposed();
  256. #if (UNITY_ANDROID && !UNITY_EDITOR)
  257. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_14(from.nativeObj, to.nativeObj, inliers.nativeObj, method));
  258. return retVal;
  259. #else
  260. return null;
  261. #endif
  262. }
  263. //javadoc: estimateAffinePartial2D(from, to, inliers)
  264. public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers) {
  265. if (from != null)
  266. from.ThrowIfDisposed();
  267. if (to != null)
  268. to.ThrowIfDisposed();
  269. if (inliers != null)
  270. inliers.ThrowIfDisposed();
  271. #if (UNITY_ANDROID && !UNITY_EDITOR)
  272. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_15(from.nativeObj, to.nativeObj, inliers.nativeObj));
  273. return retVal;
  274. #else
  275. return null;
  276. #endif
  277. }
  278. //javadoc: estimateAffinePartial2D(from, to)
  279. public static Mat estimateAffinePartial2D(Mat from, Mat to) {
  280. if (from != null)
  281. from.ThrowIfDisposed();
  282. if (to != null)
  283. to.ThrowIfDisposed();
  284. #if (UNITY_ANDROID && !UNITY_EDITOR)
  285. Mat retVal = new Mat(calib3d_Calib3d_estimateAffinePartial2D_16(from.nativeObj, to.nativeObj));
  286. return retVal;
  287. #else
  288. return null;
  289. #endif
  290. }
  291. //
  292. // C++: Mat cv::findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
  293. //
  294. //javadoc: findEssentialMat(points1, points2, cameraMatrix, method, prob, threshold, mask)
  295. public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob, double threshold, Mat mask) {
  296. if (points1 != null)
  297. points1.ThrowIfDisposed();
  298. if (points2 != null)
  299. points2.ThrowIfDisposed();
  300. if (cameraMatrix != null)
  301. cameraMatrix.ThrowIfDisposed();
  302. if (mask != null)
  303. mask.ThrowIfDisposed();
  304. #if (UNITY_ANDROID && !UNITY_EDITOR)
  305. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_10(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob, threshold, mask.nativeObj));
  306. return retVal;
  307. #else
  308. return null;
  309. #endif
  310. }
  311. //javadoc: findEssentialMat(points1, points2, cameraMatrix, method, prob, threshold)
  312. public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob, double threshold) {
  313. if (points1 != null)
  314. points1.ThrowIfDisposed();
  315. if (points2 != null)
  316. points2.ThrowIfDisposed();
  317. if (cameraMatrix != null)
  318. cameraMatrix.ThrowIfDisposed();
  319. #if (UNITY_ANDROID && !UNITY_EDITOR)
  320. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_11(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob, threshold));
  321. return retVal;
  322. #else
  323. return null;
  324. #endif
  325. }
  326. //javadoc: findEssentialMat(points1, points2, cameraMatrix, method, prob)
  327. public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob) {
  328. if (points1 != null)
  329. points1.ThrowIfDisposed();
  330. if (points2 != null)
  331. points2.ThrowIfDisposed();
  332. if (cameraMatrix != null)
  333. cameraMatrix.ThrowIfDisposed();
  334. #if (UNITY_ANDROID && !UNITY_EDITOR)
  335. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_12(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob));
  336. return retVal;
  337. #else
  338. return null;
  339. #endif
  340. }
  341. //javadoc: findEssentialMat(points1, points2, cameraMatrix, method)
  342. public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method) {
  343. if (points1 != null)
  344. points1.ThrowIfDisposed();
  345. if (points2 != null)
  346. points2.ThrowIfDisposed();
  347. if (cameraMatrix != null)
  348. cameraMatrix.ThrowIfDisposed();
  349. #if (UNITY_ANDROID && !UNITY_EDITOR)
  350. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_13(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method));
  351. return retVal;
  352. #else
  353. return null;
  354. #endif
  355. }
  356. //javadoc: findEssentialMat(points1, points2, cameraMatrix)
  357. public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix) {
  358. if (points1 != null)
  359. points1.ThrowIfDisposed();
  360. if (points2 != null)
  361. points2.ThrowIfDisposed();
  362. if (cameraMatrix != null)
  363. cameraMatrix.ThrowIfDisposed();
  364. #if (UNITY_ANDROID && !UNITY_EDITOR)
  365. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_14(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj));
  366. return retVal;
  367. #else
  368. return null;
  369. #endif
  370. }
  371. //
  372. // C++: Mat cv::findEssentialMat(Mat points1, Mat points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
  373. //
  374. //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob, threshold, mask)
  375. public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob, double threshold, Mat mask) {
  376. if (points1 != null)
  377. points1.ThrowIfDisposed();
  378. if (points2 != null)
  379. points2.ThrowIfDisposed();
  380. if (mask != null)
  381. mask.ThrowIfDisposed();
  382. #if (UNITY_ANDROID && !UNITY_EDITOR)
  383. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_15(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob, threshold, mask.nativeObj));
  384. return retVal;
  385. #else
  386. return null;
  387. #endif
  388. }
  389. //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob, threshold)
  390. public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob, double threshold) {
  391. if (points1 != null)
  392. points1.ThrowIfDisposed();
  393. if (points2 != null)
  394. points2.ThrowIfDisposed();
  395. #if (UNITY_ANDROID && !UNITY_EDITOR)
  396. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_16(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob, threshold));
  397. return retVal;
  398. #else
  399. return null;
  400. #endif
  401. }
  402. //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob)
  403. public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob) {
  404. if (points1 != null)
  405. points1.ThrowIfDisposed();
  406. if (points2 != null)
  407. points2.ThrowIfDisposed();
  408. #if (UNITY_ANDROID && !UNITY_EDITOR)
  409. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_17(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob));
  410. return retVal;
  411. #else
  412. return null;
  413. #endif
  414. }
  415. //javadoc: findEssentialMat(points1, points2, focal, pp, method)
  416. public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method) {
  417. if (points1 != null)
  418. points1.ThrowIfDisposed();
  419. if (points2 != null)
  420. points2.ThrowIfDisposed();
  421. #if (UNITY_ANDROID && !UNITY_EDITOR)
  422. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_18(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method));
  423. return retVal;
  424. #else
  425. return null;
  426. #endif
  427. }
  428. //javadoc: findEssentialMat(points1, points2, focal, pp)
  429. public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp) {
  430. if (points1 != null)
  431. points1.ThrowIfDisposed();
  432. if (points2 != null)
  433. points2.ThrowIfDisposed();
  434. #if (UNITY_ANDROID && !UNITY_EDITOR)
  435. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_19(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y));
  436. return retVal;
  437. #else
  438. return null;
  439. #endif
  440. }
  441. //javadoc: findEssentialMat(points1, points2, focal)
  442. public static Mat findEssentialMat(Mat points1, Mat points2, double focal) {
  443. if (points1 != null)
  444. points1.ThrowIfDisposed();
  445. if (points2 != null)
  446. points2.ThrowIfDisposed();
  447. #if (UNITY_ANDROID && !UNITY_EDITOR)
  448. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_110(points1.nativeObj, points2.nativeObj, focal));
  449. return retVal;
  450. #else
  451. return null;
  452. #endif
  453. }
  454. //javadoc: findEssentialMat(points1, points2)
  455. public static Mat findEssentialMat(Mat points1, Mat points2) {
  456. if (points1 != null)
  457. points1.ThrowIfDisposed();
  458. if (points2 != null)
  459. points2.ThrowIfDisposed();
  460. #if (UNITY_ANDROID && !UNITY_EDITOR)
  461. Mat retVal = new Mat(calib3d_Calib3d_findEssentialMat_111(points1.nativeObj, points2.nativeObj));
  462. return retVal;
  463. #else
  464. return null;
  465. #endif
  466. }
  467. //
  468. // C++: Mat cv::findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double ransacReprojThreshold = 3., double confidence = 0.99, Mat& mask = Mat())
  469. //
  470. //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold, confidence, mask)
  471. public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold, double confidence, Mat mask) {
  472. if (points1 != null)
  473. points1.ThrowIfDisposed();
  474. if (points2 != null)
  475. points2.ThrowIfDisposed();
  476. if (mask != null)
  477. mask.ThrowIfDisposed();
  478. #if (UNITY_ANDROID && !UNITY_EDITOR)
  479. Mat points1_mat = points1;
  480. Mat points2_mat = points2;
  481. Mat retVal = new Mat(calib3d_Calib3d_findFundamentalMat_10(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold, confidence, mask.nativeObj));
  482. return retVal;
  483. #else
  484. return null;
  485. #endif
  486. }
  487. //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold, confidence)
  488. public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold, double confidence) {
  489. if (points1 != null)
  490. points1.ThrowIfDisposed();
  491. if (points2 != null)
  492. points2.ThrowIfDisposed();
  493. #if (UNITY_ANDROID && !UNITY_EDITOR)
  494. Mat points1_mat = points1;
  495. Mat points2_mat = points2;
  496. Mat retVal = new Mat(calib3d_Calib3d_findFundamentalMat_11(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold, confidence));
  497. return retVal;
  498. #else
  499. return null;
  500. #endif
  501. }
  502. //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold)
  503. public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold) {
  504. if (points1 != null)
  505. points1.ThrowIfDisposed();
  506. if (points2 != null)
  507. points2.ThrowIfDisposed();
  508. #if (UNITY_ANDROID && !UNITY_EDITOR)
  509. Mat points1_mat = points1;
  510. Mat points2_mat = points2;
  511. Mat retVal = new Mat(calib3d_Calib3d_findFundamentalMat_12(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold));
  512. return retVal;
  513. #else
  514. return null;
  515. #endif
  516. }
  517. //javadoc: findFundamentalMat(points1, points2, method)
  518. public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method) {
  519. if (points1 != null)
  520. points1.ThrowIfDisposed();
  521. if (points2 != null)
  522. points2.ThrowIfDisposed();
  523. #if (UNITY_ANDROID && !UNITY_EDITOR)
  524. Mat points1_mat = points1;
  525. Mat points2_mat = points2;
  526. Mat retVal = new Mat(calib3d_Calib3d_findFundamentalMat_13(points1_mat.nativeObj, points2_mat.nativeObj, method));
  527. return retVal;
  528. #else
  529. return null;
  530. #endif
  531. }
  532. //javadoc: findFundamentalMat(points1, points2)
  533. public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2) {
  534. if (points1 != null)
  535. points1.ThrowIfDisposed();
  536. if (points2 != null)
  537. points2.ThrowIfDisposed();
  538. #if (UNITY_ANDROID && !UNITY_EDITOR)
  539. Mat points1_mat = points1;
  540. Mat points2_mat = points2;
  541. Mat retVal = new Mat(calib3d_Calib3d_findFundamentalMat_14(points1_mat.nativeObj, points2_mat.nativeObj));
  542. return retVal;
  543. #else
  544. return null;
  545. #endif
  546. }
  547. //
  548. // C++: Mat cv::findHomography(vector_Point2f srcPoints, vector_Point2f dstPoints, int method = 0, double ransacReprojThreshold = 3, Mat& mask = Mat(), int maxIters = 2000, double confidence = 0.995)
  549. //
  550. //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold, mask, maxIters, confidence)
  551. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters, double confidence) {
  552. if (srcPoints != null)
  553. srcPoints.ThrowIfDisposed();
  554. if (dstPoints != null)
  555. dstPoints.ThrowIfDisposed();
  556. if (mask != null)
  557. mask.ThrowIfDisposed();
  558. #if (UNITY_ANDROID && !UNITY_EDITOR)
  559. Mat srcPoints_mat = srcPoints;
  560. Mat dstPoints_mat = dstPoints;
  561. Mat retVal = new Mat(calib3d_Calib3d_findHomography_10(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters, confidence));
  562. return retVal;
  563. #else
  564. return null;
  565. #endif
  566. }
  567. //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold, mask, maxIters)
  568. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters) {
  569. if (srcPoints != null)
  570. srcPoints.ThrowIfDisposed();
  571. if (dstPoints != null)
  572. dstPoints.ThrowIfDisposed();
  573. if (mask != null)
  574. mask.ThrowIfDisposed();
  575. #if (UNITY_ANDROID && !UNITY_EDITOR)
  576. Mat srcPoints_mat = srcPoints;
  577. Mat dstPoints_mat = dstPoints;
  578. Mat retVal = new Mat(calib3d_Calib3d_findHomography_11(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters));
  579. return retVal;
  580. #else
  581. return null;
  582. #endif
  583. }
  584. //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold, mask)
  585. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask) {
  586. if (srcPoints != null)
  587. srcPoints.ThrowIfDisposed();
  588. if (dstPoints != null)
  589. dstPoints.ThrowIfDisposed();
  590. if (mask != null)
  591. mask.ThrowIfDisposed();
  592. #if (UNITY_ANDROID && !UNITY_EDITOR)
  593. Mat srcPoints_mat = srcPoints;
  594. Mat dstPoints_mat = dstPoints;
  595. Mat retVal = new Mat(calib3d_Calib3d_findHomography_12(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj));
  596. return retVal;
  597. #else
  598. return null;
  599. #endif
  600. }
  601. //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold)
  602. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold) {
  603. if (srcPoints != null)
  604. srcPoints.ThrowIfDisposed();
  605. if (dstPoints != null)
  606. dstPoints.ThrowIfDisposed();
  607. #if (UNITY_ANDROID && !UNITY_EDITOR)
  608. Mat srcPoints_mat = srcPoints;
  609. Mat dstPoints_mat = dstPoints;
  610. Mat retVal = new Mat(calib3d_Calib3d_findHomography_13(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold));
  611. return retVal;
  612. #else
  613. return null;
  614. #endif
  615. }
  616. //javadoc: findHomography(srcPoints, dstPoints, method)
  617. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method) {
  618. if (srcPoints != null)
  619. srcPoints.ThrowIfDisposed();
  620. if (dstPoints != null)
  621. dstPoints.ThrowIfDisposed();
  622. #if (UNITY_ANDROID && !UNITY_EDITOR)
  623. Mat srcPoints_mat = srcPoints;
  624. Mat dstPoints_mat = dstPoints;
  625. Mat retVal = new Mat(calib3d_Calib3d_findHomography_14(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method));
  626. return retVal;
  627. #else
  628. return null;
  629. #endif
  630. }
  631. //javadoc: findHomography(srcPoints, dstPoints)
  632. public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints) {
  633. if (srcPoints != null)
  634. srcPoints.ThrowIfDisposed();
  635. if (dstPoints != null)
  636. dstPoints.ThrowIfDisposed();
  637. #if (UNITY_ANDROID && !UNITY_EDITOR)
  638. Mat srcPoints_mat = srcPoints;
  639. Mat dstPoints_mat = dstPoints;
  640. Mat retVal = new Mat(calib3d_Calib3d_findHomography_15(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj));
  641. return retVal;
  642. #else
  643. return null;
  644. #endif
  645. }
  646. //
  647. // C++: Mat cv::getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
  648. //
  649. //javadoc: getDefaultNewCameraMatrix(cameraMatrix, imgsize, centerPrincipalPoint)
  650. public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize, bool centerPrincipalPoint) {
  651. if (cameraMatrix != null)
  652. cameraMatrix.ThrowIfDisposed();
  653. #if (UNITY_ANDROID && !UNITY_EDITOR)
  654. Mat retVal = new Mat(calib3d_Calib3d_getDefaultNewCameraMatrix_10(cameraMatrix.nativeObj, imgsize.width, imgsize.height, centerPrincipalPoint));
  655. return retVal;
  656. #else
  657. return null;
  658. #endif
  659. }
  660. //javadoc: getDefaultNewCameraMatrix(cameraMatrix, imgsize)
  661. public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize) {
  662. if (cameraMatrix != null)
  663. cameraMatrix.ThrowIfDisposed();
  664. #if (UNITY_ANDROID && !UNITY_EDITOR)
  665. Mat retVal = new Mat(calib3d_Calib3d_getDefaultNewCameraMatrix_11(cameraMatrix.nativeObj, imgsize.width, imgsize.height));
  666. return retVal;
  667. #else
  668. return null;
  669. #endif
  670. }
  671. //javadoc: getDefaultNewCameraMatrix(cameraMatrix)
  672. public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix) {
  673. if (cameraMatrix != null)
  674. cameraMatrix.ThrowIfDisposed();
  675. #if (UNITY_ANDROID && !UNITY_EDITOR)
  676. Mat retVal = new Mat(calib3d_Calib3d_getDefaultNewCameraMatrix_12(cameraMatrix.nativeObj));
  677. return retVal;
  678. #else
  679. return null;
  680. #endif
  681. }
  682. //
  683. // C++: Mat cv::getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize = Size(), Rect* validPixROI = 0, bool centerPrincipalPoint = false)
  684. //
  685. //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newImgSize, validPixROI, centerPrincipalPoint)
  686. public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize, Rect validPixROI, bool centerPrincipalPoint) {
  687. if (cameraMatrix != null)
  688. cameraMatrix.ThrowIfDisposed();
  689. if (distCoeffs != null)
  690. distCoeffs.ThrowIfDisposed();
  691. #if (UNITY_ANDROID && !UNITY_EDITOR)
  692. double[] validPixROI_out = new double[4];
  693. Mat retVal = new Mat(calib3d_Calib3d_getOptimalNewCameraMatrix_10(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height, validPixROI_out, centerPrincipalPoint));
  694. if (validPixROI != null) {
  695. validPixROI.x = (int)validPixROI_out[0];
  696. validPixROI.y = (int)validPixROI_out[1];
  697. validPixROI.width = (int)validPixROI_out[2];
  698. validPixROI.height = (int)validPixROI_out[3];
  699. }
  700. return retVal;
  701. #else
  702. return null;
  703. #endif
  704. }
  705. //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newImgSize, validPixROI)
  706. public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize, Rect validPixROI) {
  707. if (cameraMatrix != null)
  708. cameraMatrix.ThrowIfDisposed();
  709. if (distCoeffs != null)
  710. distCoeffs.ThrowIfDisposed();
  711. #if (UNITY_ANDROID && !UNITY_EDITOR)
  712. double[] validPixROI_out = new double[4];
  713. Mat retVal = new Mat(calib3d_Calib3d_getOptimalNewCameraMatrix_11(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height, validPixROI_out));
  714. if (validPixROI != null) {
  715. validPixROI.x = (int)validPixROI_out[0];
  716. validPixROI.y = (int)validPixROI_out[1];
  717. validPixROI.width = (int)validPixROI_out[2];
  718. validPixROI.height = (int)validPixROI_out[3];
  719. }
  720. return retVal;
  721. #else
  722. return null;
  723. #endif
  724. }
  725. //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newImgSize)
  726. public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize) {
  727. if (cameraMatrix != null)
  728. cameraMatrix.ThrowIfDisposed();
  729. if (distCoeffs != null)
  730. distCoeffs.ThrowIfDisposed();
  731. #if (UNITY_ANDROID && !UNITY_EDITOR)
  732. Mat retVal = new Mat(calib3d_Calib3d_getOptimalNewCameraMatrix_12(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height));
  733. return retVal;
  734. #else
  735. return null;
  736. #endif
  737. }
  738. //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha)
  739. public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha) {
  740. if (cameraMatrix != null)
  741. cameraMatrix.ThrowIfDisposed();
  742. if (distCoeffs != null)
  743. distCoeffs.ThrowIfDisposed();
  744. #if (UNITY_ANDROID && !UNITY_EDITOR)
  745. Mat retVal = new Mat(calib3d_Calib3d_getOptimalNewCameraMatrix_13(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha));
  746. return retVal;
  747. #else
  748. return null;
  749. #endif
  750. }
  751. //
  752. // C++: Mat cv::initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
  753. //
  754. //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize, aspectRatio)
  755. public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize, double aspectRatio) {
  756. #if (UNITY_ANDROID && !UNITY_EDITOR)
  757. List<Mat> objectPoints_tmplm = new List<Mat>((objectPoints != null) ? objectPoints.Count : 0);
  758. Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
  759. List<Mat> imagePoints_tmplm = new List<Mat>((imagePoints != null) ? imagePoints.Count : 0);
  760. Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
  761. Mat retVal = new Mat(calib3d_Calib3d_initCameraMatrix2D_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio));
  762. return retVal;
  763. #else
  764. return null;
  765. #endif
  766. }
  767. //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize)
  768. public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize) {
  769. #if (UNITY_ANDROID && !UNITY_EDITOR)
  770. List<Mat> objectPoints_tmplm = new List<Mat>((objectPoints != null) ? objectPoints.Count : 0);
  771. Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
  772. List<Mat> imagePoints_tmplm = new List<Mat>((imagePoints != null) ? imagePoints.Count : 0);
  773. Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
  774. Mat retVal = new Mat(calib3d_Calib3d_initCameraMatrix2D_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height));
  775. return retVal;
  776. #else
  777. return null;
  778. #endif
  779. }
  780. //
  781. // C++: Rect cv::getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
  782. //
  783. //javadoc: getValidDisparityROI(roi1, roi2, minDisparity, numberOfDisparities, SADWindowSize)
  784. public static Rect getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize) {
  785. #if (UNITY_ANDROID && !UNITY_EDITOR)
  786. double[] tmpArray = new double[4];
  787. calib3d_Calib3d_getValidDisparityROI_10(roi1.x, roi1.y, roi1.width, roi1.height, roi2.x, roi2.y, roi2.width, roi2.height, minDisparity, numberOfDisparities, SADWindowSize, tmpArray);
  788. Rect retVal = new Rect(tmpArray);
  789. return retVal;
  790. #else
  791. return null;
  792. #endif
  793. }
  794. //
  795. // C++: Vec3d cv::RQDecomp3x3(Mat src, Mat& mtxR, Mat& mtxQ, Mat& Qx = Mat(), Mat& Qy = Mat(), Mat& Qz = Mat())
  796. //
  797. //javadoc: RQDecomp3x3(src, mtxR, mtxQ, Qx, Qy, Qz)
  798. public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx, Mat Qy, Mat Qz) {
  799. if (src != null)
  800. src.ThrowIfDisposed();
  801. if (mtxR != null)
  802. mtxR.ThrowIfDisposed();
  803. if (mtxQ != null)
  804. mtxQ.ThrowIfDisposed();
  805. if (Qx != null)
  806. Qx.ThrowIfDisposed();
  807. if (Qy != null)
  808. Qy.ThrowIfDisposed();
  809. if (Qz != null)
  810. Qz.ThrowIfDisposed();
  811. #if (UNITY_ANDROID && !UNITY_EDITOR)
  812. double[] retVal = new double[3];
  813. calib3d_Calib3d_RQDecomp3x3_10(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj, Qy.nativeObj, Qz.nativeObj, retVal);
  814. return retVal;
  815. #else
  816. return null;
  817. #endif
  818. }
  819. //javadoc: RQDecomp3x3(src, mtxR, mtxQ, Qx, Qy)
  820. public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx, Mat Qy) {
  821. if (src != null)
  822. src.ThrowIfDisposed();
  823. if (mtxR != null)
  824. mtxR.ThrowIfDisposed();
  825. if (mtxQ != null)
  826. mtxQ.ThrowIfDisposed();
  827. if (Qx != null)
  828. Qx.ThrowIfDisposed();
  829. if (Qy != null)
  830. Qy.ThrowIfDisposed();
  831. #if (UNITY_ANDROID && !UNITY_EDITOR)
  832. double[] retVal = new double[3];
  833. calib3d_Calib3d_RQDecomp3x3_11(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj, Qy.nativeObj, retVal);
  834. return retVal;
  835. #else
  836. return null;
  837. #endif
  838. }
  839. //javadoc: RQDecomp3x3(src, mtxR, mtxQ, Qx)
  840. public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx) {
  841. if (src != null)
  842. src.ThrowIfDisposed();
  843. if (mtxR != null)
  844. mtxR.ThrowIfDisposed();
  845. if (mtxQ != null)
  846. mtxQ.ThrowIfDisposed();
  847. if (Qx != null)
  848. Qx.ThrowIfDisposed();
  849. #if (UNITY_ANDROID && !UNITY_EDITOR)
  850. double[] retVal = new double[3];
  851. calib3d_Calib3d_RQDecomp3x3_12(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj, retVal);
  852. return retVal;
  853. #else
  854. return null;
  855. #endif
  856. }
  857. //javadoc: RQDecomp3x3(src, mtxR, mtxQ)
  858. public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ) {
  859. if (src != null)
  860. src.ThrowIfDisposed();
  861. if (mtxR != null)
  862. mtxR.ThrowIfDisposed();
  863. if (mtxQ != null)
  864. mtxQ.ThrowIfDisposed();
  865. #if (UNITY_ANDROID && !UNITY_EDITOR)
  866. double[] retVal = new double[3];
  867. calib3d_Calib3d_RQDecomp3x3_13(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, retVal);
  868. return retVal;
  869. #else
  870. return null;
  871. #endif
  872. }
  873. //
  874. // C++: bool cv::checkChessboard(Mat img, Size size)
  875. //
  876. //javadoc: checkChessboard(img, size)
  877. public static bool checkChessboard(Mat img, Size size) {
  878. if (img != null)
  879. img.ThrowIfDisposed();
  880. #if (UNITY_ANDROID && !UNITY_EDITOR)
  881. bool retVal = calib3d_Calib3d_checkChessboard_10(img.nativeObj, size.width, size.height);
  882. return retVal;
  883. #else
  884. return false;
  885. #endif
  886. }
  887. //
  888. // C++: bool cv::findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
  889. //
  890. //javadoc: findChessboardCorners(image, patternSize, corners, flags)
  891. public static bool findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, int flags) {
  892. if (image != null)
  893. image.ThrowIfDisposed();
  894. if (corners != null)
  895. corners.ThrowIfDisposed();
  896. #if (UNITY_ANDROID && !UNITY_EDITOR)
  897. Mat corners_mat = corners;
  898. bool retVal = calib3d_Calib3d_findChessboardCorners_10(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, flags);
  899. return retVal;
  900. #else
  901. return false;
  902. #endif
  903. }
  904. //javadoc: findChessboardCorners(image, patternSize, corners)
  905. public static bool findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners) {
  906. if (image != null)
  907. image.ThrowIfDisposed();
  908. if (corners != null)
  909. corners.ThrowIfDisposed();
  910. #if (UNITY_ANDROID && !UNITY_EDITOR)
  911. Mat corners_mat = corners;
  912. bool retVal = calib3d_Calib3d_findChessboardCorners_11(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj);
  913. return retVal;
  914. #else
  915. return false;
  916. #endif
  917. }
  918. //
  919. // C++: bool cv::findChessboardCornersSB(Mat image, Size patternSize, Mat& corners, int flags = 0)
  920. //
  921. //javadoc: findChessboardCornersSB(image, patternSize, corners, flags)
  922. public static bool findChessboardCornersSB(Mat image, Size patternSize, Mat corners, int flags) {
  923. if (image != null)
  924. image.ThrowIfDisposed();
  925. if (corners != null)
  926. corners.ThrowIfDisposed();
  927. #if (UNITY_ANDROID && !UNITY_EDITOR)
  928. bool retVal = calib3d_Calib3d_findChessboardCornersSB_10(image.nativeObj, patternSize.width, patternSize.height, corners.nativeObj, flags);
  929. return retVal;
  930. #else
  931. return false;
  932. #endif
  933. }
  934. //javadoc: findChessboardCornersSB(image, patternSize, corners)
  935. public static bool findChessboardCornersSB(Mat image, Size patternSize, Mat corners) {
  936. if (image != null)
  937. image.ThrowIfDisposed();
  938. if (corners != null)
  939. corners.ThrowIfDisposed();
  940. #if (UNITY_ANDROID && !UNITY_EDITOR)
  941. bool retVal = calib3d_Calib3d_findChessboardCornersSB_11(image.nativeObj, patternSize.width, patternSize.height, corners.nativeObj);
  942. return retVal;
  943. #else
  944. return false;
  945. #endif
  946. }
  947. //
  948. // C++: bool cv::findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags, Ptr_FeatureDetector blobDetector, CirclesGridFinderParameters parameters)
  949. //
  950. // Unknown type 'Ptr_FeatureDetector' (I), skipping the function
  951. //
  952. // C++: bool cv::findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags = CALIB_CB_SYMMETRIC_GRID, Ptr_FeatureDetector blobDetector = SimpleBlobDetector::create())
  953. //
  954. //javadoc: findCirclesGrid(image, patternSize, centers, flags)
  955. public static bool findCirclesGrid(Mat image, Size patternSize, Mat centers, int flags) {
  956. if (image != null)
  957. image.ThrowIfDisposed();
  958. if (centers != null)
  959. centers.ThrowIfDisposed();
  960. #if (UNITY_ANDROID && !UNITY_EDITOR)
  961. bool retVal = calib3d_Calib3d_findCirclesGrid_10(image.nativeObj, patternSize.width, patternSize.height, centers.nativeObj, flags);
  962. return retVal;
  963. #else
  964. return false;
  965. #endif
  966. }
  967. //javadoc: findCirclesGrid(image, patternSize, centers)
  968. public static bool findCirclesGrid(Mat image, Size patternSize, Mat centers) {
  969. if (image != null)
  970. image.ThrowIfDisposed();
  971. if (centers != null)
  972. centers.ThrowIfDisposed();
  973. #if (UNITY_ANDROID && !UNITY_EDITOR)
  974. bool retVal = calib3d_Calib3d_findCirclesGrid_12(image.nativeObj, patternSize.width, patternSize.height, centers.nativeObj);
  975. return retVal;
  976. #else
  977. return false;
  978. #endif
  979. }
  980. //
  981. // C++: bool cv::solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
  982. //
  983. //javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, flags)
  984. public static bool solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int flags) {
  985. if (objectPoints != null)
  986. objectPoints.ThrowIfDisposed();
  987. if (imagePoints != null)
  988. imagePoints.ThrowIfDisposed();
  989. if (cameraMatrix != null)
  990. cameraMatrix.ThrowIfDisposed();
  991. if (distCoeffs != null)
  992. distCoeffs.ThrowIfDisposed();
  993. if (rvec != null)
  994. rvec.ThrowIfDisposed();
  995. if (tvec != null)
  996. tvec.ThrowIfDisposed();
  997. #if (UNITY_ANDROID && !UNITY_EDITOR)
  998. Mat objectPoints_mat = objectPoints;
  999. Mat imagePoints_mat = imagePoints;
  1000. Mat distCoeffs_mat = distCoeffs;
  1001. bool retVal = calib3d_Calib3d_solvePnP_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
  1002. return retVal;
  1003. #else
  1004. return false;
  1005. #endif
  1006. }
  1007. //javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess)
  1008. public static bool solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess) {
  1009. if (objectPoints != null)
  1010. objectPoints.ThrowIfDisposed();
  1011. if (imagePoints != null)
  1012. imagePoints.ThrowIfDisposed();
  1013. if (cameraMatrix != null)
  1014. cameraMatrix.ThrowIfDisposed();
  1015. if (distCoeffs != null)
  1016. distCoeffs.ThrowIfDisposed();
  1017. if (rvec != null)
  1018. rvec.ThrowIfDisposed();
  1019. if (tvec != null)
  1020. tvec.ThrowIfDisposed();
  1021. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1022. Mat objectPoints_mat = objectPoints;
  1023. Mat imagePoints_mat = imagePoints;
  1024. Mat distCoeffs_mat = distCoeffs;
  1025. bool retVal = calib3d_Calib3d_solvePnP_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess);
  1026. return retVal;
  1027. #else
  1028. return false;
  1029. #endif
  1030. }
  1031. //javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec)
  1032. public static bool solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec) {
  1033. if (objectPoints != null)
  1034. objectPoints.ThrowIfDisposed();
  1035. if (imagePoints != null)
  1036. imagePoints.ThrowIfDisposed();
  1037. if (cameraMatrix != null)
  1038. cameraMatrix.ThrowIfDisposed();
  1039. if (distCoeffs != null)
  1040. distCoeffs.ThrowIfDisposed();
  1041. if (rvec != null)
  1042. rvec.ThrowIfDisposed();
  1043. if (tvec != null)
  1044. tvec.ThrowIfDisposed();
  1045. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1046. Mat objectPoints_mat = objectPoints;
  1047. Mat imagePoints_mat = imagePoints;
  1048. Mat distCoeffs_mat = distCoeffs;
  1049. bool retVal = calib3d_Calib3d_solvePnP_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
  1050. return retVal;
  1051. #else
  1052. return false;
  1053. #endif
  1054. }
  1055. //
  1056. // C++: bool cv::solvePnPRansac(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int iterationsCount = 100, float reprojectionError = 8.0, double confidence = 0.99, Mat& inliers = Mat(), int flags = SOLVEPNP_ITERATIVE)
  1057. //
  1058. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers, flags)
  1059. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags) {
  1060. if (objectPoints != null)
  1061. objectPoints.ThrowIfDisposed();
  1062. if (imagePoints != null)
  1063. imagePoints.ThrowIfDisposed();
  1064. if (cameraMatrix != null)
  1065. cameraMatrix.ThrowIfDisposed();
  1066. if (distCoeffs != null)
  1067. distCoeffs.ThrowIfDisposed();
  1068. if (rvec != null)
  1069. rvec.ThrowIfDisposed();
  1070. if (tvec != null)
  1071. tvec.ThrowIfDisposed();
  1072. if (inliers != null)
  1073. inliers.ThrowIfDisposed();
  1074. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1075. Mat objectPoints_mat = objectPoints;
  1076. Mat imagePoints_mat = imagePoints;
  1077. Mat distCoeffs_mat = distCoeffs;
  1078. bool retVal = calib3d_Calib3d_solvePnPRansac_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
  1079. return retVal;
  1080. #else
  1081. return false;
  1082. #endif
  1083. }
  1084. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers)
  1085. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers) {
  1086. if (objectPoints != null)
  1087. objectPoints.ThrowIfDisposed();
  1088. if (imagePoints != null)
  1089. imagePoints.ThrowIfDisposed();
  1090. if (cameraMatrix != null)
  1091. cameraMatrix.ThrowIfDisposed();
  1092. if (distCoeffs != null)
  1093. distCoeffs.ThrowIfDisposed();
  1094. if (rvec != null)
  1095. rvec.ThrowIfDisposed();
  1096. if (tvec != null)
  1097. tvec.ThrowIfDisposed();
  1098. if (inliers != null)
  1099. inliers.ThrowIfDisposed();
  1100. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1101. Mat objectPoints_mat = objectPoints;
  1102. Mat imagePoints_mat = imagePoints;
  1103. Mat distCoeffs_mat = distCoeffs;
  1104. bool retVal = calib3d_Calib3d_solvePnPRansac_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj);
  1105. return retVal;
  1106. #else
  1107. return false;
  1108. #endif
  1109. }
  1110. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError, confidence)
  1111. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence) {
  1112. if (objectPoints != null)
  1113. objectPoints.ThrowIfDisposed();
  1114. if (imagePoints != null)
  1115. imagePoints.ThrowIfDisposed();
  1116. if (cameraMatrix != null)
  1117. cameraMatrix.ThrowIfDisposed();
  1118. if (distCoeffs != null)
  1119. distCoeffs.ThrowIfDisposed();
  1120. if (rvec != null)
  1121. rvec.ThrowIfDisposed();
  1122. if (tvec != null)
  1123. tvec.ThrowIfDisposed();
  1124. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1125. Mat objectPoints_mat = objectPoints;
  1126. Mat imagePoints_mat = imagePoints;
  1127. Mat distCoeffs_mat = distCoeffs;
  1128. bool retVal = calib3d_Calib3d_solvePnPRansac_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence);
  1129. return retVal;
  1130. #else
  1131. return false;
  1132. #endif
  1133. }
  1134. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError)
  1135. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError) {
  1136. if (objectPoints != null)
  1137. objectPoints.ThrowIfDisposed();
  1138. if (imagePoints != null)
  1139. imagePoints.ThrowIfDisposed();
  1140. if (cameraMatrix != null)
  1141. cameraMatrix.ThrowIfDisposed();
  1142. if (distCoeffs != null)
  1143. distCoeffs.ThrowIfDisposed();
  1144. if (rvec != null)
  1145. rvec.ThrowIfDisposed();
  1146. if (tvec != null)
  1147. tvec.ThrowIfDisposed();
  1148. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1149. Mat objectPoints_mat = objectPoints;
  1150. Mat imagePoints_mat = imagePoints;
  1151. Mat distCoeffs_mat = distCoeffs;
  1152. bool retVal = calib3d_Calib3d_solvePnPRansac_13(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError);
  1153. return retVal;
  1154. #else
  1155. return false;
  1156. #endif
  1157. }
  1158. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount)
  1159. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int iterationsCount) {
  1160. if (objectPoints != null)
  1161. objectPoints.ThrowIfDisposed();
  1162. if (imagePoints != null)
  1163. imagePoints.ThrowIfDisposed();
  1164. if (cameraMatrix != null)
  1165. cameraMatrix.ThrowIfDisposed();
  1166. if (distCoeffs != null)
  1167. distCoeffs.ThrowIfDisposed();
  1168. if (rvec != null)
  1169. rvec.ThrowIfDisposed();
  1170. if (tvec != null)
  1171. tvec.ThrowIfDisposed();
  1172. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1173. Mat objectPoints_mat = objectPoints;
  1174. Mat imagePoints_mat = imagePoints;
  1175. Mat distCoeffs_mat = distCoeffs;
  1176. bool retVal = calib3d_Calib3d_solvePnPRansac_14(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount);
  1177. return retVal;
  1178. #else
  1179. return false;
  1180. #endif
  1181. }
  1182. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess)
  1183. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess) {
  1184. if (objectPoints != null)
  1185. objectPoints.ThrowIfDisposed();
  1186. if (imagePoints != null)
  1187. imagePoints.ThrowIfDisposed();
  1188. if (cameraMatrix != null)
  1189. cameraMatrix.ThrowIfDisposed();
  1190. if (distCoeffs != null)
  1191. distCoeffs.ThrowIfDisposed();
  1192. if (rvec != null)
  1193. rvec.ThrowIfDisposed();
  1194. if (tvec != null)
  1195. tvec.ThrowIfDisposed();
  1196. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1197. Mat objectPoints_mat = objectPoints;
  1198. Mat imagePoints_mat = imagePoints;
  1199. Mat distCoeffs_mat = distCoeffs;
  1200. bool retVal = calib3d_Calib3d_solvePnPRansac_15(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess);
  1201. return retVal;
  1202. #else
  1203. return false;
  1204. #endif
  1205. }
  1206. //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec)
  1207. public static bool solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec) {
  1208. if (objectPoints != null)
  1209. objectPoints.ThrowIfDisposed();
  1210. if (imagePoints != null)
  1211. imagePoints.ThrowIfDisposed();
  1212. if (cameraMatrix != null)
  1213. cameraMatrix.ThrowIfDisposed();
  1214. if (distCoeffs != null)
  1215. distCoeffs.ThrowIfDisposed();
  1216. if (rvec != null)
  1217. rvec.ThrowIfDisposed();
  1218. if (tvec != null)
  1219. tvec.ThrowIfDisposed();
  1220. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1221. Mat objectPoints_mat = objectPoints;
  1222. Mat imagePoints_mat = imagePoints;
  1223. Mat distCoeffs_mat = distCoeffs;
  1224. bool retVal = calib3d_Calib3d_solvePnPRansac_16(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
  1225. return retVal;
  1226. #else
  1227. return false;
  1228. #endif
  1229. }
  1230. //
  1231. // C++: bool cv::stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat& H1, Mat& H2, double threshold = 5)
  1232. //
  1233. //javadoc: stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2, threshold)
  1234. public static bool stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat H1, Mat H2, double threshold) {
  1235. if (points1 != null)
  1236. points1.ThrowIfDisposed();
  1237. if (points2 != null)
  1238. points2.ThrowIfDisposed();
  1239. if (F != null)
  1240. F.ThrowIfDisposed();
  1241. if (H1 != null)
  1242. H1.ThrowIfDisposed();
  1243. if (H2 != null)
  1244. H2.ThrowIfDisposed();
  1245. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1246. bool retVal = calib3d_Calib3d_stereoRectifyUncalibrated_10(points1.nativeObj, points2.nativeObj, F.nativeObj, imgSize.width, imgSize.height, H1.nativeObj, H2.nativeObj, threshold);
  1247. return retVal;
  1248. #else
  1249. return false;
  1250. #endif
  1251. }
  1252. //javadoc: stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2)
  1253. public static bool stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat H1, Mat H2) {
  1254. if (points1 != null)
  1255. points1.ThrowIfDisposed();
  1256. if (points2 != null)
  1257. points2.ThrowIfDisposed();
  1258. if (F != null)
  1259. F.ThrowIfDisposed();
  1260. if (H1 != null)
  1261. H1.ThrowIfDisposed();
  1262. if (H2 != null)
  1263. H2.ThrowIfDisposed();
  1264. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1265. bool retVal = calib3d_Calib3d_stereoRectifyUncalibrated_11(points1.nativeObj, points2.nativeObj, F.nativeObj, imgSize.width, imgSize.height, H1.nativeObj, H2.nativeObj);
  1266. return retVal;
  1267. #else
  1268. return false;
  1269. #endif
  1270. }
  1271. //
  1272. // C++: double cv::calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  1273. //
  1274. //javadoc: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags, criteria)
  1275. public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags, TermCriteria criteria) {
  1276. if (cameraMatrix != null)
  1277. cameraMatrix.ThrowIfDisposed();
  1278. if (distCoeffs != null)
  1279. distCoeffs.ThrowIfDisposed();
  1280. if (stdDeviationsIntrinsics != null)
  1281. stdDeviationsIntrinsics.ThrowIfDisposed();
  1282. if (stdDeviationsExtrinsics != null)
  1283. stdDeviationsExtrinsics.ThrowIfDisposed();
  1284. if (perViewErrors != null)
  1285. perViewErrors.ThrowIfDisposed();
  1286. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1287. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1288. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1289. Mat rvecs_mat = new Mat();
  1290. Mat tvecs_mat = new Mat();
  1291. double retVal = calib3d_Calib3d_calibrateCameraExtended_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1292. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1293. rvecs_mat.release();
  1294. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1295. tvecs_mat.release();
  1296. return retVal;
  1297. #else
  1298. return -1;
  1299. #endif
  1300. }
  1301. //javadoc: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags)
  1302. public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags) {
  1303. if (cameraMatrix != null)
  1304. cameraMatrix.ThrowIfDisposed();
  1305. if (distCoeffs != null)
  1306. distCoeffs.ThrowIfDisposed();
  1307. if (stdDeviationsIntrinsics != null)
  1308. stdDeviationsIntrinsics.ThrowIfDisposed();
  1309. if (stdDeviationsExtrinsics != null)
  1310. stdDeviationsExtrinsics.ThrowIfDisposed();
  1311. if (perViewErrors != null)
  1312. perViewErrors.ThrowIfDisposed();
  1313. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1314. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1315. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1316. Mat rvecs_mat = new Mat();
  1317. Mat tvecs_mat = new Mat();
  1318. double retVal = calib3d_Calib3d_calibrateCameraExtended_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj, flags);
  1319. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1320. rvecs_mat.release();
  1321. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1322. tvecs_mat.release();
  1323. return retVal;
  1324. #else
  1325. return -1;
  1326. #endif
  1327. }
  1328. //javadoc: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors)
  1329. public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors) {
  1330. if (cameraMatrix != null)
  1331. cameraMatrix.ThrowIfDisposed();
  1332. if (distCoeffs != null)
  1333. distCoeffs.ThrowIfDisposed();
  1334. if (stdDeviationsIntrinsics != null)
  1335. stdDeviationsIntrinsics.ThrowIfDisposed();
  1336. if (stdDeviationsExtrinsics != null)
  1337. stdDeviationsExtrinsics.ThrowIfDisposed();
  1338. if (perViewErrors != null)
  1339. perViewErrors.ThrowIfDisposed();
  1340. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1341. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1342. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1343. Mat rvecs_mat = new Mat();
  1344. Mat tvecs_mat = new Mat();
  1345. double retVal = calib3d_Calib3d_calibrateCameraExtended_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj);
  1346. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1347. rvecs_mat.release();
  1348. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1349. tvecs_mat.release();
  1350. return retVal;
  1351. #else
  1352. return -1;
  1353. #endif
  1354. }
  1355. //
  1356. // C++: double cv::calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  1357. //
  1358. //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags, criteria)
  1359. public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria) {
  1360. if (cameraMatrix != null)
  1361. cameraMatrix.ThrowIfDisposed();
  1362. if (distCoeffs != null)
  1363. distCoeffs.ThrowIfDisposed();
  1364. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1365. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1366. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1367. Mat rvecs_mat = new Mat();
  1368. Mat tvecs_mat = new Mat();
  1369. double retVal = calib3d_Calib3d_calibrateCamera_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1370. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1371. rvecs_mat.release();
  1372. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1373. tvecs_mat.release();
  1374. return retVal;
  1375. #else
  1376. return -1;
  1377. #endif
  1378. }
  1379. //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
  1380. public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags) {
  1381. if (cameraMatrix != null)
  1382. cameraMatrix.ThrowIfDisposed();
  1383. if (distCoeffs != null)
  1384. distCoeffs.ThrowIfDisposed();
  1385. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1386. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1387. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1388. Mat rvecs_mat = new Mat();
  1389. Mat tvecs_mat = new Mat();
  1390. double retVal = calib3d_Calib3d_calibrateCamera_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
  1391. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1392. rvecs_mat.release();
  1393. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1394. tvecs_mat.release();
  1395. return retVal;
  1396. #else
  1397. return -1;
  1398. #endif
  1399. }
  1400. //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs)
  1401. public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs) {
  1402. if (cameraMatrix != null)
  1403. cameraMatrix.ThrowIfDisposed();
  1404. if (distCoeffs != null)
  1405. distCoeffs.ThrowIfDisposed();
  1406. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1407. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1408. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1409. Mat rvecs_mat = new Mat();
  1410. Mat tvecs_mat = new Mat();
  1411. double retVal = calib3d_Calib3d_calibrateCamera_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
  1412. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1413. rvecs_mat.release();
  1414. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1415. tvecs_mat.release();
  1416. return retVal;
  1417. #else
  1418. return -1;
  1419. #endif
  1420. }
  1421. //
  1422. // C++: double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& stdDeviationsObjPoints, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  1423. //
  1424. //javadoc: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors, flags, criteria)
  1425. public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags, TermCriteria criteria) {
  1426. if (cameraMatrix != null)
  1427. cameraMatrix.ThrowIfDisposed();
  1428. if (distCoeffs != null)
  1429. distCoeffs.ThrowIfDisposed();
  1430. if (newObjPoints != null)
  1431. newObjPoints.ThrowIfDisposed();
  1432. if (stdDeviationsIntrinsics != null)
  1433. stdDeviationsIntrinsics.ThrowIfDisposed();
  1434. if (stdDeviationsExtrinsics != null)
  1435. stdDeviationsExtrinsics.ThrowIfDisposed();
  1436. if (stdDeviationsObjPoints != null)
  1437. stdDeviationsObjPoints.ThrowIfDisposed();
  1438. if (perViewErrors != null)
  1439. perViewErrors.ThrowIfDisposed();
  1440. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1441. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1442. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1443. Mat rvecs_mat = new Mat();
  1444. Mat tvecs_mat = new Mat();
  1445. double retVal = calib3d_Calib3d_calibrateCameraROExtended_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.nativeObj, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1446. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1447. rvecs_mat.release();
  1448. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1449. tvecs_mat.release();
  1450. return retVal;
  1451. #else
  1452. return -1;
  1453. #endif
  1454. }
  1455. //javadoc: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors, flags)
  1456. public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags) {
  1457. if (cameraMatrix != null)
  1458. cameraMatrix.ThrowIfDisposed();
  1459. if (distCoeffs != null)
  1460. distCoeffs.ThrowIfDisposed();
  1461. if (newObjPoints != null)
  1462. newObjPoints.ThrowIfDisposed();
  1463. if (stdDeviationsIntrinsics != null)
  1464. stdDeviationsIntrinsics.ThrowIfDisposed();
  1465. if (stdDeviationsExtrinsics != null)
  1466. stdDeviationsExtrinsics.ThrowIfDisposed();
  1467. if (stdDeviationsObjPoints != null)
  1468. stdDeviationsObjPoints.ThrowIfDisposed();
  1469. if (perViewErrors != null)
  1470. perViewErrors.ThrowIfDisposed();
  1471. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1472. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1473. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1474. Mat rvecs_mat = new Mat();
  1475. Mat tvecs_mat = new Mat();
  1476. double retVal = calib3d_Calib3d_calibrateCameraROExtended_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.nativeObj, perViewErrors.nativeObj, flags);
  1477. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1478. rvecs_mat.release();
  1479. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1480. tvecs_mat.release();
  1481. return retVal;
  1482. #else
  1483. return -1;
  1484. #endif
  1485. }
  1486. //javadoc: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors)
  1487. public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors) {
  1488. if (cameraMatrix != null)
  1489. cameraMatrix.ThrowIfDisposed();
  1490. if (distCoeffs != null)
  1491. distCoeffs.ThrowIfDisposed();
  1492. if (newObjPoints != null)
  1493. newObjPoints.ThrowIfDisposed();
  1494. if (stdDeviationsIntrinsics != null)
  1495. stdDeviationsIntrinsics.ThrowIfDisposed();
  1496. if (stdDeviationsExtrinsics != null)
  1497. stdDeviationsExtrinsics.ThrowIfDisposed();
  1498. if (stdDeviationsObjPoints != null)
  1499. stdDeviationsObjPoints.ThrowIfDisposed();
  1500. if (perViewErrors != null)
  1501. perViewErrors.ThrowIfDisposed();
  1502. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1503. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1504. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1505. Mat rvecs_mat = new Mat();
  1506. Mat tvecs_mat = new Mat();
  1507. double retVal = calib3d_Calib3d_calibrateCameraROExtended_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.nativeObj, perViewErrors.nativeObj);
  1508. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1509. rvecs_mat.release();
  1510. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1511. tvecs_mat.release();
  1512. return retVal;
  1513. #else
  1514. return -1;
  1515. #endif
  1516. }
  1517. //
  1518. // C++: double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  1519. //
  1520. //javadoc: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, flags, criteria)
  1521. public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, int flags, TermCriteria criteria) {
  1522. if (cameraMatrix != null)
  1523. cameraMatrix.ThrowIfDisposed();
  1524. if (distCoeffs != null)
  1525. distCoeffs.ThrowIfDisposed();
  1526. if (newObjPoints != null)
  1527. newObjPoints.ThrowIfDisposed();
  1528. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1529. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1530. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1531. Mat rvecs_mat = new Mat();
  1532. Mat tvecs_mat = new Mat();
  1533. double retVal = calib3d_Calib3d_calibrateCameraRO_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1534. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1535. rvecs_mat.release();
  1536. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1537. tvecs_mat.release();
  1538. return retVal;
  1539. #else
  1540. return -1;
  1541. #endif
  1542. }
  1543. //javadoc: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, flags)
  1544. public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, int flags) {
  1545. if (cameraMatrix != null)
  1546. cameraMatrix.ThrowIfDisposed();
  1547. if (distCoeffs != null)
  1548. distCoeffs.ThrowIfDisposed();
  1549. if (newObjPoints != null)
  1550. newObjPoints.ThrowIfDisposed();
  1551. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1552. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1553. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1554. Mat rvecs_mat = new Mat();
  1555. Mat tvecs_mat = new Mat();
  1556. double retVal = calib3d_Calib3d_calibrateCameraRO_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, flags);
  1557. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1558. rvecs_mat.release();
  1559. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1560. tvecs_mat.release();
  1561. return retVal;
  1562. #else
  1563. return -1;
  1564. #endif
  1565. }
  1566. //javadoc: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints)
  1567. public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints) {
  1568. if (cameraMatrix != null)
  1569. cameraMatrix.ThrowIfDisposed();
  1570. if (distCoeffs != null)
  1571. distCoeffs.ThrowIfDisposed();
  1572. if (newObjPoints != null)
  1573. newObjPoints.ThrowIfDisposed();
  1574. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1575. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1576. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1577. Mat rvecs_mat = new Mat();
  1578. Mat tvecs_mat = new Mat();
  1579. double retVal = calib3d_Calib3d_calibrateCameraRO_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj);
  1580. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1581. rvecs_mat.release();
  1582. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1583. tvecs_mat.release();
  1584. return retVal;
  1585. #else
  1586. return -1;
  1587. #endif
  1588. }
  1589. //
  1590. // C++: double cv::sampsonDistance(Mat pt1, Mat pt2, Mat F)
  1591. //
  1592. //javadoc: sampsonDistance(pt1, pt2, F)
  1593. public static double sampsonDistance(Mat pt1, Mat pt2, Mat F) {
  1594. if (pt1 != null)
  1595. pt1.ThrowIfDisposed();
  1596. if (pt2 != null)
  1597. pt2.ThrowIfDisposed();
  1598. if (F != null)
  1599. F.ThrowIfDisposed();
  1600. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1601. double retVal = calib3d_Calib3d_sampsonDistance_10(pt1.nativeObj, pt2.nativeObj, F.nativeObj);
  1602. return retVal;
  1603. #else
  1604. return -1;
  1605. #endif
  1606. }
  1607. //
  1608. // C++: double cv::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, Mat& perViewErrors, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
  1609. //
  1610. //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors, flags, criteria)
  1611. public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, TermCriteria criteria) {
  1612. if (cameraMatrix1 != null)
  1613. cameraMatrix1.ThrowIfDisposed();
  1614. if (distCoeffs1 != null)
  1615. distCoeffs1.ThrowIfDisposed();
  1616. if (cameraMatrix2 != null)
  1617. cameraMatrix2.ThrowIfDisposed();
  1618. if (distCoeffs2 != null)
  1619. distCoeffs2.ThrowIfDisposed();
  1620. if (R != null)
  1621. R.ThrowIfDisposed();
  1622. if (T != null)
  1623. T.ThrowIfDisposed();
  1624. if (E != null)
  1625. E.ThrowIfDisposed();
  1626. if (F != null)
  1627. F.ThrowIfDisposed();
  1628. if (perViewErrors != null)
  1629. perViewErrors.ThrowIfDisposed();
  1630. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1631. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1632. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1633. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1634. double retVal = calib3d_Calib3d_stereoCalibrateExtended_10(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1635. return retVal;
  1636. #else
  1637. return -1;
  1638. #endif
  1639. }
  1640. //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors, flags)
  1641. public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags) {
  1642. if (cameraMatrix1 != null)
  1643. cameraMatrix1.ThrowIfDisposed();
  1644. if (distCoeffs1 != null)
  1645. distCoeffs1.ThrowIfDisposed();
  1646. if (cameraMatrix2 != null)
  1647. cameraMatrix2.ThrowIfDisposed();
  1648. if (distCoeffs2 != null)
  1649. distCoeffs2.ThrowIfDisposed();
  1650. if (R != null)
  1651. R.ThrowIfDisposed();
  1652. if (T != null)
  1653. T.ThrowIfDisposed();
  1654. if (E != null)
  1655. E.ThrowIfDisposed();
  1656. if (F != null)
  1657. F.ThrowIfDisposed();
  1658. if (perViewErrors != null)
  1659. perViewErrors.ThrowIfDisposed();
  1660. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1661. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1662. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1663. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1664. double retVal = calib3d_Calib3d_stereoCalibrateExtended_11(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, perViewErrors.nativeObj, flags);
  1665. return retVal;
  1666. #else
  1667. return -1;
  1668. #endif
  1669. }
  1670. //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors)
  1671. public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors) {
  1672. if (cameraMatrix1 != null)
  1673. cameraMatrix1.ThrowIfDisposed();
  1674. if (distCoeffs1 != null)
  1675. distCoeffs1.ThrowIfDisposed();
  1676. if (cameraMatrix2 != null)
  1677. cameraMatrix2.ThrowIfDisposed();
  1678. if (distCoeffs2 != null)
  1679. distCoeffs2.ThrowIfDisposed();
  1680. if (R != null)
  1681. R.ThrowIfDisposed();
  1682. if (T != null)
  1683. T.ThrowIfDisposed();
  1684. if (E != null)
  1685. E.ThrowIfDisposed();
  1686. if (F != null)
  1687. F.ThrowIfDisposed();
  1688. if (perViewErrors != null)
  1689. perViewErrors.ThrowIfDisposed();
  1690. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1691. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1692. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1693. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1694. double retVal = calib3d_Calib3d_stereoCalibrateExtended_12(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, perViewErrors.nativeObj);
  1695. return retVal;
  1696. #else
  1697. return -1;
  1698. #endif
  1699. }
  1700. //
  1701. // C++: double cv::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
  1702. //
  1703. //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags, criteria)
  1704. public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags, TermCriteria criteria) {
  1705. if (cameraMatrix1 != null)
  1706. cameraMatrix1.ThrowIfDisposed();
  1707. if (distCoeffs1 != null)
  1708. distCoeffs1.ThrowIfDisposed();
  1709. if (cameraMatrix2 != null)
  1710. cameraMatrix2.ThrowIfDisposed();
  1711. if (distCoeffs2 != null)
  1712. distCoeffs2.ThrowIfDisposed();
  1713. if (R != null)
  1714. R.ThrowIfDisposed();
  1715. if (T != null)
  1716. T.ThrowIfDisposed();
  1717. if (E != null)
  1718. E.ThrowIfDisposed();
  1719. if (F != null)
  1720. F.ThrowIfDisposed();
  1721. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1722. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1723. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1724. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1725. double retVal = calib3d_Calib3d_stereoCalibrate_10(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1726. return retVal;
  1727. #else
  1728. return -1;
  1729. #endif
  1730. }
  1731. //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags)
  1732. public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags) {
  1733. if (cameraMatrix1 != null)
  1734. cameraMatrix1.ThrowIfDisposed();
  1735. if (distCoeffs1 != null)
  1736. distCoeffs1.ThrowIfDisposed();
  1737. if (cameraMatrix2 != null)
  1738. cameraMatrix2.ThrowIfDisposed();
  1739. if (distCoeffs2 != null)
  1740. distCoeffs2.ThrowIfDisposed();
  1741. if (R != null)
  1742. R.ThrowIfDisposed();
  1743. if (T != null)
  1744. T.ThrowIfDisposed();
  1745. if (E != null)
  1746. E.ThrowIfDisposed();
  1747. if (F != null)
  1748. F.ThrowIfDisposed();
  1749. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1750. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1751. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1752. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1753. double retVal = calib3d_Calib3d_stereoCalibrate_11(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags);
  1754. return retVal;
  1755. #else
  1756. return -1;
  1757. #endif
  1758. }
  1759. //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F)
  1760. public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F) {
  1761. if (cameraMatrix1 != null)
  1762. cameraMatrix1.ThrowIfDisposed();
  1763. if (distCoeffs1 != null)
  1764. distCoeffs1.ThrowIfDisposed();
  1765. if (cameraMatrix2 != null)
  1766. cameraMatrix2.ThrowIfDisposed();
  1767. if (distCoeffs2 != null)
  1768. distCoeffs2.ThrowIfDisposed();
  1769. if (R != null)
  1770. R.ThrowIfDisposed();
  1771. if (T != null)
  1772. T.ThrowIfDisposed();
  1773. if (E != null)
  1774. E.ThrowIfDisposed();
  1775. if (F != null)
  1776. F.ThrowIfDisposed();
  1777. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1778. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1779. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1780. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1781. double retVal = calib3d_Calib3d_stereoCalibrate_12(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj);
  1782. return retVal;
  1783. #else
  1784. return -1;
  1785. #endif
  1786. }
  1787. //
  1788. // C++: double cv::fisheye::calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
  1789. //
  1790. //javadoc: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags, criteria)
  1791. public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria) {
  1792. if (K != null)
  1793. K.ThrowIfDisposed();
  1794. if (D != null)
  1795. D.ThrowIfDisposed();
  1796. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1797. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1798. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1799. Mat rvecs_mat = new Mat();
  1800. Mat tvecs_mat = new Mat();
  1801. double retVal = calib3d_Calib3d_fisheye_1calibrate_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1802. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1803. rvecs_mat.release();
  1804. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1805. tvecs_mat.release();
  1806. return retVal;
  1807. #else
  1808. return -1;
  1809. #endif
  1810. }
  1811. //javadoc: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags)
  1812. public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags) {
  1813. if (K != null)
  1814. K.ThrowIfDisposed();
  1815. if (D != null)
  1816. D.ThrowIfDisposed();
  1817. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1818. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1819. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1820. Mat rvecs_mat = new Mat();
  1821. Mat tvecs_mat = new Mat();
  1822. double retVal = calib3d_Calib3d_fisheye_1calibrate_11(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
  1823. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1824. rvecs_mat.release();
  1825. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1826. tvecs_mat.release();
  1827. return retVal;
  1828. #else
  1829. return -1;
  1830. #endif
  1831. }
  1832. //javadoc: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs)
  1833. public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs) {
  1834. if (K != null)
  1835. K.ThrowIfDisposed();
  1836. if (D != null)
  1837. D.ThrowIfDisposed();
  1838. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1839. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1840. Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
  1841. Mat rvecs_mat = new Mat();
  1842. Mat tvecs_mat = new Mat();
  1843. double retVal = calib3d_Calib3d_fisheye_1calibrate_12(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
  1844. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  1845. rvecs_mat.release();
  1846. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  1847. tvecs_mat.release();
  1848. return retVal;
  1849. #else
  1850. return -1;
  1851. #endif
  1852. }
  1853. //
  1854. // C++: double cv::fisheye::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
  1855. //
  1856. //javadoc: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags, criteria)
  1857. public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria) {
  1858. if (K1 != null)
  1859. K1.ThrowIfDisposed();
  1860. if (D1 != null)
  1861. D1.ThrowIfDisposed();
  1862. if (K2 != null)
  1863. K2.ThrowIfDisposed();
  1864. if (D2 != null)
  1865. D2.ThrowIfDisposed();
  1866. if (R != null)
  1867. R.ThrowIfDisposed();
  1868. if (T != null)
  1869. T.ThrowIfDisposed();
  1870. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1871. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1872. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1873. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1874. double retVal = calib3d_Calib3d_fisheye_1stereoCalibrate_10(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
  1875. return retVal;
  1876. #else
  1877. return -1;
  1878. #endif
  1879. }
  1880. //javadoc: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags)
  1881. public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags) {
  1882. if (K1 != null)
  1883. K1.ThrowIfDisposed();
  1884. if (D1 != null)
  1885. D1.ThrowIfDisposed();
  1886. if (K2 != null)
  1887. K2.ThrowIfDisposed();
  1888. if (D2 != null)
  1889. D2.ThrowIfDisposed();
  1890. if (R != null)
  1891. R.ThrowIfDisposed();
  1892. if (T != null)
  1893. T.ThrowIfDisposed();
  1894. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1895. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1896. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1897. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1898. double retVal = calib3d_Calib3d_fisheye_1stereoCalibrate_11(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags);
  1899. return retVal;
  1900. #else
  1901. return -1;
  1902. #endif
  1903. }
  1904. //javadoc: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T)
  1905. public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T) {
  1906. if (K1 != null)
  1907. K1.ThrowIfDisposed();
  1908. if (D1 != null)
  1909. D1.ThrowIfDisposed();
  1910. if (K2 != null)
  1911. K2.ThrowIfDisposed();
  1912. if (D2 != null)
  1913. D2.ThrowIfDisposed();
  1914. if (R != null)
  1915. R.ThrowIfDisposed();
  1916. if (T != null)
  1917. T.ThrowIfDisposed();
  1918. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1919. Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
  1920. Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
  1921. Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
  1922. double retVal = calib3d_Calib3d_fisheye_1stereoCalibrate_12(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj);
  1923. return retVal;
  1924. #else
  1925. return -1;
  1926. #endif
  1927. }
  1928. //
  1929. // C++: float cv::rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
  1930. //
  1931. //javadoc: rectify3Collinear(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, cameraMatrix3, distCoeffs3, imgpt1, imgpt3, imageSize, R12, T12, R13, T13, R1, R2, R3, P1, P2, P3, Q, alpha, newImgSize, roi1, roi2, flags)
  1932. public static float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, List<Mat> imgpt1, List<Mat> imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags) {
  1933. if (cameraMatrix1 != null)
  1934. cameraMatrix1.ThrowIfDisposed();
  1935. if (distCoeffs1 != null)
  1936. distCoeffs1.ThrowIfDisposed();
  1937. if (cameraMatrix2 != null)
  1938. cameraMatrix2.ThrowIfDisposed();
  1939. if (distCoeffs2 != null)
  1940. distCoeffs2.ThrowIfDisposed();
  1941. if (cameraMatrix3 != null)
  1942. cameraMatrix3.ThrowIfDisposed();
  1943. if (distCoeffs3 != null)
  1944. distCoeffs3.ThrowIfDisposed();
  1945. if (R12 != null)
  1946. R12.ThrowIfDisposed();
  1947. if (T12 != null)
  1948. T12.ThrowIfDisposed();
  1949. if (R13 != null)
  1950. R13.ThrowIfDisposed();
  1951. if (T13 != null)
  1952. T13.ThrowIfDisposed();
  1953. if (R1 != null)
  1954. R1.ThrowIfDisposed();
  1955. if (R2 != null)
  1956. R2.ThrowIfDisposed();
  1957. if (R3 != null)
  1958. R3.ThrowIfDisposed();
  1959. if (P1 != null)
  1960. P1.ThrowIfDisposed();
  1961. if (P2 != null)
  1962. P2.ThrowIfDisposed();
  1963. if (P3 != null)
  1964. P3.ThrowIfDisposed();
  1965. if (Q != null)
  1966. Q.ThrowIfDisposed();
  1967. #if (UNITY_ANDROID && !UNITY_EDITOR)
  1968. Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
  1969. Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
  1970. double[] roi1_out = new double[4];
  1971. double[] roi2_out = new double[4];
  1972. float retVal = calib3d_Calib3d_rectify3Collinear_10(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
  1973. if (roi1 != null) {
  1974. roi1.x = (int)roi1_out[0];
  1975. roi1.y = (int)roi1_out[1];
  1976. roi1.width = (int)roi1_out[2];
  1977. roi1.height = (int)roi1_out[3];
  1978. }
  1979. if (roi2 != null) {
  1980. roi2.x = (int)roi2_out[0];
  1981. roi2.y = (int)roi2_out[1];
  1982. roi2.width = (int)roi2_out[2];
  1983. roi2.height = (int)roi2_out[3];
  1984. }
  1985. return retVal;
  1986. #else
  1987. return -1;
  1988. #endif
  1989. }
  1990. //
  1991. // C++: int cv::decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
  1992. //
  1993. //javadoc: decomposeHomographyMat(H, K, rotations, translations, normals)
  1994. public static int decomposeHomographyMat(Mat H, Mat K, List<Mat> rotations, List<Mat> translations, List<Mat> normals) {
  1995. if (H != null)
  1996. H.ThrowIfDisposed();
  1997. if (K != null)
  1998. K.ThrowIfDisposed();
  1999. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2000. Mat rotations_mat = new Mat();
  2001. Mat translations_mat = new Mat();
  2002. Mat normals_mat = new Mat();
  2003. int retVal = calib3d_Calib3d_decomposeHomographyMat_10(H.nativeObj, K.nativeObj, rotations_mat.nativeObj, translations_mat.nativeObj, normals_mat.nativeObj);
  2004. Converters.Mat_to_vector_Mat(rotations_mat, rotations);
  2005. rotations_mat.release();
  2006. Converters.Mat_to_vector_Mat(translations_mat, translations);
  2007. translations_mat.release();
  2008. Converters.Mat_to_vector_Mat(normals_mat, normals);
  2009. normals_mat.release();
  2010. return retVal;
  2011. #else
  2012. return -1;
  2013. #endif
  2014. }
  2015. //
  2016. // C++: int cv::estimateAffine3D(Mat src, Mat dst, Mat& _out, Mat& inliers, double ransacThreshold = 3, double confidence = 0.99)
  2017. //
  2018. //javadoc: estimateAffine3D(src, dst, _out, inliers, ransacThreshold, confidence)
  2019. public static int estimateAffine3D(Mat src, Mat dst, Mat _out, Mat inliers, double ransacThreshold, double confidence) {
  2020. if (src != null)
  2021. src.ThrowIfDisposed();
  2022. if (dst != null)
  2023. dst.ThrowIfDisposed();
  2024. if (_out != null)
  2025. _out.ThrowIfDisposed();
  2026. if (inliers != null)
  2027. inliers.ThrowIfDisposed();
  2028. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2029. int retVal = calib3d_Calib3d_estimateAffine3D_10(src.nativeObj, dst.nativeObj, _out.nativeObj, inliers.nativeObj, ransacThreshold, confidence);
  2030. return retVal;
  2031. #else
  2032. return -1;
  2033. #endif
  2034. }
  2035. //javadoc: estimateAffine3D(src, dst, _out, inliers, ransacThreshold)
  2036. public static int estimateAffine3D(Mat src, Mat dst, Mat _out, Mat inliers, double ransacThreshold) {
  2037. if (src != null)
  2038. src.ThrowIfDisposed();
  2039. if (dst != null)
  2040. dst.ThrowIfDisposed();
  2041. if (_out != null)
  2042. _out.ThrowIfDisposed();
  2043. if (inliers != null)
  2044. inliers.ThrowIfDisposed();
  2045. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2046. int retVal = calib3d_Calib3d_estimateAffine3D_11(src.nativeObj, dst.nativeObj, _out.nativeObj, inliers.nativeObj, ransacThreshold);
  2047. return retVal;
  2048. #else
  2049. return -1;
  2050. #endif
  2051. }
  2052. //javadoc: estimateAffine3D(src, dst, _out, inliers)
  2053. public static int estimateAffine3D(Mat src, Mat dst, Mat _out, Mat inliers) {
  2054. if (src != null)
  2055. src.ThrowIfDisposed();
  2056. if (dst != null)
  2057. dst.ThrowIfDisposed();
  2058. if (_out != null)
  2059. _out.ThrowIfDisposed();
  2060. if (inliers != null)
  2061. inliers.ThrowIfDisposed();
  2062. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2063. int retVal = calib3d_Calib3d_estimateAffine3D_12(src.nativeObj, dst.nativeObj, _out.nativeObj, inliers.nativeObj);
  2064. return retVal;
  2065. #else
  2066. return -1;
  2067. #endif
  2068. }
  2069. //
  2070. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat& R, Mat& t, double focal = 1.0, Point2d pp = Point2d(0, 0), Mat& mask = Mat())
  2071. //
  2072. //javadoc: recoverPose(E, points1, points2, R, t, focal, pp, mask)
  2073. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal, Point pp, Mat mask) {
  2074. if (E != null)
  2075. E.ThrowIfDisposed();
  2076. if (points1 != null)
  2077. points1.ThrowIfDisposed();
  2078. if (points2 != null)
  2079. points2.ThrowIfDisposed();
  2080. if (R != null)
  2081. R.ThrowIfDisposed();
  2082. if (t != null)
  2083. t.ThrowIfDisposed();
  2084. if (mask != null)
  2085. mask.ThrowIfDisposed();
  2086. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2087. int retVal = calib3d_Calib3d_recoverPose_10(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal, pp.x, pp.y, mask.nativeObj);
  2088. return retVal;
  2089. #else
  2090. return -1;
  2091. #endif
  2092. }
  2093. //javadoc: recoverPose(E, points1, points2, R, t, focal, pp)
  2094. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal, Point pp) {
  2095. if (E != null)
  2096. E.ThrowIfDisposed();
  2097. if (points1 != null)
  2098. points1.ThrowIfDisposed();
  2099. if (points2 != null)
  2100. points2.ThrowIfDisposed();
  2101. if (R != null)
  2102. R.ThrowIfDisposed();
  2103. if (t != null)
  2104. t.ThrowIfDisposed();
  2105. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2106. int retVal = calib3d_Calib3d_recoverPose_11(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal, pp.x, pp.y);
  2107. return retVal;
  2108. #else
  2109. return -1;
  2110. #endif
  2111. }
  2112. //javadoc: recoverPose(E, points1, points2, R, t, focal)
  2113. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal) {
  2114. if (E != null)
  2115. E.ThrowIfDisposed();
  2116. if (points1 != null)
  2117. points1.ThrowIfDisposed();
  2118. if (points2 != null)
  2119. points2.ThrowIfDisposed();
  2120. if (R != null)
  2121. R.ThrowIfDisposed();
  2122. if (t != null)
  2123. t.ThrowIfDisposed();
  2124. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2125. int retVal = calib3d_Calib3d_recoverPose_12(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal);
  2126. return retVal;
  2127. #else
  2128. return -1;
  2129. #endif
  2130. }
  2131. //javadoc: recoverPose(E, points1, points2, R, t)
  2132. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t) {
  2133. if (E != null)
  2134. E.ThrowIfDisposed();
  2135. if (points1 != null)
  2136. points1.ThrowIfDisposed();
  2137. if (points2 != null)
  2138. points2.ThrowIfDisposed();
  2139. if (R != null)
  2140. R.ThrowIfDisposed();
  2141. if (t != null)
  2142. t.ThrowIfDisposed();
  2143. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2144. int retVal = calib3d_Calib3d_recoverPose_13(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj);
  2145. return retVal;
  2146. #else
  2147. return -1;
  2148. #endif
  2149. }
  2150. //
  2151. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, Mat& mask = Mat())
  2152. //
  2153. //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, mask)
  2154. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, Mat mask) {
  2155. if (E != null)
  2156. E.ThrowIfDisposed();
  2157. if (points1 != null)
  2158. points1.ThrowIfDisposed();
  2159. if (points2 != null)
  2160. points2.ThrowIfDisposed();
  2161. if (cameraMatrix != null)
  2162. cameraMatrix.ThrowIfDisposed();
  2163. if (R != null)
  2164. R.ThrowIfDisposed();
  2165. if (t != null)
  2166. t.ThrowIfDisposed();
  2167. if (mask != null)
  2168. mask.ThrowIfDisposed();
  2169. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2170. int retVal = calib3d_Calib3d_recoverPose_14(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, mask.nativeObj);
  2171. return retVal;
  2172. #else
  2173. return -1;
  2174. #endif
  2175. }
  2176. //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t)
  2177. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t) {
  2178. if (E != null)
  2179. E.ThrowIfDisposed();
  2180. if (points1 != null)
  2181. points1.ThrowIfDisposed();
  2182. if (points2 != null)
  2183. points2.ThrowIfDisposed();
  2184. if (cameraMatrix != null)
  2185. cameraMatrix.ThrowIfDisposed();
  2186. if (R != null)
  2187. R.ThrowIfDisposed();
  2188. if (t != null)
  2189. t.ThrowIfDisposed();
  2190. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2191. int retVal = calib3d_Calib3d_recoverPose_15(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj);
  2192. return retVal;
  2193. #else
  2194. return -1;
  2195. #endif
  2196. }
  2197. //
  2198. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, double distanceThresh, Mat& mask = Mat(), Mat& triangulatedPoints = Mat())
  2199. //
  2200. //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, distanceThresh, mask, triangulatedPoints)
  2201. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh, Mat mask, Mat triangulatedPoints) {
  2202. if (E != null)
  2203. E.ThrowIfDisposed();
  2204. if (points1 != null)
  2205. points1.ThrowIfDisposed();
  2206. if (points2 != null)
  2207. points2.ThrowIfDisposed();
  2208. if (cameraMatrix != null)
  2209. cameraMatrix.ThrowIfDisposed();
  2210. if (R != null)
  2211. R.ThrowIfDisposed();
  2212. if (t != null)
  2213. t.ThrowIfDisposed();
  2214. if (mask != null)
  2215. mask.ThrowIfDisposed();
  2216. if (triangulatedPoints != null)
  2217. triangulatedPoints.ThrowIfDisposed();
  2218. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2219. int retVal = calib3d_Calib3d_recoverPose_16(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh, mask.nativeObj, triangulatedPoints.nativeObj);
  2220. return retVal;
  2221. #else
  2222. return -1;
  2223. #endif
  2224. }
  2225. //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, distanceThresh, mask)
  2226. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh, Mat mask) {
  2227. if (E != null)
  2228. E.ThrowIfDisposed();
  2229. if (points1 != null)
  2230. points1.ThrowIfDisposed();
  2231. if (points2 != null)
  2232. points2.ThrowIfDisposed();
  2233. if (cameraMatrix != null)
  2234. cameraMatrix.ThrowIfDisposed();
  2235. if (R != null)
  2236. R.ThrowIfDisposed();
  2237. if (t != null)
  2238. t.ThrowIfDisposed();
  2239. if (mask != null)
  2240. mask.ThrowIfDisposed();
  2241. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2242. int retVal = calib3d_Calib3d_recoverPose_17(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh, mask.nativeObj);
  2243. return retVal;
  2244. #else
  2245. return -1;
  2246. #endif
  2247. }
  2248. //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, distanceThresh)
  2249. public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh) {
  2250. if (E != null)
  2251. E.ThrowIfDisposed();
  2252. if (points1 != null)
  2253. points1.ThrowIfDisposed();
  2254. if (points2 != null)
  2255. points2.ThrowIfDisposed();
  2256. if (cameraMatrix != null)
  2257. cameraMatrix.ThrowIfDisposed();
  2258. if (R != null)
  2259. R.ThrowIfDisposed();
  2260. if (t != null)
  2261. t.ThrowIfDisposed();
  2262. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2263. int retVal = calib3d_Calib3d_recoverPose_18(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh);
  2264. return retVal;
  2265. #else
  2266. return -1;
  2267. #endif
  2268. }
  2269. //
  2270. // C++: int cv::solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags)
  2271. //
  2272. //javadoc: solveP3P(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
  2273. public static int solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags) {
  2274. if (objectPoints != null)
  2275. objectPoints.ThrowIfDisposed();
  2276. if (imagePoints != null)
  2277. imagePoints.ThrowIfDisposed();
  2278. if (cameraMatrix != null)
  2279. cameraMatrix.ThrowIfDisposed();
  2280. if (distCoeffs != null)
  2281. distCoeffs.ThrowIfDisposed();
  2282. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2283. Mat rvecs_mat = new Mat();
  2284. Mat tvecs_mat = new Mat();
  2285. int retVal = calib3d_Calib3d_solveP3P_10(objectPoints.nativeObj, imagePoints.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
  2286. Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
  2287. rvecs_mat.release();
  2288. Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
  2289. tvecs_mat.release();
  2290. return retVal;
  2291. #else
  2292. return -1;
  2293. #endif
  2294. }
  2295. //
  2296. // C++: void cv::Rodrigues(Mat src, Mat& dst, Mat& jacobian = Mat())
  2297. //
  2298. //javadoc: Rodrigues(src, dst, jacobian)
  2299. public static void Rodrigues(Mat src, Mat dst, Mat jacobian) {
  2300. if (src != null)
  2301. src.ThrowIfDisposed();
  2302. if (dst != null)
  2303. dst.ThrowIfDisposed();
  2304. if (jacobian != null)
  2305. jacobian.ThrowIfDisposed();
  2306. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2307. calib3d_Calib3d_Rodrigues_10(src.nativeObj, dst.nativeObj, jacobian.nativeObj);
  2308. return;
  2309. #else
  2310. return;
  2311. #endif
  2312. }
  2313. //javadoc: Rodrigues(src, dst)
  2314. public static void Rodrigues(Mat src, Mat dst) {
  2315. if (src != null)
  2316. src.ThrowIfDisposed();
  2317. if (dst != null)
  2318. dst.ThrowIfDisposed();
  2319. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2320. calib3d_Calib3d_Rodrigues_11(src.nativeObj, dst.nativeObj);
  2321. return;
  2322. #else
  2323. return;
  2324. #endif
  2325. }
  2326. //
  2327. // C++: void cv::calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio)
  2328. //
  2329. //javadoc: calibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, fovx, fovy, focalLength, principalPoint, aspectRatio)
  2330. public static void calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double[] fovx, double[] fovy, double[] focalLength, Point principalPoint, double[] aspectRatio) {
  2331. if (cameraMatrix != null)
  2332. cameraMatrix.ThrowIfDisposed();
  2333. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2334. double[] fovx_out = new double[1];
  2335. double[] fovy_out = new double[1];
  2336. double[] focalLength_out = new double[1];
  2337. double[] principalPoint_out = new double[2];
  2338. double[] aspectRatio_out = new double[1];
  2339. calib3d_Calib3d_calibrationMatrixValues_10(cameraMatrix.nativeObj, imageSize.width, imageSize.height, apertureWidth, apertureHeight, fovx_out, fovy_out, focalLength_out, principalPoint_out, aspectRatio_out);
  2340. if (fovx != null)
  2341. fovx[0] = (double)fovx_out[0];
  2342. if (fovy != null)
  2343. fovy[0] = (double)fovy_out[0];
  2344. if (focalLength != null)
  2345. focalLength[0] = (double)focalLength_out[0];
  2346. if (principalPoint != null) {
  2347. principalPoint.x = principalPoint_out[0];
  2348. principalPoint.y = principalPoint_out[1];
  2349. }
  2350. if (aspectRatio != null)
  2351. aspectRatio[0] = (double)aspectRatio_out[0];
  2352. return;
  2353. #else
  2354. return;
  2355. #endif
  2356. }
  2357. //
  2358. // C++: void cv::composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat& rvec3, Mat& tvec3, Mat& dr3dr1 = Mat(), Mat& dr3dt1 = Mat(), Mat& dr3dr2 = Mat(), Mat& dr3dt2 = Mat(), Mat& dt3dr1 = Mat(), Mat& dt3dt1 = Mat(), Mat& dt3dr2 = Mat(), Mat& dt3dt2 = Mat())
  2359. //
  2360. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2, dt3dt2)
  2361. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2, Mat dt3dr1, Mat dt3dt1, Mat dt3dr2, Mat dt3dt2) {
  2362. if (rvec1 != null)
  2363. rvec1.ThrowIfDisposed();
  2364. if (tvec1 != null)
  2365. tvec1.ThrowIfDisposed();
  2366. if (rvec2 != null)
  2367. rvec2.ThrowIfDisposed();
  2368. if (tvec2 != null)
  2369. tvec2.ThrowIfDisposed();
  2370. if (rvec3 != null)
  2371. rvec3.ThrowIfDisposed();
  2372. if (tvec3 != null)
  2373. tvec3.ThrowIfDisposed();
  2374. if (dr3dr1 != null)
  2375. dr3dr1.ThrowIfDisposed();
  2376. if (dr3dt1 != null)
  2377. dr3dt1.ThrowIfDisposed();
  2378. if (dr3dr2 != null)
  2379. dr3dr2.ThrowIfDisposed();
  2380. if (dr3dt2 != null)
  2381. dr3dt2.ThrowIfDisposed();
  2382. if (dt3dr1 != null)
  2383. dt3dr1.ThrowIfDisposed();
  2384. if (dt3dt1 != null)
  2385. dt3dt1.ThrowIfDisposed();
  2386. if (dt3dr2 != null)
  2387. dt3dr2.ThrowIfDisposed();
  2388. if (dt3dt2 != null)
  2389. dt3dt2.ThrowIfDisposed();
  2390. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2391. calib3d_Calib3d_composeRT_10(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj, dt3dt1.nativeObj, dt3dr2.nativeObj, dt3dt2.nativeObj);
  2392. return;
  2393. #else
  2394. return;
  2395. #endif
  2396. }
  2397. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2)
  2398. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2, Mat dt3dr1, Mat dt3dt1, Mat dt3dr2) {
  2399. if (rvec1 != null)
  2400. rvec1.ThrowIfDisposed();
  2401. if (tvec1 != null)
  2402. tvec1.ThrowIfDisposed();
  2403. if (rvec2 != null)
  2404. rvec2.ThrowIfDisposed();
  2405. if (tvec2 != null)
  2406. tvec2.ThrowIfDisposed();
  2407. if (rvec3 != null)
  2408. rvec3.ThrowIfDisposed();
  2409. if (tvec3 != null)
  2410. tvec3.ThrowIfDisposed();
  2411. if (dr3dr1 != null)
  2412. dr3dr1.ThrowIfDisposed();
  2413. if (dr3dt1 != null)
  2414. dr3dt1.ThrowIfDisposed();
  2415. if (dr3dr2 != null)
  2416. dr3dr2.ThrowIfDisposed();
  2417. if (dr3dt2 != null)
  2418. dr3dt2.ThrowIfDisposed();
  2419. if (dt3dr1 != null)
  2420. dt3dr1.ThrowIfDisposed();
  2421. if (dt3dt1 != null)
  2422. dt3dt1.ThrowIfDisposed();
  2423. if (dt3dr2 != null)
  2424. dt3dr2.ThrowIfDisposed();
  2425. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2426. calib3d_Calib3d_composeRT_11(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj, dt3dt1.nativeObj, dt3dr2.nativeObj);
  2427. return;
  2428. #else
  2429. return;
  2430. #endif
  2431. }
  2432. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1)
  2433. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2, Mat dt3dr1, Mat dt3dt1) {
  2434. if (rvec1 != null)
  2435. rvec1.ThrowIfDisposed();
  2436. if (tvec1 != null)
  2437. tvec1.ThrowIfDisposed();
  2438. if (rvec2 != null)
  2439. rvec2.ThrowIfDisposed();
  2440. if (tvec2 != null)
  2441. tvec2.ThrowIfDisposed();
  2442. if (rvec3 != null)
  2443. rvec3.ThrowIfDisposed();
  2444. if (tvec3 != null)
  2445. tvec3.ThrowIfDisposed();
  2446. if (dr3dr1 != null)
  2447. dr3dr1.ThrowIfDisposed();
  2448. if (dr3dt1 != null)
  2449. dr3dt1.ThrowIfDisposed();
  2450. if (dr3dr2 != null)
  2451. dr3dr2.ThrowIfDisposed();
  2452. if (dr3dt2 != null)
  2453. dr3dt2.ThrowIfDisposed();
  2454. if (dt3dr1 != null)
  2455. dt3dr1.ThrowIfDisposed();
  2456. if (dt3dt1 != null)
  2457. dt3dt1.ThrowIfDisposed();
  2458. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2459. calib3d_Calib3d_composeRT_12(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj, dt3dt1.nativeObj);
  2460. return;
  2461. #else
  2462. return;
  2463. #endif
  2464. }
  2465. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1)
  2466. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2, Mat dt3dr1) {
  2467. if (rvec1 != null)
  2468. rvec1.ThrowIfDisposed();
  2469. if (tvec1 != null)
  2470. tvec1.ThrowIfDisposed();
  2471. if (rvec2 != null)
  2472. rvec2.ThrowIfDisposed();
  2473. if (tvec2 != null)
  2474. tvec2.ThrowIfDisposed();
  2475. if (rvec3 != null)
  2476. rvec3.ThrowIfDisposed();
  2477. if (tvec3 != null)
  2478. tvec3.ThrowIfDisposed();
  2479. if (dr3dr1 != null)
  2480. dr3dr1.ThrowIfDisposed();
  2481. if (dr3dt1 != null)
  2482. dr3dt1.ThrowIfDisposed();
  2483. if (dr3dr2 != null)
  2484. dr3dr2.ThrowIfDisposed();
  2485. if (dr3dt2 != null)
  2486. dr3dt2.ThrowIfDisposed();
  2487. if (dt3dr1 != null)
  2488. dt3dr1.ThrowIfDisposed();
  2489. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2490. calib3d_Calib3d_composeRT_13(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj);
  2491. return;
  2492. #else
  2493. return;
  2494. #endif
  2495. }
  2496. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2)
  2497. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2) {
  2498. if (rvec1 != null)
  2499. rvec1.ThrowIfDisposed();
  2500. if (tvec1 != null)
  2501. tvec1.ThrowIfDisposed();
  2502. if (rvec2 != null)
  2503. rvec2.ThrowIfDisposed();
  2504. if (tvec2 != null)
  2505. tvec2.ThrowIfDisposed();
  2506. if (rvec3 != null)
  2507. rvec3.ThrowIfDisposed();
  2508. if (tvec3 != null)
  2509. tvec3.ThrowIfDisposed();
  2510. if (dr3dr1 != null)
  2511. dr3dr1.ThrowIfDisposed();
  2512. if (dr3dt1 != null)
  2513. dr3dt1.ThrowIfDisposed();
  2514. if (dr3dr2 != null)
  2515. dr3dr2.ThrowIfDisposed();
  2516. if (dr3dt2 != null)
  2517. dr3dt2.ThrowIfDisposed();
  2518. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2519. calib3d_Calib3d_composeRT_14(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj);
  2520. return;
  2521. #else
  2522. return;
  2523. #endif
  2524. }
  2525. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2)
  2526. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2) {
  2527. if (rvec1 != null)
  2528. rvec1.ThrowIfDisposed();
  2529. if (tvec1 != null)
  2530. tvec1.ThrowIfDisposed();
  2531. if (rvec2 != null)
  2532. rvec2.ThrowIfDisposed();
  2533. if (tvec2 != null)
  2534. tvec2.ThrowIfDisposed();
  2535. if (rvec3 != null)
  2536. rvec3.ThrowIfDisposed();
  2537. if (tvec3 != null)
  2538. tvec3.ThrowIfDisposed();
  2539. if (dr3dr1 != null)
  2540. dr3dr1.ThrowIfDisposed();
  2541. if (dr3dt1 != null)
  2542. dr3dt1.ThrowIfDisposed();
  2543. if (dr3dr2 != null)
  2544. dr3dr2.ThrowIfDisposed();
  2545. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2546. calib3d_Calib3d_composeRT_15(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj);
  2547. return;
  2548. #else
  2549. return;
  2550. #endif
  2551. }
  2552. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1)
  2553. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1) {
  2554. if (rvec1 != null)
  2555. rvec1.ThrowIfDisposed();
  2556. if (tvec1 != null)
  2557. tvec1.ThrowIfDisposed();
  2558. if (rvec2 != null)
  2559. rvec2.ThrowIfDisposed();
  2560. if (tvec2 != null)
  2561. tvec2.ThrowIfDisposed();
  2562. if (rvec3 != null)
  2563. rvec3.ThrowIfDisposed();
  2564. if (tvec3 != null)
  2565. tvec3.ThrowIfDisposed();
  2566. if (dr3dr1 != null)
  2567. dr3dr1.ThrowIfDisposed();
  2568. if (dr3dt1 != null)
  2569. dr3dt1.ThrowIfDisposed();
  2570. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2571. calib3d_Calib3d_composeRT_16(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj);
  2572. return;
  2573. #else
  2574. return;
  2575. #endif
  2576. }
  2577. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1)
  2578. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1) {
  2579. if (rvec1 != null)
  2580. rvec1.ThrowIfDisposed();
  2581. if (tvec1 != null)
  2582. tvec1.ThrowIfDisposed();
  2583. if (rvec2 != null)
  2584. rvec2.ThrowIfDisposed();
  2585. if (tvec2 != null)
  2586. tvec2.ThrowIfDisposed();
  2587. if (rvec3 != null)
  2588. rvec3.ThrowIfDisposed();
  2589. if (tvec3 != null)
  2590. tvec3.ThrowIfDisposed();
  2591. if (dr3dr1 != null)
  2592. dr3dr1.ThrowIfDisposed();
  2593. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2594. calib3d_Calib3d_composeRT_17(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj);
  2595. return;
  2596. #else
  2597. return;
  2598. #endif
  2599. }
  2600. //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3)
  2601. public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3) {
  2602. if (rvec1 != null)
  2603. rvec1.ThrowIfDisposed();
  2604. if (tvec1 != null)
  2605. tvec1.ThrowIfDisposed();
  2606. if (rvec2 != null)
  2607. rvec2.ThrowIfDisposed();
  2608. if (tvec2 != null)
  2609. tvec2.ThrowIfDisposed();
  2610. if (rvec3 != null)
  2611. rvec3.ThrowIfDisposed();
  2612. if (tvec3 != null)
  2613. tvec3.ThrowIfDisposed();
  2614. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2615. calib3d_Calib3d_composeRT_18(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj);
  2616. return;
  2617. #else
  2618. return;
  2619. #endif
  2620. }
  2621. //
  2622. // C++: void cv::computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat& lines)
  2623. //
  2624. //javadoc: computeCorrespondEpilines(points, whichImage, F, lines)
  2625. public static void computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat lines) {
  2626. if (points != null)
  2627. points.ThrowIfDisposed();
  2628. if (F != null)
  2629. F.ThrowIfDisposed();
  2630. if (lines != null)
  2631. lines.ThrowIfDisposed();
  2632. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2633. calib3d_Calib3d_computeCorrespondEpilines_10(points.nativeObj, whichImage, F.nativeObj, lines.nativeObj);
  2634. return;
  2635. #else
  2636. return;
  2637. #endif
  2638. }
  2639. //
  2640. // C++: void cv::convertPointsFromHomogeneous(Mat src, Mat& dst)
  2641. //
  2642. //javadoc: convertPointsFromHomogeneous(src, dst)
  2643. public static void convertPointsFromHomogeneous(Mat src, Mat dst) {
  2644. if (src != null)
  2645. src.ThrowIfDisposed();
  2646. if (dst != null)
  2647. dst.ThrowIfDisposed();
  2648. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2649. calib3d_Calib3d_convertPointsFromHomogeneous_10(src.nativeObj, dst.nativeObj);
  2650. return;
  2651. #else
  2652. return;
  2653. #endif
  2654. }
  2655. //
  2656. // C++: void cv::convertPointsToHomogeneous(Mat src, Mat& dst)
  2657. //
  2658. //javadoc: convertPointsToHomogeneous(src, dst)
  2659. public static void convertPointsToHomogeneous(Mat src, Mat dst) {
  2660. if (src != null)
  2661. src.ThrowIfDisposed();
  2662. if (dst != null)
  2663. dst.ThrowIfDisposed();
  2664. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2665. calib3d_Calib3d_convertPointsToHomogeneous_10(src.nativeObj, dst.nativeObj);
  2666. return;
  2667. #else
  2668. return;
  2669. #endif
  2670. }
  2671. //
  2672. // C++: void cv::correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
  2673. //
  2674. //javadoc: correctMatches(F, points1, points2, newPoints1, newPoints2)
  2675. public static void correctMatches(Mat F, Mat points1, Mat points2, Mat newPoints1, Mat newPoints2) {
  2676. if (F != null)
  2677. F.ThrowIfDisposed();
  2678. if (points1 != null)
  2679. points1.ThrowIfDisposed();
  2680. if (points2 != null)
  2681. points2.ThrowIfDisposed();
  2682. if (newPoints1 != null)
  2683. newPoints1.ThrowIfDisposed();
  2684. if (newPoints2 != null)
  2685. newPoints2.ThrowIfDisposed();
  2686. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2687. calib3d_Calib3d_correctMatches_10(F.nativeObj, points1.nativeObj, points2.nativeObj, newPoints1.nativeObj, newPoints2.nativeObj);
  2688. return;
  2689. #else
  2690. return;
  2691. #endif
  2692. }
  2693. //
  2694. // C++: void cv::decomposeEssentialMat(Mat E, Mat& R1, Mat& R2, Mat& t)
  2695. //
  2696. //javadoc: decomposeEssentialMat(E, R1, R2, t)
  2697. public static void decomposeEssentialMat(Mat E, Mat R1, Mat R2, Mat t) {
  2698. if (E != null)
  2699. E.ThrowIfDisposed();
  2700. if (R1 != null)
  2701. R1.ThrowIfDisposed();
  2702. if (R2 != null)
  2703. R2.ThrowIfDisposed();
  2704. if (t != null)
  2705. t.ThrowIfDisposed();
  2706. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2707. calib3d_Calib3d_decomposeEssentialMat_10(E.nativeObj, R1.nativeObj, R2.nativeObj, t.nativeObj);
  2708. return;
  2709. #else
  2710. return;
  2711. #endif
  2712. }
  2713. //
  2714. // C++: void cv::decomposeProjectionMatrix(Mat projMatrix, Mat& cameraMatrix, Mat& rotMatrix, Mat& transVect, Mat& rotMatrixX = Mat(), Mat& rotMatrixY = Mat(), Mat& rotMatrixZ = Mat(), Mat& eulerAngles = Mat())
  2715. //
  2716. //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY, rotMatrixZ, eulerAngles)
  2717. public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY, Mat rotMatrixZ, Mat eulerAngles) {
  2718. if (projMatrix != null)
  2719. projMatrix.ThrowIfDisposed();
  2720. if (cameraMatrix != null)
  2721. cameraMatrix.ThrowIfDisposed();
  2722. if (rotMatrix != null)
  2723. rotMatrix.ThrowIfDisposed();
  2724. if (transVect != null)
  2725. transVect.ThrowIfDisposed();
  2726. if (rotMatrixX != null)
  2727. rotMatrixX.ThrowIfDisposed();
  2728. if (rotMatrixY != null)
  2729. rotMatrixY.ThrowIfDisposed();
  2730. if (rotMatrixZ != null)
  2731. rotMatrixZ.ThrowIfDisposed();
  2732. if (eulerAngles != null)
  2733. eulerAngles.ThrowIfDisposed();
  2734. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2735. calib3d_Calib3d_decomposeProjectionMatrix_10(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj, rotMatrixZ.nativeObj, eulerAngles.nativeObj);
  2736. return;
  2737. #else
  2738. return;
  2739. #endif
  2740. }
  2741. //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY, rotMatrixZ)
  2742. public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY, Mat rotMatrixZ) {
  2743. if (projMatrix != null)
  2744. projMatrix.ThrowIfDisposed();
  2745. if (cameraMatrix != null)
  2746. cameraMatrix.ThrowIfDisposed();
  2747. if (rotMatrix != null)
  2748. rotMatrix.ThrowIfDisposed();
  2749. if (transVect != null)
  2750. transVect.ThrowIfDisposed();
  2751. if (rotMatrixX != null)
  2752. rotMatrixX.ThrowIfDisposed();
  2753. if (rotMatrixY != null)
  2754. rotMatrixY.ThrowIfDisposed();
  2755. if (rotMatrixZ != null)
  2756. rotMatrixZ.ThrowIfDisposed();
  2757. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2758. calib3d_Calib3d_decomposeProjectionMatrix_11(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj, rotMatrixZ.nativeObj);
  2759. return;
  2760. #else
  2761. return;
  2762. #endif
  2763. }
  2764. //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY)
  2765. public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY) {
  2766. if (projMatrix != null)
  2767. projMatrix.ThrowIfDisposed();
  2768. if (cameraMatrix != null)
  2769. cameraMatrix.ThrowIfDisposed();
  2770. if (rotMatrix != null)
  2771. rotMatrix.ThrowIfDisposed();
  2772. if (transVect != null)
  2773. transVect.ThrowIfDisposed();
  2774. if (rotMatrixX != null)
  2775. rotMatrixX.ThrowIfDisposed();
  2776. if (rotMatrixY != null)
  2777. rotMatrixY.ThrowIfDisposed();
  2778. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2779. calib3d_Calib3d_decomposeProjectionMatrix_12(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj);
  2780. return;
  2781. #else
  2782. return;
  2783. #endif
  2784. }
  2785. //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX)
  2786. public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX) {
  2787. if (projMatrix != null)
  2788. projMatrix.ThrowIfDisposed();
  2789. if (cameraMatrix != null)
  2790. cameraMatrix.ThrowIfDisposed();
  2791. if (rotMatrix != null)
  2792. rotMatrix.ThrowIfDisposed();
  2793. if (transVect != null)
  2794. transVect.ThrowIfDisposed();
  2795. if (rotMatrixX != null)
  2796. rotMatrixX.ThrowIfDisposed();
  2797. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2798. calib3d_Calib3d_decomposeProjectionMatrix_13(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj);
  2799. return;
  2800. #else
  2801. return;
  2802. #endif
  2803. }
  2804. //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect)
  2805. public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect) {
  2806. if (projMatrix != null)
  2807. projMatrix.ThrowIfDisposed();
  2808. if (cameraMatrix != null)
  2809. cameraMatrix.ThrowIfDisposed();
  2810. if (rotMatrix != null)
  2811. rotMatrix.ThrowIfDisposed();
  2812. if (transVect != null)
  2813. transVect.ThrowIfDisposed();
  2814. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2815. calib3d_Calib3d_decomposeProjectionMatrix_14(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj);
  2816. return;
  2817. #else
  2818. return;
  2819. #endif
  2820. }
  2821. //
  2822. // C++: void cv::drawChessboardCorners(Mat& image, Size patternSize, vector_Point2f corners, bool patternWasFound)
  2823. //
  2824. //javadoc: drawChessboardCorners(image, patternSize, corners, patternWasFound)
  2825. public static void drawChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, bool patternWasFound) {
  2826. if (image != null)
  2827. image.ThrowIfDisposed();
  2828. if (corners != null)
  2829. corners.ThrowIfDisposed();
  2830. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2831. Mat corners_mat = corners;
  2832. calib3d_Calib3d_drawChessboardCorners_10(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, patternWasFound);
  2833. return;
  2834. #else
  2835. return;
  2836. #endif
  2837. }
  2838. //
  2839. // C++: void cv::drawFrameAxes(Mat& image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness = 3)
  2840. //
  2841. //javadoc: drawFrameAxes(image, cameraMatrix, distCoeffs, rvec, tvec, length, thickness)
  2842. public static void drawFrameAxes(Mat image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness) {
  2843. if (image != null)
  2844. image.ThrowIfDisposed();
  2845. if (cameraMatrix != null)
  2846. cameraMatrix.ThrowIfDisposed();
  2847. if (distCoeffs != null)
  2848. distCoeffs.ThrowIfDisposed();
  2849. if (rvec != null)
  2850. rvec.ThrowIfDisposed();
  2851. if (tvec != null)
  2852. tvec.ThrowIfDisposed();
  2853. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2854. calib3d_Calib3d_drawFrameAxes_10(image.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvec.nativeObj, tvec.nativeObj, length, thickness);
  2855. return;
  2856. #else
  2857. return;
  2858. #endif
  2859. }
  2860. //javadoc: drawFrameAxes(image, cameraMatrix, distCoeffs, rvec, tvec, length)
  2861. public static void drawFrameAxes(Mat image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length) {
  2862. if (image != null)
  2863. image.ThrowIfDisposed();
  2864. if (cameraMatrix != null)
  2865. cameraMatrix.ThrowIfDisposed();
  2866. if (distCoeffs != null)
  2867. distCoeffs.ThrowIfDisposed();
  2868. if (rvec != null)
  2869. rvec.ThrowIfDisposed();
  2870. if (tvec != null)
  2871. tvec.ThrowIfDisposed();
  2872. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2873. calib3d_Calib3d_drawFrameAxes_11(image.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvec.nativeObj, tvec.nativeObj, length);
  2874. return;
  2875. #else
  2876. return;
  2877. #endif
  2878. }
  2879. //
  2880. // C++: void cv::filterHomographyDecompByVisibleRefpoints(vector_Mat rotations, vector_Mat normals, Mat beforePoints, Mat afterPoints, Mat& possibleSolutions, Mat pointsMask = Mat())
  2881. //
  2882. //javadoc: filterHomographyDecompByVisibleRefpoints(rotations, normals, beforePoints, afterPoints, possibleSolutions, pointsMask)
  2883. public static void filterHomographyDecompByVisibleRefpoints(List<Mat> rotations, List<Mat> normals, Mat beforePoints, Mat afterPoints, Mat possibleSolutions, Mat pointsMask) {
  2884. if (beforePoints != null)
  2885. beforePoints.ThrowIfDisposed();
  2886. if (afterPoints != null)
  2887. afterPoints.ThrowIfDisposed();
  2888. if (possibleSolutions != null)
  2889. possibleSolutions.ThrowIfDisposed();
  2890. if (pointsMask != null)
  2891. pointsMask.ThrowIfDisposed();
  2892. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2893. Mat rotations_mat = Converters.vector_Mat_to_Mat(rotations);
  2894. Mat normals_mat = Converters.vector_Mat_to_Mat(normals);
  2895. calib3d_Calib3d_filterHomographyDecompByVisibleRefpoints_10(rotations_mat.nativeObj, normals_mat.nativeObj, beforePoints.nativeObj, afterPoints.nativeObj, possibleSolutions.nativeObj, pointsMask.nativeObj);
  2896. return;
  2897. #else
  2898. return;
  2899. #endif
  2900. }
  2901. //javadoc: filterHomographyDecompByVisibleRefpoints(rotations, normals, beforePoints, afterPoints, possibleSolutions)
  2902. public static void filterHomographyDecompByVisibleRefpoints(List<Mat> rotations, List<Mat> normals, Mat beforePoints, Mat afterPoints, Mat possibleSolutions) {
  2903. if (beforePoints != null)
  2904. beforePoints.ThrowIfDisposed();
  2905. if (afterPoints != null)
  2906. afterPoints.ThrowIfDisposed();
  2907. if (possibleSolutions != null)
  2908. possibleSolutions.ThrowIfDisposed();
  2909. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2910. Mat rotations_mat = Converters.vector_Mat_to_Mat(rotations);
  2911. Mat normals_mat = Converters.vector_Mat_to_Mat(normals);
  2912. calib3d_Calib3d_filterHomographyDecompByVisibleRefpoints_11(rotations_mat.nativeObj, normals_mat.nativeObj, beforePoints.nativeObj, afterPoints.nativeObj, possibleSolutions.nativeObj);
  2913. return;
  2914. #else
  2915. return;
  2916. #endif
  2917. }
  2918. //
  2919. // C++: void cv::filterSpeckles(Mat& img, double newVal, int maxSpeckleSize, double maxDiff, Mat& buf = Mat())
  2920. //
  2921. //javadoc: filterSpeckles(img, newVal, maxSpeckleSize, maxDiff, buf)
  2922. public static void filterSpeckles(Mat img, double newVal, int maxSpeckleSize, double maxDiff, Mat buf) {
  2923. if (img != null)
  2924. img.ThrowIfDisposed();
  2925. if (buf != null)
  2926. buf.ThrowIfDisposed();
  2927. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2928. calib3d_Calib3d_filterSpeckles_10(img.nativeObj, newVal, maxSpeckleSize, maxDiff, buf.nativeObj);
  2929. return;
  2930. #else
  2931. return;
  2932. #endif
  2933. }
  2934. //javadoc: filterSpeckles(img, newVal, maxSpeckleSize, maxDiff)
  2935. public static void filterSpeckles(Mat img, double newVal, int maxSpeckleSize, double maxDiff) {
  2936. if (img != null)
  2937. img.ThrowIfDisposed();
  2938. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2939. calib3d_Calib3d_filterSpeckles_11(img.nativeObj, newVal, maxSpeckleSize, maxDiff);
  2940. return;
  2941. #else
  2942. return;
  2943. #endif
  2944. }
  2945. //
  2946. // C++: void cv::initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
  2947. //
  2948. //javadoc: initUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, size, m1type, map1, map2)
  2949. public static void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat map1, Mat map2) {
  2950. if (cameraMatrix != null)
  2951. cameraMatrix.ThrowIfDisposed();
  2952. if (distCoeffs != null)
  2953. distCoeffs.ThrowIfDisposed();
  2954. if (R != null)
  2955. R.ThrowIfDisposed();
  2956. if (newCameraMatrix != null)
  2957. newCameraMatrix.ThrowIfDisposed();
  2958. if (map1 != null)
  2959. map1.ThrowIfDisposed();
  2960. if (map2 != null)
  2961. map2.ThrowIfDisposed();
  2962. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2963. calib3d_Calib3d_initUndistortRectifyMap_10(cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, newCameraMatrix.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
  2964. return;
  2965. #else
  2966. return;
  2967. #endif
  2968. }
  2969. //
  2970. // C++: void cv::matMulDeriv(Mat A, Mat B, Mat& dABdA, Mat& dABdB)
  2971. //
  2972. //javadoc: matMulDeriv(A, B, dABdA, dABdB)
  2973. public static void matMulDeriv(Mat A, Mat B, Mat dABdA, Mat dABdB) {
  2974. if (A != null)
  2975. A.ThrowIfDisposed();
  2976. if (B != null)
  2977. B.ThrowIfDisposed();
  2978. if (dABdA != null)
  2979. dABdA.ThrowIfDisposed();
  2980. if (dABdB != null)
  2981. dABdB.ThrowIfDisposed();
  2982. #if (UNITY_ANDROID && !UNITY_EDITOR)
  2983. calib3d_Calib3d_matMulDeriv_10(A.nativeObj, B.nativeObj, dABdA.nativeObj, dABdB.nativeObj);
  2984. return;
  2985. #else
  2986. return;
  2987. #endif
  2988. }
  2989. //
  2990. // C++: void cv::projectPoints(vector_Point3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, vector_double distCoeffs, vector_Point2f& imagePoints, Mat& jacobian = Mat(), double aspectRatio = 0)
  2991. //
  2992. //javadoc: projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints, jacobian, aspectRatio)
  2993. public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio) {
  2994. if (objectPoints != null)
  2995. objectPoints.ThrowIfDisposed();
  2996. if (rvec != null)
  2997. rvec.ThrowIfDisposed();
  2998. if (tvec != null)
  2999. tvec.ThrowIfDisposed();
  3000. if (cameraMatrix != null)
  3001. cameraMatrix.ThrowIfDisposed();
  3002. if (distCoeffs != null)
  3003. distCoeffs.ThrowIfDisposed();
  3004. if (imagePoints != null)
  3005. imagePoints.ThrowIfDisposed();
  3006. if (jacobian != null)
  3007. jacobian.ThrowIfDisposed();
  3008. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3009. Mat objectPoints_mat = objectPoints;
  3010. Mat distCoeffs_mat = distCoeffs;
  3011. Mat imagePoints_mat = imagePoints;
  3012. calib3d_Calib3d_projectPoints_10(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
  3013. return;
  3014. #else
  3015. return;
  3016. #endif
  3017. }
  3018. //javadoc: projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints, jacobian)
  3019. public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian) {
  3020. if (objectPoints != null)
  3021. objectPoints.ThrowIfDisposed();
  3022. if (rvec != null)
  3023. rvec.ThrowIfDisposed();
  3024. if (tvec != null)
  3025. tvec.ThrowIfDisposed();
  3026. if (cameraMatrix != null)
  3027. cameraMatrix.ThrowIfDisposed();
  3028. if (distCoeffs != null)
  3029. distCoeffs.ThrowIfDisposed();
  3030. if (imagePoints != null)
  3031. imagePoints.ThrowIfDisposed();
  3032. if (jacobian != null)
  3033. jacobian.ThrowIfDisposed();
  3034. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3035. Mat objectPoints_mat = objectPoints;
  3036. Mat distCoeffs_mat = distCoeffs;
  3037. Mat imagePoints_mat = imagePoints;
  3038. calib3d_Calib3d_projectPoints_11(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj);
  3039. return;
  3040. #else
  3041. return;
  3042. #endif
  3043. }
  3044. //javadoc: projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints)
  3045. public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints) {
  3046. if (objectPoints != null)
  3047. objectPoints.ThrowIfDisposed();
  3048. if (rvec != null)
  3049. rvec.ThrowIfDisposed();
  3050. if (tvec != null)
  3051. tvec.ThrowIfDisposed();
  3052. if (cameraMatrix != null)
  3053. cameraMatrix.ThrowIfDisposed();
  3054. if (distCoeffs != null)
  3055. distCoeffs.ThrowIfDisposed();
  3056. if (imagePoints != null)
  3057. imagePoints.ThrowIfDisposed();
  3058. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3059. Mat objectPoints_mat = objectPoints;
  3060. Mat distCoeffs_mat = distCoeffs;
  3061. Mat imagePoints_mat = imagePoints;
  3062. calib3d_Calib3d_projectPoints_12(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
  3063. return;
  3064. #else
  3065. return;
  3066. #endif
  3067. }
  3068. //
  3069. // C++: void cv::reprojectImageTo3D(Mat disparity, Mat& _3dImage, Mat Q, bool handleMissingValues = false, int ddepth = -1)
  3070. //
  3071. //javadoc: reprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues, ddepth)
  3072. public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q, bool handleMissingValues, int ddepth) {
  3073. if (disparity != null)
  3074. disparity.ThrowIfDisposed();
  3075. if (_3dImage != null)
  3076. _3dImage.ThrowIfDisposed();
  3077. if (Q != null)
  3078. Q.ThrowIfDisposed();
  3079. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3080. calib3d_Calib3d_reprojectImageTo3D_10(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj, handleMissingValues, ddepth);
  3081. return;
  3082. #else
  3083. return;
  3084. #endif
  3085. }
  3086. //javadoc: reprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues)
  3087. public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q, bool handleMissingValues) {
  3088. if (disparity != null)
  3089. disparity.ThrowIfDisposed();
  3090. if (_3dImage != null)
  3091. _3dImage.ThrowIfDisposed();
  3092. if (Q != null)
  3093. Q.ThrowIfDisposed();
  3094. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3095. calib3d_Calib3d_reprojectImageTo3D_11(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj, handleMissingValues);
  3096. return;
  3097. #else
  3098. return;
  3099. #endif
  3100. }
  3101. //javadoc: reprojectImageTo3D(disparity, _3dImage, Q)
  3102. public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q) {
  3103. if (disparity != null)
  3104. disparity.ThrowIfDisposed();
  3105. if (_3dImage != null)
  3106. _3dImage.ThrowIfDisposed();
  3107. if (Q != null)
  3108. Q.ThrowIfDisposed();
  3109. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3110. calib3d_Calib3d_reprojectImageTo3D_12(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj);
  3111. return;
  3112. #else
  3113. return;
  3114. #endif
  3115. }
  3116. //
  3117. // C++: void cv::stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags = CALIB_ZERO_DISPARITY, double alpha = -1, Size newImageSize = Size(), Rect* validPixROI1 = 0, Rect* validPixROI2 = 0)
  3118. //
  3119. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha, newImageSize, validPixROI1, validPixROI2)
  3120. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, double alpha, Size newImageSize, Rect validPixROI1, Rect validPixROI2) {
  3121. if (cameraMatrix1 != null)
  3122. cameraMatrix1.ThrowIfDisposed();
  3123. if (distCoeffs1 != null)
  3124. distCoeffs1.ThrowIfDisposed();
  3125. if (cameraMatrix2 != null)
  3126. cameraMatrix2.ThrowIfDisposed();
  3127. if (distCoeffs2 != null)
  3128. distCoeffs2.ThrowIfDisposed();
  3129. if (R != null)
  3130. R.ThrowIfDisposed();
  3131. if (T != null)
  3132. T.ThrowIfDisposed();
  3133. if (R1 != null)
  3134. R1.ThrowIfDisposed();
  3135. if (R2 != null)
  3136. R2.ThrowIfDisposed();
  3137. if (P1 != null)
  3138. P1.ThrowIfDisposed();
  3139. if (P2 != null)
  3140. P2.ThrowIfDisposed();
  3141. if (Q != null)
  3142. Q.ThrowIfDisposed();
  3143. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3144. double[] validPixROI1_out = new double[4];
  3145. double[] validPixROI2_out = new double[4];
  3146. calib3d_Calib3d_stereoRectify_10(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha, newImageSize.width, newImageSize.height, validPixROI1_out, validPixROI2_out);
  3147. if (validPixROI1 != null) {
  3148. validPixROI1.x = (int)validPixROI1_out[0];
  3149. validPixROI1.y = (int)validPixROI1_out[1];
  3150. validPixROI1.width = (int)validPixROI1_out[2];
  3151. validPixROI1.height = (int)validPixROI1_out[3];
  3152. }
  3153. if (validPixROI2 != null) {
  3154. validPixROI2.x = (int)validPixROI2_out[0];
  3155. validPixROI2.y = (int)validPixROI2_out[1];
  3156. validPixROI2.width = (int)validPixROI2_out[2];
  3157. validPixROI2.height = (int)validPixROI2_out[3];
  3158. }
  3159. return;
  3160. #else
  3161. return;
  3162. #endif
  3163. }
  3164. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha, newImageSize, validPixROI1)
  3165. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, double alpha, Size newImageSize, Rect validPixROI1) {
  3166. if (cameraMatrix1 != null)
  3167. cameraMatrix1.ThrowIfDisposed();
  3168. if (distCoeffs1 != null)
  3169. distCoeffs1.ThrowIfDisposed();
  3170. if (cameraMatrix2 != null)
  3171. cameraMatrix2.ThrowIfDisposed();
  3172. if (distCoeffs2 != null)
  3173. distCoeffs2.ThrowIfDisposed();
  3174. if (R != null)
  3175. R.ThrowIfDisposed();
  3176. if (T != null)
  3177. T.ThrowIfDisposed();
  3178. if (R1 != null)
  3179. R1.ThrowIfDisposed();
  3180. if (R2 != null)
  3181. R2.ThrowIfDisposed();
  3182. if (P1 != null)
  3183. P1.ThrowIfDisposed();
  3184. if (P2 != null)
  3185. P2.ThrowIfDisposed();
  3186. if (Q != null)
  3187. Q.ThrowIfDisposed();
  3188. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3189. double[] validPixROI1_out = new double[4];
  3190. calib3d_Calib3d_stereoRectify_11(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha, newImageSize.width, newImageSize.height, validPixROI1_out);
  3191. if (validPixROI1 != null) {
  3192. validPixROI1.x = (int)validPixROI1_out[0];
  3193. validPixROI1.y = (int)validPixROI1_out[1];
  3194. validPixROI1.width = (int)validPixROI1_out[2];
  3195. validPixROI1.height = (int)validPixROI1_out[3];
  3196. }
  3197. return;
  3198. #else
  3199. return;
  3200. #endif
  3201. }
  3202. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha, newImageSize)
  3203. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, double alpha, Size newImageSize) {
  3204. if (cameraMatrix1 != null)
  3205. cameraMatrix1.ThrowIfDisposed();
  3206. if (distCoeffs1 != null)
  3207. distCoeffs1.ThrowIfDisposed();
  3208. if (cameraMatrix2 != null)
  3209. cameraMatrix2.ThrowIfDisposed();
  3210. if (distCoeffs2 != null)
  3211. distCoeffs2.ThrowIfDisposed();
  3212. if (R != null)
  3213. R.ThrowIfDisposed();
  3214. if (T != null)
  3215. T.ThrowIfDisposed();
  3216. if (R1 != null)
  3217. R1.ThrowIfDisposed();
  3218. if (R2 != null)
  3219. R2.ThrowIfDisposed();
  3220. if (P1 != null)
  3221. P1.ThrowIfDisposed();
  3222. if (P2 != null)
  3223. P2.ThrowIfDisposed();
  3224. if (Q != null)
  3225. Q.ThrowIfDisposed();
  3226. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3227. calib3d_Calib3d_stereoRectify_12(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha, newImageSize.width, newImageSize.height);
  3228. return;
  3229. #else
  3230. return;
  3231. #endif
  3232. }
  3233. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha)
  3234. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, double alpha) {
  3235. if (cameraMatrix1 != null)
  3236. cameraMatrix1.ThrowIfDisposed();
  3237. if (distCoeffs1 != null)
  3238. distCoeffs1.ThrowIfDisposed();
  3239. if (cameraMatrix2 != null)
  3240. cameraMatrix2.ThrowIfDisposed();
  3241. if (distCoeffs2 != null)
  3242. distCoeffs2.ThrowIfDisposed();
  3243. if (R != null)
  3244. R.ThrowIfDisposed();
  3245. if (T != null)
  3246. T.ThrowIfDisposed();
  3247. if (R1 != null)
  3248. R1.ThrowIfDisposed();
  3249. if (R2 != null)
  3250. R2.ThrowIfDisposed();
  3251. if (P1 != null)
  3252. P1.ThrowIfDisposed();
  3253. if (P2 != null)
  3254. P2.ThrowIfDisposed();
  3255. if (Q != null)
  3256. Q.ThrowIfDisposed();
  3257. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3258. calib3d_Calib3d_stereoRectify_13(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha);
  3259. return;
  3260. #else
  3261. return;
  3262. #endif
  3263. }
  3264. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags)
  3265. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags) {
  3266. if (cameraMatrix1 != null)
  3267. cameraMatrix1.ThrowIfDisposed();
  3268. if (distCoeffs1 != null)
  3269. distCoeffs1.ThrowIfDisposed();
  3270. if (cameraMatrix2 != null)
  3271. cameraMatrix2.ThrowIfDisposed();
  3272. if (distCoeffs2 != null)
  3273. distCoeffs2.ThrowIfDisposed();
  3274. if (R != null)
  3275. R.ThrowIfDisposed();
  3276. if (T != null)
  3277. T.ThrowIfDisposed();
  3278. if (R1 != null)
  3279. R1.ThrowIfDisposed();
  3280. if (R2 != null)
  3281. R2.ThrowIfDisposed();
  3282. if (P1 != null)
  3283. P1.ThrowIfDisposed();
  3284. if (P2 != null)
  3285. P2.ThrowIfDisposed();
  3286. if (Q != null)
  3287. Q.ThrowIfDisposed();
  3288. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3289. calib3d_Calib3d_stereoRectify_14(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags);
  3290. return;
  3291. #else
  3292. return;
  3293. #endif
  3294. }
  3295. //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q)
  3296. public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q) {
  3297. if (cameraMatrix1 != null)
  3298. cameraMatrix1.ThrowIfDisposed();
  3299. if (distCoeffs1 != null)
  3300. distCoeffs1.ThrowIfDisposed();
  3301. if (cameraMatrix2 != null)
  3302. cameraMatrix2.ThrowIfDisposed();
  3303. if (distCoeffs2 != null)
  3304. distCoeffs2.ThrowIfDisposed();
  3305. if (R != null)
  3306. R.ThrowIfDisposed();
  3307. if (T != null)
  3308. T.ThrowIfDisposed();
  3309. if (R1 != null)
  3310. R1.ThrowIfDisposed();
  3311. if (R2 != null)
  3312. R2.ThrowIfDisposed();
  3313. if (P1 != null)
  3314. P1.ThrowIfDisposed();
  3315. if (P2 != null)
  3316. P2.ThrowIfDisposed();
  3317. if (Q != null)
  3318. Q.ThrowIfDisposed();
  3319. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3320. calib3d_Calib3d_stereoRectify_15(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj);
  3321. return;
  3322. #else
  3323. return;
  3324. #endif
  3325. }
  3326. //
  3327. // C++: void cv::triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat& points4D)
  3328. //
  3329. //javadoc: triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2, points4D)
  3330. public static void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat points4D) {
  3331. if (projMatr1 != null)
  3332. projMatr1.ThrowIfDisposed();
  3333. if (projMatr2 != null)
  3334. projMatr2.ThrowIfDisposed();
  3335. if (projPoints1 != null)
  3336. projPoints1.ThrowIfDisposed();
  3337. if (projPoints2 != null)
  3338. projPoints2.ThrowIfDisposed();
  3339. if (points4D != null)
  3340. points4D.ThrowIfDisposed();
  3341. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3342. calib3d_Calib3d_triangulatePoints_10(projMatr1.nativeObj, projMatr2.nativeObj, projPoints1.nativeObj, projPoints2.nativeObj, points4D.nativeObj);
  3343. return;
  3344. #else
  3345. return;
  3346. #endif
  3347. }
  3348. //
  3349. // C++: void cv::undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
  3350. //
  3351. //javadoc: undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)
  3352. public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix) {
  3353. if (src != null)
  3354. src.ThrowIfDisposed();
  3355. if (dst != null)
  3356. dst.ThrowIfDisposed();
  3357. if (cameraMatrix != null)
  3358. cameraMatrix.ThrowIfDisposed();
  3359. if (distCoeffs != null)
  3360. distCoeffs.ThrowIfDisposed();
  3361. if (newCameraMatrix != null)
  3362. newCameraMatrix.ThrowIfDisposed();
  3363. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3364. calib3d_Calib3d_undistort_10(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, newCameraMatrix.nativeObj);
  3365. return;
  3366. #else
  3367. return;
  3368. #endif
  3369. }
  3370. //javadoc: undistort(src, dst, cameraMatrix, distCoeffs)
  3371. public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs) {
  3372. if (src != null)
  3373. src.ThrowIfDisposed();
  3374. if (dst != null)
  3375. dst.ThrowIfDisposed();
  3376. if (cameraMatrix != null)
  3377. cameraMatrix.ThrowIfDisposed();
  3378. if (distCoeffs != null)
  3379. distCoeffs.ThrowIfDisposed();
  3380. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3381. calib3d_Calib3d_undistort_11(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
  3382. return;
  3383. #else
  3384. return;
  3385. #endif
  3386. }
  3387. //
  3388. // C++: void cv::undistortPoints(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria)
  3389. //
  3390. //javadoc: undistortPointsIter(src, dst, cameraMatrix, distCoeffs, R, P, criteria)
  3391. public static void undistortPointsIter(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria) {
  3392. if (src != null)
  3393. src.ThrowIfDisposed();
  3394. if (dst != null)
  3395. dst.ThrowIfDisposed();
  3396. if (cameraMatrix != null)
  3397. cameraMatrix.ThrowIfDisposed();
  3398. if (distCoeffs != null)
  3399. distCoeffs.ThrowIfDisposed();
  3400. if (R != null)
  3401. R.ThrowIfDisposed();
  3402. if (P != null)
  3403. P.ThrowIfDisposed();
  3404. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3405. calib3d_Calib3d_undistortPointsIter_10(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj, criteria.type, criteria.maxCount, criteria.epsilon);
  3406. return;
  3407. #else
  3408. return;
  3409. #endif
  3410. }
  3411. //
  3412. // C++: void cv::undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
  3413. //
  3414. //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs, R, P)
  3415. public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P) {
  3416. if (src != null)
  3417. src.ThrowIfDisposed();
  3418. if (dst != null)
  3419. dst.ThrowIfDisposed();
  3420. if (cameraMatrix != null)
  3421. cameraMatrix.ThrowIfDisposed();
  3422. if (distCoeffs != null)
  3423. distCoeffs.ThrowIfDisposed();
  3424. if (R != null)
  3425. R.ThrowIfDisposed();
  3426. if (P != null)
  3427. P.ThrowIfDisposed();
  3428. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3429. Mat src_mat = src;
  3430. Mat dst_mat = dst;
  3431. calib3d_Calib3d_undistortPoints_10(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj);
  3432. return;
  3433. #else
  3434. return;
  3435. #endif
  3436. }
  3437. //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs, R)
  3438. public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R) {
  3439. if (src != null)
  3440. src.ThrowIfDisposed();
  3441. if (dst != null)
  3442. dst.ThrowIfDisposed();
  3443. if (cameraMatrix != null)
  3444. cameraMatrix.ThrowIfDisposed();
  3445. if (distCoeffs != null)
  3446. distCoeffs.ThrowIfDisposed();
  3447. if (R != null)
  3448. R.ThrowIfDisposed();
  3449. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3450. Mat src_mat = src;
  3451. Mat dst_mat = dst;
  3452. calib3d_Calib3d_undistortPoints_11(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj);
  3453. return;
  3454. #else
  3455. return;
  3456. #endif
  3457. }
  3458. //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs)
  3459. public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs) {
  3460. if (src != null)
  3461. src.ThrowIfDisposed();
  3462. if (dst != null)
  3463. dst.ThrowIfDisposed();
  3464. if (cameraMatrix != null)
  3465. cameraMatrix.ThrowIfDisposed();
  3466. if (distCoeffs != null)
  3467. distCoeffs.ThrowIfDisposed();
  3468. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3469. Mat src_mat = src;
  3470. Mat dst_mat = dst;
  3471. calib3d_Calib3d_undistortPoints_12(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
  3472. return;
  3473. #else
  3474. return;
  3475. #endif
  3476. }
  3477. //
  3478. // C++: void cv::validateDisparity(Mat& disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp = 1)
  3479. //
  3480. //javadoc: validateDisparity(disparity, cost, minDisparity, numberOfDisparities, disp12MaxDisp)
  3481. public static void validateDisparity(Mat disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp) {
  3482. if (disparity != null)
  3483. disparity.ThrowIfDisposed();
  3484. if (cost != null)
  3485. cost.ThrowIfDisposed();
  3486. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3487. calib3d_Calib3d_validateDisparity_10(disparity.nativeObj, cost.nativeObj, minDisparity, numberOfDisparities, disp12MaxDisp);
  3488. return;
  3489. #else
  3490. return;
  3491. #endif
  3492. }
  3493. //javadoc: validateDisparity(disparity, cost, minDisparity, numberOfDisparities)
  3494. public static void validateDisparity(Mat disparity, Mat cost, int minDisparity, int numberOfDisparities) {
  3495. if (disparity != null)
  3496. disparity.ThrowIfDisposed();
  3497. if (cost != null)
  3498. cost.ThrowIfDisposed();
  3499. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3500. calib3d_Calib3d_validateDisparity_11(disparity.nativeObj, cost.nativeObj, minDisparity, numberOfDisparities);
  3501. return;
  3502. #else
  3503. return;
  3504. #endif
  3505. }
  3506. //
  3507. // C++: void cv::fisheye::distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
  3508. //
  3509. //javadoc: fisheye_distortPoints(undistorted, distorted, K, D, alpha)
  3510. public static void fisheye_distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D, double alpha) {
  3511. if (undistorted != null)
  3512. undistorted.ThrowIfDisposed();
  3513. if (distorted != null)
  3514. distorted.ThrowIfDisposed();
  3515. if (K != null)
  3516. K.ThrowIfDisposed();
  3517. if (D != null)
  3518. D.ThrowIfDisposed();
  3519. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3520. calib3d_Calib3d_fisheye_1distortPoints_10(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj, alpha);
  3521. return;
  3522. #else
  3523. return;
  3524. #endif
  3525. }
  3526. //javadoc: fisheye_distortPoints(undistorted, distorted, K, D)
  3527. public static void fisheye_distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D) {
  3528. if (undistorted != null)
  3529. undistorted.ThrowIfDisposed();
  3530. if (distorted != null)
  3531. distorted.ThrowIfDisposed();
  3532. if (K != null)
  3533. K.ThrowIfDisposed();
  3534. if (D != null)
  3535. D.ThrowIfDisposed();
  3536. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3537. calib3d_Calib3d_fisheye_1distortPoints_11(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj);
  3538. return;
  3539. #else
  3540. return;
  3541. #endif
  3542. }
  3543. //
  3544. // C++: void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat& P, double balance = 0.0, Size new_size = Size(), double fov_scale = 1.0)
  3545. //
  3546. //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance, new_size, fov_scale)
  3547. public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance, Size new_size, double fov_scale) {
  3548. if (K != null)
  3549. K.ThrowIfDisposed();
  3550. if (D != null)
  3551. D.ThrowIfDisposed();
  3552. if (R != null)
  3553. R.ThrowIfDisposed();
  3554. if (P != null)
  3555. P.ThrowIfDisposed();
  3556. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3557. calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_10(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance, new_size.width, new_size.height, fov_scale);
  3558. return;
  3559. #else
  3560. return;
  3561. #endif
  3562. }
  3563. //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance, new_size)
  3564. public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance, Size new_size) {
  3565. if (K != null)
  3566. K.ThrowIfDisposed();
  3567. if (D != null)
  3568. D.ThrowIfDisposed();
  3569. if (R != null)
  3570. R.ThrowIfDisposed();
  3571. if (P != null)
  3572. P.ThrowIfDisposed();
  3573. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3574. calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_11(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance, new_size.width, new_size.height);
  3575. return;
  3576. #else
  3577. return;
  3578. #endif
  3579. }
  3580. //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance)
  3581. public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance) {
  3582. if (K != null)
  3583. K.ThrowIfDisposed();
  3584. if (D != null)
  3585. D.ThrowIfDisposed();
  3586. if (R != null)
  3587. R.ThrowIfDisposed();
  3588. if (P != null)
  3589. P.ThrowIfDisposed();
  3590. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3591. calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_12(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance);
  3592. return;
  3593. #else
  3594. return;
  3595. #endif
  3596. }
  3597. //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P)
  3598. public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P) {
  3599. if (K != null)
  3600. K.ThrowIfDisposed();
  3601. if (D != null)
  3602. D.ThrowIfDisposed();
  3603. if (R != null)
  3604. R.ThrowIfDisposed();
  3605. if (P != null)
  3606. P.ThrowIfDisposed();
  3607. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3608. calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_13(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj);
  3609. return;
  3610. #else
  3611. return;
  3612. #endif
  3613. }
  3614. //
  3615. // C++: void cv::fisheye::initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
  3616. //
  3617. //javadoc: fisheye_initUndistortRectifyMap(K, D, R, P, size, m1type, map1, map2)
  3618. public static void fisheye_initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat map1, Mat map2) {
  3619. if (K != null)
  3620. K.ThrowIfDisposed();
  3621. if (D != null)
  3622. D.ThrowIfDisposed();
  3623. if (R != null)
  3624. R.ThrowIfDisposed();
  3625. if (P != null)
  3626. P.ThrowIfDisposed();
  3627. if (map1 != null)
  3628. map1.ThrowIfDisposed();
  3629. if (map2 != null)
  3630. map2.ThrowIfDisposed();
  3631. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3632. calib3d_Calib3d_fisheye_1initUndistortRectifyMap_10(K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
  3633. return;
  3634. #else
  3635. return;
  3636. #endif
  3637. }
  3638. //
  3639. // C++: void cv::fisheye::projectPoints(Mat objectPoints, Mat& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
  3640. //
  3641. //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D, alpha, jacobian)
  3642. public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian) {
  3643. if (objectPoints != null)
  3644. objectPoints.ThrowIfDisposed();
  3645. if (imagePoints != null)
  3646. imagePoints.ThrowIfDisposed();
  3647. if (rvec != null)
  3648. rvec.ThrowIfDisposed();
  3649. if (tvec != null)
  3650. tvec.ThrowIfDisposed();
  3651. if (K != null)
  3652. K.ThrowIfDisposed();
  3653. if (D != null)
  3654. D.ThrowIfDisposed();
  3655. if (jacobian != null)
  3656. jacobian.ThrowIfDisposed();
  3657. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3658. calib3d_Calib3d_fisheye_1projectPoints_10(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
  3659. return;
  3660. #else
  3661. return;
  3662. #endif
  3663. }
  3664. //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D, alpha)
  3665. public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha) {
  3666. if (objectPoints != null)
  3667. objectPoints.ThrowIfDisposed();
  3668. if (imagePoints != null)
  3669. imagePoints.ThrowIfDisposed();
  3670. if (rvec != null)
  3671. rvec.ThrowIfDisposed();
  3672. if (tvec != null)
  3673. tvec.ThrowIfDisposed();
  3674. if (K != null)
  3675. K.ThrowIfDisposed();
  3676. if (D != null)
  3677. D.ThrowIfDisposed();
  3678. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3679. calib3d_Calib3d_fisheye_1projectPoints_11(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha);
  3680. return;
  3681. #else
  3682. return;
  3683. #endif
  3684. }
  3685. //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D)
  3686. public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D) {
  3687. if (objectPoints != null)
  3688. objectPoints.ThrowIfDisposed();
  3689. if (imagePoints != null)
  3690. imagePoints.ThrowIfDisposed();
  3691. if (rvec != null)
  3692. rvec.ThrowIfDisposed();
  3693. if (tvec != null)
  3694. tvec.ThrowIfDisposed();
  3695. if (K != null)
  3696. K.ThrowIfDisposed();
  3697. if (D != null)
  3698. D.ThrowIfDisposed();
  3699. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3700. calib3d_Calib3d_fisheye_1projectPoints_12(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj);
  3701. return;
  3702. #else
  3703. return;
  3704. #endif
  3705. }
  3706. //
  3707. // C++: void cv::fisheye::stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags, Size newImageSize = Size(), double balance = 0.0, double fov_scale = 1.0)
  3708. //
  3709. //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize, balance, fov_scale)
  3710. public static void fisheye_stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, Size newImageSize, double balance, double fov_scale) {
  3711. if (K1 != null)
  3712. K1.ThrowIfDisposed();
  3713. if (D1 != null)
  3714. D1.ThrowIfDisposed();
  3715. if (K2 != null)
  3716. K2.ThrowIfDisposed();
  3717. if (D2 != null)
  3718. D2.ThrowIfDisposed();
  3719. if (R != null)
  3720. R.ThrowIfDisposed();
  3721. if (tvec != null)
  3722. tvec.ThrowIfDisposed();
  3723. if (R1 != null)
  3724. R1.ThrowIfDisposed();
  3725. if (R2 != null)
  3726. R2.ThrowIfDisposed();
  3727. if (P1 != null)
  3728. P1.ThrowIfDisposed();
  3729. if (P2 != null)
  3730. P2.ThrowIfDisposed();
  3731. if (Q != null)
  3732. Q.ThrowIfDisposed();
  3733. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3734. calib3d_Calib3d_fisheye_1stereoRectify_10(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height, balance, fov_scale);
  3735. return;
  3736. #else
  3737. return;
  3738. #endif
  3739. }
  3740. //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize, balance)
  3741. public static void fisheye_stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, Size newImageSize, double balance) {
  3742. if (K1 != null)
  3743. K1.ThrowIfDisposed();
  3744. if (D1 != null)
  3745. D1.ThrowIfDisposed();
  3746. if (K2 != null)
  3747. K2.ThrowIfDisposed();
  3748. if (D2 != null)
  3749. D2.ThrowIfDisposed();
  3750. if (R != null)
  3751. R.ThrowIfDisposed();
  3752. if (tvec != null)
  3753. tvec.ThrowIfDisposed();
  3754. if (R1 != null)
  3755. R1.ThrowIfDisposed();
  3756. if (R2 != null)
  3757. R2.ThrowIfDisposed();
  3758. if (P1 != null)
  3759. P1.ThrowIfDisposed();
  3760. if (P2 != null)
  3761. P2.ThrowIfDisposed();
  3762. if (Q != null)
  3763. Q.ThrowIfDisposed();
  3764. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3765. calib3d_Calib3d_fisheye_1stereoRectify_11(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height, balance);
  3766. return;
  3767. #else
  3768. return;
  3769. #endif
  3770. }
  3771. //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize)
  3772. public static void fisheye_stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, Size newImageSize) {
  3773. if (K1 != null)
  3774. K1.ThrowIfDisposed();
  3775. if (D1 != null)
  3776. D1.ThrowIfDisposed();
  3777. if (K2 != null)
  3778. K2.ThrowIfDisposed();
  3779. if (D2 != null)
  3780. D2.ThrowIfDisposed();
  3781. if (R != null)
  3782. R.ThrowIfDisposed();
  3783. if (tvec != null)
  3784. tvec.ThrowIfDisposed();
  3785. if (R1 != null)
  3786. R1.ThrowIfDisposed();
  3787. if (R2 != null)
  3788. R2.ThrowIfDisposed();
  3789. if (P1 != null)
  3790. P1.ThrowIfDisposed();
  3791. if (P2 != null)
  3792. P2.ThrowIfDisposed();
  3793. if (Q != null)
  3794. Q.ThrowIfDisposed();
  3795. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3796. calib3d_Calib3d_fisheye_1stereoRectify_12(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height);
  3797. return;
  3798. #else
  3799. return;
  3800. #endif
  3801. }
  3802. //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags)
  3803. public static void fisheye_stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags) {
  3804. if (K1 != null)
  3805. K1.ThrowIfDisposed();
  3806. if (D1 != null)
  3807. D1.ThrowIfDisposed();
  3808. if (K2 != null)
  3809. K2.ThrowIfDisposed();
  3810. if (D2 != null)
  3811. D2.ThrowIfDisposed();
  3812. if (R != null)
  3813. R.ThrowIfDisposed();
  3814. if (tvec != null)
  3815. tvec.ThrowIfDisposed();
  3816. if (R1 != null)
  3817. R1.ThrowIfDisposed();
  3818. if (R2 != null)
  3819. R2.ThrowIfDisposed();
  3820. if (P1 != null)
  3821. P1.ThrowIfDisposed();
  3822. if (P2 != null)
  3823. P2.ThrowIfDisposed();
  3824. if (Q != null)
  3825. Q.ThrowIfDisposed();
  3826. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3827. calib3d_Calib3d_fisheye_1stereoRectify_13(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags);
  3828. return;
  3829. #else
  3830. return;
  3831. #endif
  3832. }
  3833. //
  3834. // C++: void cv::fisheye::undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
  3835. //
  3836. //javadoc: fisheye_undistortImage(distorted, undistorted, K, D, Knew, new_size)
  3837. public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D, Mat Knew, Size new_size) {
  3838. if (distorted != null)
  3839. distorted.ThrowIfDisposed();
  3840. if (undistorted != null)
  3841. undistorted.ThrowIfDisposed();
  3842. if (K != null)
  3843. K.ThrowIfDisposed();
  3844. if (D != null)
  3845. D.ThrowIfDisposed();
  3846. if (Knew != null)
  3847. Knew.ThrowIfDisposed();
  3848. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3849. calib3d_Calib3d_fisheye_1undistortImage_10(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, Knew.nativeObj, new_size.width, new_size.height);
  3850. return;
  3851. #else
  3852. return;
  3853. #endif
  3854. }
  3855. //javadoc: fisheye_undistortImage(distorted, undistorted, K, D, Knew)
  3856. public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D, Mat Knew) {
  3857. if (distorted != null)
  3858. distorted.ThrowIfDisposed();
  3859. if (undistorted != null)
  3860. undistorted.ThrowIfDisposed();
  3861. if (K != null)
  3862. K.ThrowIfDisposed();
  3863. if (D != null)
  3864. D.ThrowIfDisposed();
  3865. if (Knew != null)
  3866. Knew.ThrowIfDisposed();
  3867. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3868. calib3d_Calib3d_fisheye_1undistortImage_11(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, Knew.nativeObj);
  3869. return;
  3870. #else
  3871. return;
  3872. #endif
  3873. }
  3874. //javadoc: fisheye_undistortImage(distorted, undistorted, K, D)
  3875. public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D) {
  3876. if (distorted != null)
  3877. distorted.ThrowIfDisposed();
  3878. if (undistorted != null)
  3879. undistorted.ThrowIfDisposed();
  3880. if (K != null)
  3881. K.ThrowIfDisposed();
  3882. if (D != null)
  3883. D.ThrowIfDisposed();
  3884. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3885. calib3d_Calib3d_fisheye_1undistortImage_12(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
  3886. return;
  3887. #else
  3888. return;
  3889. #endif
  3890. }
  3891. //
  3892. // C++: void cv::fisheye::undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
  3893. //
  3894. //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D, R, P)
  3895. public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D, Mat R, Mat P) {
  3896. if (distorted != null)
  3897. distorted.ThrowIfDisposed();
  3898. if (undistorted != null)
  3899. undistorted.ThrowIfDisposed();
  3900. if (K != null)
  3901. K.ThrowIfDisposed();
  3902. if (D != null)
  3903. D.ThrowIfDisposed();
  3904. if (R != null)
  3905. R.ThrowIfDisposed();
  3906. if (P != null)
  3907. P.ThrowIfDisposed();
  3908. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3909. calib3d_Calib3d_fisheye_1undistortPoints_10(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj);
  3910. return;
  3911. #else
  3912. return;
  3913. #endif
  3914. }
  3915. //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D, R)
  3916. public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D, Mat R) {
  3917. if (distorted != null)
  3918. distorted.ThrowIfDisposed();
  3919. if (undistorted != null)
  3920. undistorted.ThrowIfDisposed();
  3921. if (K != null)
  3922. K.ThrowIfDisposed();
  3923. if (D != null)
  3924. D.ThrowIfDisposed();
  3925. if (R != null)
  3926. R.ThrowIfDisposed();
  3927. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3928. calib3d_Calib3d_fisheye_1undistortPoints_11(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, R.nativeObj);
  3929. return;
  3930. #else
  3931. return;
  3932. #endif
  3933. }
  3934. //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D)
  3935. public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D) {
  3936. if (distorted != null)
  3937. distorted.ThrowIfDisposed();
  3938. if (undistorted != null)
  3939. undistorted.ThrowIfDisposed();
  3940. if (K != null)
  3941. K.ThrowIfDisposed();
  3942. if (D != null)
  3943. D.ThrowIfDisposed();
  3944. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3945. calib3d_Calib3d_fisheye_1undistortPoints_12(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
  3946. return;
  3947. #else
  3948. return;
  3949. #endif
  3950. }
  3951. #if (UNITY_ANDROID && !UNITY_EDITOR)
  3952. const string LIBNAME = "opencvforunity";
  3953. // C++: Mat cv::estimateAffine2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
  3954. [DllImport(LIBNAME)]
  3955. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_10(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters);
  3956. [DllImport(LIBNAME)]
  3957. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_11(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence);
  3958. [DllImport(LIBNAME)]
  3959. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_12(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters);
  3960. [DllImport(LIBNAME)]
  3961. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_13(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold);
  3962. [DllImport(LIBNAME)]
  3963. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_14(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method);
  3964. [DllImport(LIBNAME)]
  3965. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_15(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj);
  3966. [DllImport(LIBNAME)]
  3967. private static extern IntPtr calib3d_Calib3d_estimateAffine2D_16(IntPtr from_nativeObj, IntPtr to_nativeObj);
  3968. // C++: Mat cv::estimateAffinePartial2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
  3969. [DllImport(LIBNAME)]
  3970. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_10(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters);
  3971. [DllImport(LIBNAME)]
  3972. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_11(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence);
  3973. [DllImport(LIBNAME)]
  3974. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_12(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters);
  3975. [DllImport(LIBNAME)]
  3976. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_13(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method, double ransacReprojThreshold);
  3977. [DllImport(LIBNAME)]
  3978. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_14(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj, int method);
  3979. [DllImport(LIBNAME)]
  3980. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_15(IntPtr from_nativeObj, IntPtr to_nativeObj, IntPtr inliers_nativeObj);
  3981. [DllImport(LIBNAME)]
  3982. private static extern IntPtr calib3d_Calib3d_estimateAffinePartial2D_16(IntPtr from_nativeObj, IntPtr to_nativeObj);
  3983. // C++: Mat cv::findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
  3984. [DllImport(LIBNAME)]
  3985. private static extern IntPtr calib3d_Calib3d_findEssentialMat_10(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, int method, double prob, double threshold, IntPtr mask_nativeObj);
  3986. [DllImport(LIBNAME)]
  3987. private static extern IntPtr calib3d_Calib3d_findEssentialMat_11(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, int method, double prob, double threshold);
  3988. [DllImport(LIBNAME)]
  3989. private static extern IntPtr calib3d_Calib3d_findEssentialMat_12(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, int method, double prob);
  3990. [DllImport(LIBNAME)]
  3991. private static extern IntPtr calib3d_Calib3d_findEssentialMat_13(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, int method);
  3992. [DllImport(LIBNAME)]
  3993. private static extern IntPtr calib3d_Calib3d_findEssentialMat_14(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj);
  3994. // C++: Mat cv::findEssentialMat(Mat points1, Mat points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
  3995. [DllImport(LIBNAME)]
  3996. private static extern IntPtr calib3d_Calib3d_findEssentialMat_15(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob, double threshold, IntPtr mask_nativeObj);
  3997. [DllImport(LIBNAME)]
  3998. private static extern IntPtr calib3d_Calib3d_findEssentialMat_16(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob, double threshold);
  3999. [DllImport(LIBNAME)]
  4000. private static extern IntPtr calib3d_Calib3d_findEssentialMat_17(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob);
  4001. [DllImport(LIBNAME)]
  4002. private static extern IntPtr calib3d_Calib3d_findEssentialMat_18(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal, double pp_x, double pp_y, int method);
  4003. [DllImport(LIBNAME)]
  4004. private static extern IntPtr calib3d_Calib3d_findEssentialMat_19(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal, double pp_x, double pp_y);
  4005. [DllImport(LIBNAME)]
  4006. private static extern IntPtr calib3d_Calib3d_findEssentialMat_110(IntPtr points1_nativeObj, IntPtr points2_nativeObj, double focal);
  4007. [DllImport(LIBNAME)]
  4008. private static extern IntPtr calib3d_Calib3d_findEssentialMat_111(IntPtr points1_nativeObj, IntPtr points2_nativeObj);
  4009. // C++: Mat cv::findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double ransacReprojThreshold = 3., double confidence = 0.99, Mat& mask = Mat())
  4010. [DllImport(LIBNAME)]
  4011. private static extern IntPtr calib3d_Calib3d_findFundamentalMat_10(IntPtr points1_mat_nativeObj, IntPtr points2_mat_nativeObj, int method, double ransacReprojThreshold, double confidence, IntPtr mask_nativeObj);
  4012. [DllImport(LIBNAME)]
  4013. private static extern IntPtr calib3d_Calib3d_findFundamentalMat_11(IntPtr points1_mat_nativeObj, IntPtr points2_mat_nativeObj, int method, double ransacReprojThreshold, double confidence);
  4014. [DllImport(LIBNAME)]
  4015. private static extern IntPtr calib3d_Calib3d_findFundamentalMat_12(IntPtr points1_mat_nativeObj, IntPtr points2_mat_nativeObj, int method, double ransacReprojThreshold);
  4016. [DllImport(LIBNAME)]
  4017. private static extern IntPtr calib3d_Calib3d_findFundamentalMat_13(IntPtr points1_mat_nativeObj, IntPtr points2_mat_nativeObj, int method);
  4018. [DllImport(LIBNAME)]
  4019. private static extern IntPtr calib3d_Calib3d_findFundamentalMat_14(IntPtr points1_mat_nativeObj, IntPtr points2_mat_nativeObj);
  4020. // C++: Mat cv::findHomography(vector_Point2f srcPoints, vector_Point2f dstPoints, int method = 0, double ransacReprojThreshold = 3, Mat& mask = Mat(), int maxIters = 2000, double confidence = 0.995)
  4021. [DllImport(LIBNAME)]
  4022. private static extern IntPtr calib3d_Calib3d_findHomography_10(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj, int method, double ransacReprojThreshold, IntPtr mask_nativeObj, int maxIters, double confidence);
  4023. [DllImport(LIBNAME)]
  4024. private static extern IntPtr calib3d_Calib3d_findHomography_11(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj, int method, double ransacReprojThreshold, IntPtr mask_nativeObj, int maxIters);
  4025. [DllImport(LIBNAME)]
  4026. private static extern IntPtr calib3d_Calib3d_findHomography_12(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj, int method, double ransacReprojThreshold, IntPtr mask_nativeObj);
  4027. [DllImport(LIBNAME)]
  4028. private static extern IntPtr calib3d_Calib3d_findHomography_13(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj, int method, double ransacReprojThreshold);
  4029. [DllImport(LIBNAME)]
  4030. private static extern IntPtr calib3d_Calib3d_findHomography_14(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj, int method);
  4031. [DllImport(LIBNAME)]
  4032. private static extern IntPtr calib3d_Calib3d_findHomography_15(IntPtr srcPoints_mat_nativeObj, IntPtr dstPoints_mat_nativeObj);
  4033. // C++: Mat cv::getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
  4034. [DllImport(LIBNAME)]
  4035. private static extern IntPtr calib3d_Calib3d_getDefaultNewCameraMatrix_10(IntPtr cameraMatrix_nativeObj, double imgsize_width, double imgsize_height, bool centerPrincipalPoint);
  4036. [DllImport(LIBNAME)]
  4037. private static extern IntPtr calib3d_Calib3d_getDefaultNewCameraMatrix_11(IntPtr cameraMatrix_nativeObj, double imgsize_width, double imgsize_height);
  4038. [DllImport(LIBNAME)]
  4039. private static extern IntPtr calib3d_Calib3d_getDefaultNewCameraMatrix_12(IntPtr cameraMatrix_nativeObj);
  4040. // C++: Mat cv::getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize = Size(), Rect* validPixROI = 0, bool centerPrincipalPoint = false)
  4041. [DllImport(LIBNAME)]
  4042. private static extern IntPtr calib3d_Calib3d_getOptimalNewCameraMatrix_10(IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha, double newImgSize_width, double newImgSize_height, double[] validPixROI_out, bool centerPrincipalPoint);
  4043. [DllImport(LIBNAME)]
  4044. private static extern IntPtr calib3d_Calib3d_getOptimalNewCameraMatrix_11(IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha, double newImgSize_width, double newImgSize_height, double[] validPixROI_out);
  4045. [DllImport(LIBNAME)]
  4046. private static extern IntPtr calib3d_Calib3d_getOptimalNewCameraMatrix_12(IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha, double newImgSize_width, double newImgSize_height);
  4047. [DllImport(LIBNAME)]
  4048. private static extern IntPtr calib3d_Calib3d_getOptimalNewCameraMatrix_13(IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha);
  4049. // C++: Mat cv::initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
  4050. [DllImport(LIBNAME)]
  4051. private static extern IntPtr calib3d_Calib3d_initCameraMatrix2D_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, double aspectRatio);
  4052. [DllImport(LIBNAME)]
  4053. private static extern IntPtr calib3d_Calib3d_initCameraMatrix2D_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height);
  4054. // C++: Rect cv::getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
  4055. [DllImport(LIBNAME)]
  4056. private static extern void calib3d_Calib3d_getValidDisparityROI_10(int roi1_x, int roi1_y, int roi1_width, int roi1_height, int roi2_x, int roi2_y, int roi2_width, int roi2_height, int minDisparity, int numberOfDisparities, int SADWindowSize, double[] retVal);
  4057. // C++: Vec3d cv::RQDecomp3x3(Mat src, Mat& mtxR, Mat& mtxQ, Mat& Qx = Mat(), Mat& Qy = Mat(), Mat& Qz = Mat())
  4058. [DllImport(LIBNAME)]
  4059. private static extern void calib3d_Calib3d_RQDecomp3x3_10(IntPtr src_nativeObj, IntPtr mtxR_nativeObj, IntPtr mtxQ_nativeObj, IntPtr Qx_nativeObj, IntPtr Qy_nativeObj, IntPtr Qz_nativeObj, double[] retVal);
  4060. [DllImport(LIBNAME)]
  4061. private static extern void calib3d_Calib3d_RQDecomp3x3_11(IntPtr src_nativeObj, IntPtr mtxR_nativeObj, IntPtr mtxQ_nativeObj, IntPtr Qx_nativeObj, IntPtr Qy_nativeObj, double[] retVal);
  4062. [DllImport(LIBNAME)]
  4063. private static extern void calib3d_Calib3d_RQDecomp3x3_12(IntPtr src_nativeObj, IntPtr mtxR_nativeObj, IntPtr mtxQ_nativeObj, IntPtr Qx_nativeObj, double[] retVal);
  4064. [DllImport(LIBNAME)]
  4065. private static extern void calib3d_Calib3d_RQDecomp3x3_13(IntPtr src_nativeObj, IntPtr mtxR_nativeObj, IntPtr mtxQ_nativeObj, double[] retVal);
  4066. // C++: bool cv::checkChessboard(Mat img, Size size)
  4067. [DllImport(LIBNAME)]
  4068. private static extern bool calib3d_Calib3d_checkChessboard_10(IntPtr img_nativeObj, double size_width, double size_height);
  4069. // C++: bool cv::findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
  4070. [DllImport(LIBNAME)]
  4071. private static extern bool calib3d_Calib3d_findChessboardCorners_10(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr corners_mat_nativeObj, int flags);
  4072. [DllImport(LIBNAME)]
  4073. private static extern bool calib3d_Calib3d_findChessboardCorners_11(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr corners_mat_nativeObj);
  4074. // C++: bool cv::findChessboardCornersSB(Mat image, Size patternSize, Mat& corners, int flags = 0)
  4075. [DllImport(LIBNAME)]
  4076. private static extern bool calib3d_Calib3d_findChessboardCornersSB_10(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr corners_nativeObj, int flags);
  4077. [DllImport(LIBNAME)]
  4078. private static extern bool calib3d_Calib3d_findChessboardCornersSB_11(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr corners_nativeObj);
  4079. // C++: bool cv::findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags = CALIB_CB_SYMMETRIC_GRID, Ptr_FeatureDetector blobDetector = SimpleBlobDetector::create())
  4080. [DllImport(LIBNAME)]
  4081. private static extern bool calib3d_Calib3d_findCirclesGrid_10(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr centers_nativeObj, int flags);
  4082. [DllImport(LIBNAME)]
  4083. private static extern bool calib3d_Calib3d_findCirclesGrid_12(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr centers_nativeObj);
  4084. // C++: bool cv::solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
  4085. [DllImport(LIBNAME)]
  4086. private static extern bool calib3d_Calib3d_solvePnP_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int flags);
  4087. [DllImport(LIBNAME)]
  4088. private static extern bool calib3d_Calib3d_solvePnP_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess);
  4089. [DllImport(LIBNAME)]
  4090. private static extern bool calib3d_Calib3d_solvePnP_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj);
  4091. // C++: bool cv::solvePnPRansac(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int iterationsCount = 100, float reprojectionError = 8.0, double confidence = 0.99, Mat& inliers = Mat(), int flags = SOLVEPNP_ITERATIVE)
  4092. [DllImport(LIBNAME)]
  4093. private static extern bool calib3d_Calib3d_solvePnPRansac_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, IntPtr inliers_nativeObj, int flags);
  4094. [DllImport(LIBNAME)]
  4095. private static extern bool calib3d_Calib3d_solvePnPRansac_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, IntPtr inliers_nativeObj);
  4096. [DllImport(LIBNAME)]
  4097. private static extern bool calib3d_Calib3d_solvePnPRansac_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence);
  4098. [DllImport(LIBNAME)]
  4099. private static extern bool calib3d_Calib3d_solvePnPRansac_13(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int iterationsCount, float reprojectionError);
  4100. [DllImport(LIBNAME)]
  4101. private static extern bool calib3d_Calib3d_solvePnPRansac_14(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess, int iterationsCount);
  4102. [DllImport(LIBNAME)]
  4103. private static extern bool calib3d_Calib3d_solvePnPRansac_15(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, bool useExtrinsicGuess);
  4104. [DllImport(LIBNAME)]
  4105. private static extern bool calib3d_Calib3d_solvePnPRansac_16(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj);
  4106. // C++: bool cv::stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat& H1, Mat& H2, double threshold = 5)
  4107. [DllImport(LIBNAME)]
  4108. private static extern bool calib3d_Calib3d_stereoRectifyUncalibrated_10(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr F_nativeObj, double imgSize_width, double imgSize_height, IntPtr H1_nativeObj, IntPtr H2_nativeObj, double threshold);
  4109. [DllImport(LIBNAME)]
  4110. private static extern bool calib3d_Calib3d_stereoRectifyUncalibrated_11(IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr F_nativeObj, double imgSize_width, double imgSize_height, IntPtr H1_nativeObj, IntPtr H2_nativeObj);
  4111. // C++: double cv::calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  4112. [DllImport(LIBNAME)]
  4113. private static extern double calib3d_Calib3d_calibrateCameraExtended_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4114. [DllImport(LIBNAME)]
  4115. private static extern double calib3d_Calib3d_calibrateCameraExtended_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr perViewErrors_nativeObj, int flags);
  4116. [DllImport(LIBNAME)]
  4117. private static extern double calib3d_Calib3d_calibrateCameraExtended_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr perViewErrors_nativeObj);
  4118. // C++: double cv::calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  4119. [DllImport(LIBNAME)]
  4120. private static extern double calib3d_Calib3d_calibrateCamera_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4121. [DllImport(LIBNAME)]
  4122. private static extern double calib3d_Calib3d_calibrateCamera_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, int flags);
  4123. [DllImport(LIBNAME)]
  4124. private static extern double calib3d_Calib3d_calibrateCamera_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj);
  4125. // C++: double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& stdDeviationsObjPoints, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  4126. [DllImport(LIBNAME)]
  4127. private static extern double calib3d_Calib3d_calibrateCameraROExtended_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr stdDeviationsObjPoints_nativeObj, IntPtr perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4128. [DllImport(LIBNAME)]
  4129. private static extern double calib3d_Calib3d_calibrateCameraROExtended_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr stdDeviationsObjPoints_nativeObj, IntPtr perViewErrors_nativeObj, int flags);
  4130. [DllImport(LIBNAME)]
  4131. private static extern double calib3d_Calib3d_calibrateCameraROExtended_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj, IntPtr stdDeviationsIntrinsics_nativeObj, IntPtr stdDeviationsExtrinsics_nativeObj, IntPtr stdDeviationsObjPoints_nativeObj, IntPtr perViewErrors_nativeObj);
  4132. // C++: double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  4133. [DllImport(LIBNAME)]
  4134. private static extern double calib3d_Calib3d_calibrateCameraRO_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4135. [DllImport(LIBNAME)]
  4136. private static extern double calib3d_Calib3d_calibrateCameraRO_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj, int flags);
  4137. [DllImport(LIBNAME)]
  4138. private static extern double calib3d_Calib3d_calibrateCameraRO_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, IntPtr newObjPoints_nativeObj);
  4139. // C++: double cv::sampsonDistance(Mat pt1, Mat pt2, Mat F)
  4140. [DllImport(LIBNAME)]
  4141. private static extern double calib3d_Calib3d_sampsonDistance_10(IntPtr pt1_nativeObj, IntPtr pt2_nativeObj, IntPtr F_nativeObj);
  4142. // C++: double cv::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, Mat& perViewErrors, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
  4143. [DllImport(LIBNAME)]
  4144. private static extern double calib3d_Calib3d_stereoCalibrateExtended_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj, IntPtr perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4145. [DllImport(LIBNAME)]
  4146. private static extern double calib3d_Calib3d_stereoCalibrateExtended_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj, IntPtr perViewErrors_nativeObj, int flags);
  4147. [DllImport(LIBNAME)]
  4148. private static extern double calib3d_Calib3d_stereoCalibrateExtended_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj, IntPtr perViewErrors_nativeObj);
  4149. // C++: double cv::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
  4150. [DllImport(LIBNAME)]
  4151. private static extern double calib3d_Calib3d_stereoCalibrate_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4152. [DllImport(LIBNAME)]
  4153. private static extern double calib3d_Calib3d_stereoCalibrate_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj, int flags);
  4154. [DllImport(LIBNAME)]
  4155. private static extern double calib3d_Calib3d_stereoCalibrate_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr E_nativeObj, IntPtr F_nativeObj);
  4156. // C++: double cv::fisheye::calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
  4157. [DllImport(LIBNAME)]
  4158. private static extern double calib3d_Calib3d_fisheye_1calibrate_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double image_size_width, double image_size_height, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4159. [DllImport(LIBNAME)]
  4160. private static extern double calib3d_Calib3d_fisheye_1calibrate_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double image_size_width, double image_size_height, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, int flags);
  4161. [DllImport(LIBNAME)]
  4162. private static extern double calib3d_Calib3d_fisheye_1calibrate_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, double image_size_width, double image_size_height, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj);
  4163. // C++: double cv::fisheye::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
  4164. [DllImport(LIBNAME)]
  4165. private static extern double calib3d_Calib3d_fisheye_1stereoCalibrate_10(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4166. [DllImport(LIBNAME)]
  4167. private static extern double calib3d_Calib3d_fisheye_1stereoCalibrate_11(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, int flags);
  4168. [DllImport(LIBNAME)]
  4169. private static extern double calib3d_Calib3d_fisheye_1stereoCalibrate_12(IntPtr objectPoints_mat_nativeObj, IntPtr imagePoints1_mat_nativeObj, IntPtr imagePoints2_mat_nativeObj, IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj);
  4170. // C++: float cv::rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
  4171. [DllImport(LIBNAME)]
  4172. private static extern float calib3d_Calib3d_rectify3Collinear_10(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, IntPtr cameraMatrix3_nativeObj, IntPtr distCoeffs3_nativeObj, IntPtr imgpt1_mat_nativeObj, IntPtr imgpt3_mat_nativeObj, double imageSize_width, double imageSize_height, IntPtr R12_nativeObj, IntPtr T12_nativeObj, IntPtr R13_nativeObj, IntPtr T13_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr R3_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr P3_nativeObj, IntPtr Q_nativeObj, double alpha, double newImgSize_width, double newImgSize_height, double[] roi1_out, double[] roi2_out, int flags);
  4173. // C++: int cv::decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
  4174. [DllImport(LIBNAME)]
  4175. private static extern int calib3d_Calib3d_decomposeHomographyMat_10(IntPtr H_nativeObj, IntPtr K_nativeObj, IntPtr rotations_mat_nativeObj, IntPtr translations_mat_nativeObj, IntPtr normals_mat_nativeObj);
  4176. // C++: int cv::estimateAffine3D(Mat src, Mat dst, Mat& _out, Mat& inliers, double ransacThreshold = 3, double confidence = 0.99)
  4177. [DllImport(LIBNAME)]
  4178. private static extern int calib3d_Calib3d_estimateAffine3D_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr _out_nativeObj, IntPtr inliers_nativeObj, double ransacThreshold, double confidence);
  4179. [DllImport(LIBNAME)]
  4180. private static extern int calib3d_Calib3d_estimateAffine3D_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr _out_nativeObj, IntPtr inliers_nativeObj, double ransacThreshold);
  4181. [DllImport(LIBNAME)]
  4182. private static extern int calib3d_Calib3d_estimateAffine3D_12(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr _out_nativeObj, IntPtr inliers_nativeObj);
  4183. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat& R, Mat& t, double focal = 1.0, Point2d pp = Point2d(0, 0), Mat& mask = Mat())
  4184. [DllImport(LIBNAME)]
  4185. private static extern int calib3d_Calib3d_recoverPose_10(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double focal, double pp_x, double pp_y, IntPtr mask_nativeObj);
  4186. [DllImport(LIBNAME)]
  4187. private static extern int calib3d_Calib3d_recoverPose_11(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double focal, double pp_x, double pp_y);
  4188. [DllImport(LIBNAME)]
  4189. private static extern int calib3d_Calib3d_recoverPose_12(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double focal);
  4190. [DllImport(LIBNAME)]
  4191. private static extern int calib3d_Calib3d_recoverPose_13(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj);
  4192. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, Mat& mask = Mat())
  4193. [DllImport(LIBNAME)]
  4194. private static extern int calib3d_Calib3d_recoverPose_14(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, IntPtr mask_nativeObj);
  4195. [DllImport(LIBNAME)]
  4196. private static extern int calib3d_Calib3d_recoverPose_15(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj);
  4197. // C++: int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, double distanceThresh, Mat& mask = Mat(), Mat& triangulatedPoints = Mat())
  4198. [DllImport(LIBNAME)]
  4199. private static extern int calib3d_Calib3d_recoverPose_16(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double distanceThresh, IntPtr mask_nativeObj, IntPtr triangulatedPoints_nativeObj);
  4200. [DllImport(LIBNAME)]
  4201. private static extern int calib3d_Calib3d_recoverPose_17(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double distanceThresh, IntPtr mask_nativeObj);
  4202. [DllImport(LIBNAME)]
  4203. private static extern int calib3d_Calib3d_recoverPose_18(IntPtr E_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr R_nativeObj, IntPtr t_nativeObj, double distanceThresh);
  4204. // C++: int cv::solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags)
  4205. [DllImport(LIBNAME)]
  4206. private static extern int calib3d_Calib3d_solveP3P_10(IntPtr objectPoints_nativeObj, IntPtr imagePoints_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvecs_mat_nativeObj, IntPtr tvecs_mat_nativeObj, int flags);
  4207. // C++: void cv::Rodrigues(Mat src, Mat& dst, Mat& jacobian = Mat())
  4208. [DllImport(LIBNAME)]
  4209. private static extern void calib3d_Calib3d_Rodrigues_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr jacobian_nativeObj);
  4210. [DllImport(LIBNAME)]
  4211. private static extern void calib3d_Calib3d_Rodrigues_11(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  4212. // C++: void cv::calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio)
  4213. [DllImport(LIBNAME)]
  4214. private static extern void calib3d_Calib3d_calibrationMatrixValues_10(IntPtr cameraMatrix_nativeObj, double imageSize_width, double imageSize_height, double apertureWidth, double apertureHeight, double[] fovx_out, double[] fovy_out, double[] focalLength_out, double[] principalPoint_out, double[] aspectRatio_out);
  4215. // C++: void cv::composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat& rvec3, Mat& tvec3, Mat& dr3dr1 = Mat(), Mat& dr3dt1 = Mat(), Mat& dr3dr2 = Mat(), Mat& dr3dt2 = Mat(), Mat& dt3dr1 = Mat(), Mat& dt3dt1 = Mat(), Mat& dt3dr2 = Mat(), Mat& dt3dt2 = Mat())
  4216. [DllImport(LIBNAME)]
  4217. private static extern void calib3d_Calib3d_composeRT_10(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj, IntPtr dr3dt2_nativeObj, IntPtr dt3dr1_nativeObj, IntPtr dt3dt1_nativeObj, IntPtr dt3dr2_nativeObj, IntPtr dt3dt2_nativeObj);
  4218. [DllImport(LIBNAME)]
  4219. private static extern void calib3d_Calib3d_composeRT_11(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj, IntPtr dr3dt2_nativeObj, IntPtr dt3dr1_nativeObj, IntPtr dt3dt1_nativeObj, IntPtr dt3dr2_nativeObj);
  4220. [DllImport(LIBNAME)]
  4221. private static extern void calib3d_Calib3d_composeRT_12(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj, IntPtr dr3dt2_nativeObj, IntPtr dt3dr1_nativeObj, IntPtr dt3dt1_nativeObj);
  4222. [DllImport(LIBNAME)]
  4223. private static extern void calib3d_Calib3d_composeRT_13(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj, IntPtr dr3dt2_nativeObj, IntPtr dt3dr1_nativeObj);
  4224. [DllImport(LIBNAME)]
  4225. private static extern void calib3d_Calib3d_composeRT_14(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj, IntPtr dr3dt2_nativeObj);
  4226. [DllImport(LIBNAME)]
  4227. private static extern void calib3d_Calib3d_composeRT_15(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj, IntPtr dr3dr2_nativeObj);
  4228. [DllImport(LIBNAME)]
  4229. private static extern void calib3d_Calib3d_composeRT_16(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj, IntPtr dr3dt1_nativeObj);
  4230. [DllImport(LIBNAME)]
  4231. private static extern void calib3d_Calib3d_composeRT_17(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj, IntPtr dr3dr1_nativeObj);
  4232. [DllImport(LIBNAME)]
  4233. private static extern void calib3d_Calib3d_composeRT_18(IntPtr rvec1_nativeObj, IntPtr tvec1_nativeObj, IntPtr rvec2_nativeObj, IntPtr tvec2_nativeObj, IntPtr rvec3_nativeObj, IntPtr tvec3_nativeObj);
  4234. // C++: void cv::computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat& lines)
  4235. [DllImport(LIBNAME)]
  4236. private static extern void calib3d_Calib3d_computeCorrespondEpilines_10(IntPtr points_nativeObj, int whichImage, IntPtr F_nativeObj, IntPtr lines_nativeObj);
  4237. // C++: void cv::convertPointsFromHomogeneous(Mat src, Mat& dst)
  4238. [DllImport(LIBNAME)]
  4239. private static extern void calib3d_Calib3d_convertPointsFromHomogeneous_10(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  4240. // C++: void cv::convertPointsToHomogeneous(Mat src, Mat& dst)
  4241. [DllImport(LIBNAME)]
  4242. private static extern void calib3d_Calib3d_convertPointsToHomogeneous_10(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  4243. // C++: void cv::correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
  4244. [DllImport(LIBNAME)]
  4245. private static extern void calib3d_Calib3d_correctMatches_10(IntPtr F_nativeObj, IntPtr points1_nativeObj, IntPtr points2_nativeObj, IntPtr newPoints1_nativeObj, IntPtr newPoints2_nativeObj);
  4246. // C++: void cv::decomposeEssentialMat(Mat E, Mat& R1, Mat& R2, Mat& t)
  4247. [DllImport(LIBNAME)]
  4248. private static extern void calib3d_Calib3d_decomposeEssentialMat_10(IntPtr E_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr t_nativeObj);
  4249. // C++: void cv::decomposeProjectionMatrix(Mat projMatrix, Mat& cameraMatrix, Mat& rotMatrix, Mat& transVect, Mat& rotMatrixX = Mat(), Mat& rotMatrixY = Mat(), Mat& rotMatrixZ = Mat(), Mat& eulerAngles = Mat())
  4250. [DllImport(LIBNAME)]
  4251. private static extern void calib3d_Calib3d_decomposeProjectionMatrix_10(IntPtr projMatrix_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr rotMatrix_nativeObj, IntPtr transVect_nativeObj, IntPtr rotMatrixX_nativeObj, IntPtr rotMatrixY_nativeObj, IntPtr rotMatrixZ_nativeObj, IntPtr eulerAngles_nativeObj);
  4252. [DllImport(LIBNAME)]
  4253. private static extern void calib3d_Calib3d_decomposeProjectionMatrix_11(IntPtr projMatrix_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr rotMatrix_nativeObj, IntPtr transVect_nativeObj, IntPtr rotMatrixX_nativeObj, IntPtr rotMatrixY_nativeObj, IntPtr rotMatrixZ_nativeObj);
  4254. [DllImport(LIBNAME)]
  4255. private static extern void calib3d_Calib3d_decomposeProjectionMatrix_12(IntPtr projMatrix_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr rotMatrix_nativeObj, IntPtr transVect_nativeObj, IntPtr rotMatrixX_nativeObj, IntPtr rotMatrixY_nativeObj);
  4256. [DllImport(LIBNAME)]
  4257. private static extern void calib3d_Calib3d_decomposeProjectionMatrix_13(IntPtr projMatrix_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr rotMatrix_nativeObj, IntPtr transVect_nativeObj, IntPtr rotMatrixX_nativeObj);
  4258. [DllImport(LIBNAME)]
  4259. private static extern void calib3d_Calib3d_decomposeProjectionMatrix_14(IntPtr projMatrix_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr rotMatrix_nativeObj, IntPtr transVect_nativeObj);
  4260. // C++: void cv::drawChessboardCorners(Mat& image, Size patternSize, vector_Point2f corners, bool patternWasFound)
  4261. [DllImport(LIBNAME)]
  4262. private static extern void calib3d_Calib3d_drawChessboardCorners_10(IntPtr image_nativeObj, double patternSize_width, double patternSize_height, IntPtr corners_mat_nativeObj, bool patternWasFound);
  4263. // C++: void cv::drawFrameAxes(Mat& image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness = 3)
  4264. [DllImport(LIBNAME)]
  4265. private static extern void calib3d_Calib3d_drawFrameAxes_10(IntPtr image_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, float length, int thickness);
  4266. [DllImport(LIBNAME)]
  4267. private static extern void calib3d_Calib3d_drawFrameAxes_11(IntPtr image_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, float length);
  4268. // C++: void cv::filterHomographyDecompByVisibleRefpoints(vector_Mat rotations, vector_Mat normals, Mat beforePoints, Mat afterPoints, Mat& possibleSolutions, Mat pointsMask = Mat())
  4269. [DllImport(LIBNAME)]
  4270. private static extern void calib3d_Calib3d_filterHomographyDecompByVisibleRefpoints_10(IntPtr rotations_mat_nativeObj, IntPtr normals_mat_nativeObj, IntPtr beforePoints_nativeObj, IntPtr afterPoints_nativeObj, IntPtr possibleSolutions_nativeObj, IntPtr pointsMask_nativeObj);
  4271. [DllImport(LIBNAME)]
  4272. private static extern void calib3d_Calib3d_filterHomographyDecompByVisibleRefpoints_11(IntPtr rotations_mat_nativeObj, IntPtr normals_mat_nativeObj, IntPtr beforePoints_nativeObj, IntPtr afterPoints_nativeObj, IntPtr possibleSolutions_nativeObj);
  4273. // C++: void cv::filterSpeckles(Mat& img, double newVal, int maxSpeckleSize, double maxDiff, Mat& buf = Mat())
  4274. [DllImport(LIBNAME)]
  4275. private static extern void calib3d_Calib3d_filterSpeckles_10(IntPtr img_nativeObj, double newVal, int maxSpeckleSize, double maxDiff, IntPtr buf_nativeObj);
  4276. [DllImport(LIBNAME)]
  4277. private static extern void calib3d_Calib3d_filterSpeckles_11(IntPtr img_nativeObj, double newVal, int maxSpeckleSize, double maxDiff);
  4278. // C++: void cv::initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
  4279. [DllImport(LIBNAME)]
  4280. private static extern void calib3d_Calib3d_initUndistortRectifyMap_10(IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr R_nativeObj, IntPtr newCameraMatrix_nativeObj, double size_width, double size_height, int m1type, IntPtr map1_nativeObj, IntPtr map2_nativeObj);
  4281. // C++: void cv::matMulDeriv(Mat A, Mat B, Mat& dABdA, Mat& dABdB)
  4282. [DllImport(LIBNAME)]
  4283. private static extern void calib3d_Calib3d_matMulDeriv_10(IntPtr A_nativeObj, IntPtr B_nativeObj, IntPtr dABdA_nativeObj, IntPtr dABdB_nativeObj);
  4284. // C++: void cv::projectPoints(vector_Point3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, vector_double distCoeffs, vector_Point2f& imagePoints, Mat& jacobian = Mat(), double aspectRatio = 0)
  4285. [DllImport(LIBNAME)]
  4286. private static extern void calib3d_Calib3d_projectPoints_10(IntPtr objectPoints_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr jacobian_nativeObj, double aspectRatio);
  4287. [DllImport(LIBNAME)]
  4288. private static extern void calib3d_Calib3d_projectPoints_11(IntPtr objectPoints_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr imagePoints_mat_nativeObj, IntPtr jacobian_nativeObj);
  4289. [DllImport(LIBNAME)]
  4290. private static extern void calib3d_Calib3d_projectPoints_12(IntPtr objectPoints_mat_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_mat_nativeObj, IntPtr imagePoints_mat_nativeObj);
  4291. // C++: void cv::reprojectImageTo3D(Mat disparity, Mat& _3dImage, Mat Q, bool handleMissingValues = false, int ddepth = -1)
  4292. [DllImport(LIBNAME)]
  4293. private static extern void calib3d_Calib3d_reprojectImageTo3D_10(IntPtr disparity_nativeObj, IntPtr _3dImage_nativeObj, IntPtr Q_nativeObj, bool handleMissingValues, int ddepth);
  4294. [DllImport(LIBNAME)]
  4295. private static extern void calib3d_Calib3d_reprojectImageTo3D_11(IntPtr disparity_nativeObj, IntPtr _3dImage_nativeObj, IntPtr Q_nativeObj, bool handleMissingValues);
  4296. [DllImport(LIBNAME)]
  4297. private static extern void calib3d_Calib3d_reprojectImageTo3D_12(IntPtr disparity_nativeObj, IntPtr _3dImage_nativeObj, IntPtr Q_nativeObj);
  4298. // C++: void cv::stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags = CALIB_ZERO_DISPARITY, double alpha = -1, Size newImageSize = Size(), Rect* validPixROI1 = 0, Rect* validPixROI2 = 0)
  4299. [DllImport(LIBNAME)]
  4300. private static extern void calib3d_Calib3d_stereoRectify_10(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double alpha, double newImageSize_width, double newImageSize_height, double[] validPixROI1_out, double[] validPixROI2_out);
  4301. [DllImport(LIBNAME)]
  4302. private static extern void calib3d_Calib3d_stereoRectify_11(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double alpha, double newImageSize_width, double newImageSize_height, double[] validPixROI1_out);
  4303. [DllImport(LIBNAME)]
  4304. private static extern void calib3d_Calib3d_stereoRectify_12(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double alpha, double newImageSize_width, double newImageSize_height);
  4305. [DllImport(LIBNAME)]
  4306. private static extern void calib3d_Calib3d_stereoRectify_13(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double alpha);
  4307. [DllImport(LIBNAME)]
  4308. private static extern void calib3d_Calib3d_stereoRectify_14(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags);
  4309. [DllImport(LIBNAME)]
  4310. private static extern void calib3d_Calib3d_stereoRectify_15(IntPtr cameraMatrix1_nativeObj, IntPtr distCoeffs1_nativeObj, IntPtr cameraMatrix2_nativeObj, IntPtr distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr T_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj);
  4311. // C++: void cv::triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat& points4D)
  4312. [DllImport(LIBNAME)]
  4313. private static extern void calib3d_Calib3d_triangulatePoints_10(IntPtr projMatr1_nativeObj, IntPtr projMatr2_nativeObj, IntPtr projPoints1_nativeObj, IntPtr projPoints2_nativeObj, IntPtr points4D_nativeObj);
  4314. // C++: void cv::undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
  4315. [DllImport(LIBNAME)]
  4316. private static extern void calib3d_Calib3d_undistort_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr newCameraMatrix_nativeObj);
  4317. [DllImport(LIBNAME)]
  4318. private static extern void calib3d_Calib3d_undistort_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj);
  4319. // C++: void cv::undistortPoints(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria)
  4320. [DllImport(LIBNAME)]
  4321. private static extern void calib3d_Calib3d_undistortPointsIter_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr R_nativeObj, IntPtr P_nativeObj, int criteria_type, int criteria_maxCount, double criteria_epsilon);
  4322. // C++: void cv::undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
  4323. [DllImport(LIBNAME)]
  4324. private static extern void calib3d_Calib3d_undistortPoints_10(IntPtr src_mat_nativeObj, IntPtr dst_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr R_nativeObj, IntPtr P_nativeObj);
  4325. [DllImport(LIBNAME)]
  4326. private static extern void calib3d_Calib3d_undistortPoints_11(IntPtr src_mat_nativeObj, IntPtr dst_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr R_nativeObj);
  4327. [DllImport(LIBNAME)]
  4328. private static extern void calib3d_Calib3d_undistortPoints_12(IntPtr src_mat_nativeObj, IntPtr dst_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj);
  4329. // C++: void cv::validateDisparity(Mat& disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp = 1)
  4330. [DllImport(LIBNAME)]
  4331. private static extern void calib3d_Calib3d_validateDisparity_10(IntPtr disparity_nativeObj, IntPtr cost_nativeObj, int minDisparity, int numberOfDisparities, int disp12MaxDisp);
  4332. [DllImport(LIBNAME)]
  4333. private static extern void calib3d_Calib3d_validateDisparity_11(IntPtr disparity_nativeObj, IntPtr cost_nativeObj, int minDisparity, int numberOfDisparities);
  4334. // C++: void cv::fisheye::distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
  4335. [DllImport(LIBNAME)]
  4336. private static extern void calib3d_Calib3d_fisheye_1distortPoints_10(IntPtr undistorted_nativeObj, IntPtr distorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, double alpha);
  4337. [DllImport(LIBNAME)]
  4338. private static extern void calib3d_Calib3d_fisheye_1distortPoints_11(IntPtr undistorted_nativeObj, IntPtr distorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj);
  4339. // C++: void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat& P, double balance = 0.0, Size new_size = Size(), double fov_scale = 1.0)
  4340. [DllImport(LIBNAME)]
  4341. private static extern void calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_10(IntPtr K_nativeObj, IntPtr D_nativeObj, double image_size_width, double image_size_height, IntPtr R_nativeObj, IntPtr P_nativeObj, double balance, double new_size_width, double new_size_height, double fov_scale);
  4342. [DllImport(LIBNAME)]
  4343. private static extern void calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_11(IntPtr K_nativeObj, IntPtr D_nativeObj, double image_size_width, double image_size_height, IntPtr R_nativeObj, IntPtr P_nativeObj, double balance, double new_size_width, double new_size_height);
  4344. [DllImport(LIBNAME)]
  4345. private static extern void calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_12(IntPtr K_nativeObj, IntPtr D_nativeObj, double image_size_width, double image_size_height, IntPtr R_nativeObj, IntPtr P_nativeObj, double balance);
  4346. [DllImport(LIBNAME)]
  4347. private static extern void calib3d_Calib3d_fisheye_1estimateNewCameraMatrixForUndistortRectify_13(IntPtr K_nativeObj, IntPtr D_nativeObj, double image_size_width, double image_size_height, IntPtr R_nativeObj, IntPtr P_nativeObj);
  4348. // C++: void cv::fisheye::initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
  4349. [DllImport(LIBNAME)]
  4350. private static extern void calib3d_Calib3d_fisheye_1initUndistortRectifyMap_10(IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr R_nativeObj, IntPtr P_nativeObj, double size_width, double size_height, int m1type, IntPtr map1_nativeObj, IntPtr map2_nativeObj);
  4351. // C++: void cv::fisheye::projectPoints(Mat objectPoints, Mat& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
  4352. [DllImport(LIBNAME)]
  4353. private static extern void calib3d_Calib3d_fisheye_1projectPoints_10(IntPtr objectPoints_nativeObj, IntPtr imagePoints_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, double alpha, IntPtr jacobian_nativeObj);
  4354. [DllImport(LIBNAME)]
  4355. private static extern void calib3d_Calib3d_fisheye_1projectPoints_11(IntPtr objectPoints_nativeObj, IntPtr imagePoints_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, double alpha);
  4356. [DllImport(LIBNAME)]
  4357. private static extern void calib3d_Calib3d_fisheye_1projectPoints_12(IntPtr objectPoints_nativeObj, IntPtr imagePoints_nativeObj, IntPtr rvec_nativeObj, IntPtr tvec_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj);
  4358. // C++: void cv::fisheye::stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags, Size newImageSize = Size(), double balance = 0.0, double fov_scale = 1.0)
  4359. [DllImport(LIBNAME)]
  4360. private static extern void calib3d_Calib3d_fisheye_1stereoRectify_10(IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr tvec_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height, double balance, double fov_scale);
  4361. [DllImport(LIBNAME)]
  4362. private static extern void calib3d_Calib3d_fisheye_1stereoRectify_11(IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr tvec_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height, double balance);
  4363. [DllImport(LIBNAME)]
  4364. private static extern void calib3d_Calib3d_fisheye_1stereoRectify_12(IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr tvec_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height);
  4365. [DllImport(LIBNAME)]
  4366. private static extern void calib3d_Calib3d_fisheye_1stereoRectify_13(IntPtr K1_nativeObj, IntPtr D1_nativeObj, IntPtr K2_nativeObj, IntPtr D2_nativeObj, double imageSize_width, double imageSize_height, IntPtr R_nativeObj, IntPtr tvec_nativeObj, IntPtr R1_nativeObj, IntPtr R2_nativeObj, IntPtr P1_nativeObj, IntPtr P2_nativeObj, IntPtr Q_nativeObj, int flags);
  4367. // C++: void cv::fisheye::undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
  4368. [DllImport(LIBNAME)]
  4369. private static extern void calib3d_Calib3d_fisheye_1undistortImage_10(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr Knew_nativeObj, double new_size_width, double new_size_height);
  4370. [DllImport(LIBNAME)]
  4371. private static extern void calib3d_Calib3d_fisheye_1undistortImage_11(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr Knew_nativeObj);
  4372. [DllImport(LIBNAME)]
  4373. private static extern void calib3d_Calib3d_fisheye_1undistortImage_12(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj);
  4374. // C++: void cv::fisheye::undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
  4375. [DllImport(LIBNAME)]
  4376. private static extern void calib3d_Calib3d_fisheye_1undistortPoints_10(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr R_nativeObj, IntPtr P_nativeObj);
  4377. [DllImport(LIBNAME)]
  4378. private static extern void calib3d_Calib3d_fisheye_1undistortPoints_11(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj, IntPtr R_nativeObj);
  4379. [DllImport(LIBNAME)]
  4380. private static extern void calib3d_Calib3d_fisheye_1undistortPoints_12(IntPtr distorted_nativeObj, IntPtr undistorted_nativeObj, IntPtr K_nativeObj, IntPtr D_nativeObj);
  4381. #endif
  4382. }
  4383. }