Ximgproc.cs 211 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515
  1. using OpenCVForUnity.Calib3dModule;
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.XimgprocModule
  8. {
  9. // C++: class Ximgproc
  10. public class Ximgproc
  11. {
  12. // C++: enum cv.ximgproc.AngleRangeOption
  13. public const int ARO_0_45 = 0;
  14. public const int ARO_45_90 = 1;
  15. public const int ARO_90_135 = 2;
  16. public const int ARO_315_0 = 3;
  17. public const int ARO_315_45 = 4;
  18. public const int ARO_45_135 = 5;
  19. public const int ARO_315_135 = 6;
  20. public const int ARO_CTR_HOR = 7;
  21. public const int ARO_CTR_VER = 8;
  22. // C++: enum cv.ximgproc.EdgeAwareFiltersList
  23. public const int DTF_NC = 0;
  24. public const int DTF_IC = 1;
  25. public const int DTF_RF = 2;
  26. public const int GUIDED_FILTER = 3;
  27. public const int AM_FILTER = 4;
  28. // C++: enum cv.ximgproc.HoughDeskewOption
  29. public const int HDO_RAW = 0;
  30. public const int HDO_DESKEW = 1;
  31. // C++: enum cv.ximgproc.HoughOp
  32. public const int FHT_MIN = 0;
  33. public const int FHT_MAX = 1;
  34. public const int FHT_ADD = 2;
  35. public const int FHT_AVE = 3;
  36. // C++: enum cv.ximgproc.LocalBinarizationMethods
  37. public const int BINARIZATION_NIBLACK = 0;
  38. public const int BINARIZATION_SAUVOLA = 1;
  39. public const int BINARIZATION_WOLF = 2;
  40. public const int BINARIZATION_NICK = 3;
  41. // C++: enum cv.ximgproc.SLICType
  42. public const int SLIC = 100;
  43. public const int SLICO = 101;
  44. public const int MSLIC = 102;
  45. // C++: enum cv.ximgproc.ThinningTypes
  46. public const int THINNING_ZHANGSUEN = 0;
  47. public const int THINNING_GUOHALL = 1;
  48. // C++: enum cv.ximgproc.WMFWeightType
  49. public const int WMF_EXP = 1;
  50. public const int WMF_IV1 = 1 << 1;
  51. public const int WMF_IV2 = 1 << 2;
  52. public const int WMF_COS = 1 << 3;
  53. public const int WMF_JAC = 1 << 4;
  54. public const int WMF_OFF = 1 << 5;
  55. //
  56. // C++: void cv::ximgproc::niBlackThreshold(Mat _src, Mat& _dst, double maxValue, int type, int blockSize, double k, int binarizationMethod = BINARIZATION_NIBLACK, double r = 128)
  57. //
  58. /**
  59. * Performs thresholding on input images using Niblack's technique or some of the
  60. * popular variations it inspired.
  61. *
  62. * The function transforms a grayscale image to a binary image according to the formulae:
  63. * <ul>
  64. * <li>
  65. * <b>THRESH_BINARY</b>
  66. * \(dst(x,y) = \fork{\texttt{maxValue}}{if \(src(x,y) &gt; T(x,y)\)}{0}{otherwise}\)
  67. * </li>
  68. * <li>
  69. * <b>THRESH_BINARY_INV</b>
  70. * \(dst(x,y) = \fork{0}{if \(src(x,y) &gt; T(x,y)\)}{\texttt{maxValue}}{otherwise}\)
  71. * where \(T(x,y)\) is a threshold calculated individually for each pixel.
  72. * </li>
  73. * </ul>
  74. *
  75. * The threshold value \(T(x, y)\) is determined based on the binarization method chosen. For
  76. * classic Niblack, it is the mean minus \( k \) times standard deviation of
  77. * \(\texttt{blockSize} \times\texttt{blockSize}\) neighborhood of \((x, y)\).
  78. *
  79. * The function can't process the image in-place.
  80. *
  81. * param _src Source 8-bit single-channel image.
  82. * param _dst Destination image of the same size and the same type as src.
  83. * param maxValue Non-zero value assigned to the pixels for which the condition is satisfied,
  84. * used with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
  85. * param type Thresholding type, see cv::ThresholdTypes.
  86. * param blockSize Size of a pixel neighborhood that is used to calculate a threshold value
  87. * for the pixel: 3, 5, 7, and so on.
  88. * param k The user-adjustable parameter used by Niblack and inspired techniques. For Niblack, this is
  89. * normally a value between 0 and 1 that is multiplied with the standard deviation and subtracted from
  90. * the mean.
  91. * param binarizationMethod Binarization method to use. By default, Niblack's technique is used.
  92. * Other techniques can be specified, see cv::ximgproc::LocalBinarizationMethods.
  93. * param r The user-adjustable parameter used by Sauvola's technique. This is the dynamic range
  94. * of standard deviation.
  95. * SEE: threshold, adaptiveThreshold
  96. */
  97. public static void niBlackThreshold(Mat _src, Mat _dst, double maxValue, int type, int blockSize, double k, int binarizationMethod, double r)
  98. {
  99. if (_src != null) _src.ThrowIfDisposed();
  100. if (_dst != null) _dst.ThrowIfDisposed();
  101. ximgproc_Ximgproc_niBlackThreshold_10(_src.nativeObj, _dst.nativeObj, maxValue, type, blockSize, k, binarizationMethod, r);
  102. }
  103. /**
  104. * Performs thresholding on input images using Niblack's technique or some of the
  105. * popular variations it inspired.
  106. *
  107. * The function transforms a grayscale image to a binary image according to the formulae:
  108. * <ul>
  109. * <li>
  110. * <b>THRESH_BINARY</b>
  111. * \(dst(x,y) = \fork{\texttt{maxValue}}{if \(src(x,y) &gt; T(x,y)\)}{0}{otherwise}\)
  112. * </li>
  113. * <li>
  114. * <b>THRESH_BINARY_INV</b>
  115. * \(dst(x,y) = \fork{0}{if \(src(x,y) &gt; T(x,y)\)}{\texttt{maxValue}}{otherwise}\)
  116. * where \(T(x,y)\) is a threshold calculated individually for each pixel.
  117. * </li>
  118. * </ul>
  119. *
  120. * The threshold value \(T(x, y)\) is determined based on the binarization method chosen. For
  121. * classic Niblack, it is the mean minus \( k \) times standard deviation of
  122. * \(\texttt{blockSize} \times\texttt{blockSize}\) neighborhood of \((x, y)\).
  123. *
  124. * The function can't process the image in-place.
  125. *
  126. * param _src Source 8-bit single-channel image.
  127. * param _dst Destination image of the same size and the same type as src.
  128. * param maxValue Non-zero value assigned to the pixels for which the condition is satisfied,
  129. * used with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
  130. * param type Thresholding type, see cv::ThresholdTypes.
  131. * param blockSize Size of a pixel neighborhood that is used to calculate a threshold value
  132. * for the pixel: 3, 5, 7, and so on.
  133. * param k The user-adjustable parameter used by Niblack and inspired techniques. For Niblack, this is
  134. * normally a value between 0 and 1 that is multiplied with the standard deviation and subtracted from
  135. * the mean.
  136. * param binarizationMethod Binarization method to use. By default, Niblack's technique is used.
  137. * Other techniques can be specified, see cv::ximgproc::LocalBinarizationMethods.
  138. * of standard deviation.
  139. * SEE: threshold, adaptiveThreshold
  140. */
  141. public static void niBlackThreshold(Mat _src, Mat _dst, double maxValue, int type, int blockSize, double k, int binarizationMethod)
  142. {
  143. if (_src != null) _src.ThrowIfDisposed();
  144. if (_dst != null) _dst.ThrowIfDisposed();
  145. ximgproc_Ximgproc_niBlackThreshold_11(_src.nativeObj, _dst.nativeObj, maxValue, type, blockSize, k, binarizationMethod);
  146. }
  147. /**
  148. * Performs thresholding on input images using Niblack's technique or some of the
  149. * popular variations it inspired.
  150. *
  151. * The function transforms a grayscale image to a binary image according to the formulae:
  152. * <ul>
  153. * <li>
  154. * <b>THRESH_BINARY</b>
  155. * \(dst(x,y) = \fork{\texttt{maxValue}}{if \(src(x,y) &gt; T(x,y)\)}{0}{otherwise}\)
  156. * </li>
  157. * <li>
  158. * <b>THRESH_BINARY_INV</b>
  159. * \(dst(x,y) = \fork{0}{if \(src(x,y) &gt; T(x,y)\)}{\texttt{maxValue}}{otherwise}\)
  160. * where \(T(x,y)\) is a threshold calculated individually for each pixel.
  161. * </li>
  162. * </ul>
  163. *
  164. * The threshold value \(T(x, y)\) is determined based on the binarization method chosen. For
  165. * classic Niblack, it is the mean minus \( k \) times standard deviation of
  166. * \(\texttt{blockSize} \times\texttt{blockSize}\) neighborhood of \((x, y)\).
  167. *
  168. * The function can't process the image in-place.
  169. *
  170. * param _src Source 8-bit single-channel image.
  171. * param _dst Destination image of the same size and the same type as src.
  172. * param maxValue Non-zero value assigned to the pixels for which the condition is satisfied,
  173. * used with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
  174. * param type Thresholding type, see cv::ThresholdTypes.
  175. * param blockSize Size of a pixel neighborhood that is used to calculate a threshold value
  176. * for the pixel: 3, 5, 7, and so on.
  177. * param k The user-adjustable parameter used by Niblack and inspired techniques. For Niblack, this is
  178. * normally a value between 0 and 1 that is multiplied with the standard deviation and subtracted from
  179. * the mean.
  180. * Other techniques can be specified, see cv::ximgproc::LocalBinarizationMethods.
  181. * of standard deviation.
  182. * SEE: threshold, adaptiveThreshold
  183. */
  184. public static void niBlackThreshold(Mat _src, Mat _dst, double maxValue, int type, int blockSize, double k)
  185. {
  186. if (_src != null) _src.ThrowIfDisposed();
  187. if (_dst != null) _dst.ThrowIfDisposed();
  188. ximgproc_Ximgproc_niBlackThreshold_12(_src.nativeObj, _dst.nativeObj, maxValue, type, blockSize, k);
  189. }
  190. //
  191. // C++: void cv::ximgproc::thinning(Mat src, Mat& dst, int thinningType = THINNING_ZHANGSUEN)
  192. //
  193. /**
  194. * Applies a binary blob thinning operation, to achieve a skeletization of the input image.
  195. *
  196. * The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.
  197. *
  198. * param src Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values.
  199. * param dst Destination image of the same size and the same type as src. The function can work in-place.
  200. * param thinningType Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes
  201. */
  202. public static void thinning(Mat src, Mat dst, int thinningType)
  203. {
  204. if (src != null) src.ThrowIfDisposed();
  205. if (dst != null) dst.ThrowIfDisposed();
  206. ximgproc_Ximgproc_thinning_10(src.nativeObj, dst.nativeObj, thinningType);
  207. }
  208. /**
  209. * Applies a binary blob thinning operation, to achieve a skeletization of the input image.
  210. *
  211. * The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.
  212. *
  213. * param src Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values.
  214. * param dst Destination image of the same size and the same type as src. The function can work in-place.
  215. */
  216. public static void thinning(Mat src, Mat dst)
  217. {
  218. if (src != null) src.ThrowIfDisposed();
  219. if (dst != null) dst.ThrowIfDisposed();
  220. ximgproc_Ximgproc_thinning_11(src.nativeObj, dst.nativeObj);
  221. }
  222. //
  223. // C++: void cv::ximgproc::anisotropicDiffusion(Mat src, Mat& dst, float alpha, float K, int niters)
  224. //
  225. /**
  226. * Performs anisotropic diffusion on an image.
  227. *
  228. * The function applies Perona-Malik anisotropic diffusion to an image. This is the solution to the partial differential equation:
  229. *
  230. * \({\frac {\partial I}{\partial t}}={\mathrm {div}}\left(c(x,y,t)\nabla I\right)=\nabla c\cdot \nabla I+c(x,y,t)\Delta I\)
  231. *
  232. * Suggested functions for c(x,y,t) are:
  233. *
  234. * \(c\left(\|\nabla I\|\right)=e^{{-\left(\|\nabla I\|/K\right)^{2}}}\)
  235. *
  236. * or
  237. *
  238. * \( c\left(\|\nabla I\|\right)={\frac {1}{1+\left({\frac {\|\nabla I\|}{K}}\right)^{2}}} \)
  239. *
  240. * param src Source image with 3 channels.
  241. * param dst Destination image of the same size and the same number of channels as src .
  242. * param alpha The amount of time to step forward by on each iteration (normally, it's between 0 and 1).
  243. * param K sensitivity to the edges
  244. * param niters The number of iterations
  245. */
  246. public static void anisotropicDiffusion(Mat src, Mat dst, float alpha, float K, int niters)
  247. {
  248. if (src != null) src.ThrowIfDisposed();
  249. if (dst != null) dst.ThrowIfDisposed();
  250. ximgproc_Ximgproc_anisotropicDiffusion_10(src.nativeObj, dst.nativeObj, alpha, K, niters);
  251. }
  252. //
  253. // C++: void cv::ximgproc::createQuaternionImage(Mat img, Mat& qimg)
  254. //
  255. /**
  256. * creates a quaternion image.
  257. *
  258. * param img automatically generated
  259. * param qimg automatically generated
  260. */
  261. public static void createQuaternionImage(Mat img, Mat qimg)
  262. {
  263. if (img != null) img.ThrowIfDisposed();
  264. if (qimg != null) qimg.ThrowIfDisposed();
  265. ximgproc_Ximgproc_createQuaternionImage_10(img.nativeObj, qimg.nativeObj);
  266. }
  267. //
  268. // C++: void cv::ximgproc::qconj(Mat qimg, Mat& qcimg)
  269. //
  270. /**
  271. * calculates conjugate of a quaternion image.
  272. *
  273. * param qimg automatically generated
  274. * param qcimg automatically generated
  275. */
  276. public static void qconj(Mat qimg, Mat qcimg)
  277. {
  278. if (qimg != null) qimg.ThrowIfDisposed();
  279. if (qcimg != null) qcimg.ThrowIfDisposed();
  280. ximgproc_Ximgproc_qconj_10(qimg.nativeObj, qcimg.nativeObj);
  281. }
  282. //
  283. // C++: void cv::ximgproc::qunitary(Mat qimg, Mat& qnimg)
  284. //
  285. /**
  286. * divides each element by its modulus.
  287. *
  288. * param qimg automatically generated
  289. * param qnimg automatically generated
  290. */
  291. public static void qunitary(Mat qimg, Mat qnimg)
  292. {
  293. if (qimg != null) qimg.ThrowIfDisposed();
  294. if (qnimg != null) qnimg.ThrowIfDisposed();
  295. ximgproc_Ximgproc_qunitary_10(qimg.nativeObj, qnimg.nativeObj);
  296. }
  297. //
  298. // C++: void cv::ximgproc::qmultiply(Mat src1, Mat src2, Mat& dst)
  299. //
  300. /**
  301. * Calculates the per-element quaternion product of two arrays
  302. *
  303. * param src1 automatically generated
  304. * param src2 automatically generated
  305. * param dst automatically generated
  306. */
  307. public static void qmultiply(Mat src1, Mat src2, Mat dst)
  308. {
  309. if (src1 != null) src1.ThrowIfDisposed();
  310. if (src2 != null) src2.ThrowIfDisposed();
  311. if (dst != null) dst.ThrowIfDisposed();
  312. ximgproc_Ximgproc_qmultiply_10(src1.nativeObj, src2.nativeObj, dst.nativeObj);
  313. }
  314. //
  315. // C++: void cv::ximgproc::qdft(Mat img, Mat& qimg, int flags, bool sideLeft)
  316. //
  317. /**
  318. * Performs a forward or inverse Discrete quaternion Fourier transform of a 2D quaternion array.
  319. *
  320. * param img automatically generated
  321. * param qimg automatically generated
  322. * param flags automatically generated
  323. * param sideLeft automatically generated
  324. */
  325. public static void qdft(Mat img, Mat qimg, int flags, bool sideLeft)
  326. {
  327. if (img != null) img.ThrowIfDisposed();
  328. if (qimg != null) qimg.ThrowIfDisposed();
  329. ximgproc_Ximgproc_qdft_10(img.nativeObj, qimg.nativeObj, flags, sideLeft);
  330. }
  331. //
  332. // C++: void cv::ximgproc::colorMatchTemplate(Mat img, Mat templ, Mat& result)
  333. //
  334. /**
  335. * Compares a color template against overlapped color image regions.
  336. *
  337. * param img automatically generated
  338. * param templ automatically generated
  339. * param result automatically generated
  340. */
  341. public static void colorMatchTemplate(Mat img, Mat templ, Mat result)
  342. {
  343. if (img != null) img.ThrowIfDisposed();
  344. if (templ != null) templ.ThrowIfDisposed();
  345. if (result != null) result.ThrowIfDisposed();
  346. ximgproc_Ximgproc_colorMatchTemplate_10(img.nativeObj, templ.nativeObj, result.nativeObj);
  347. }
  348. //
  349. // C++: void cv::ximgproc::GradientDericheY(Mat op, Mat& dst, double alpha, double omega)
  350. //
  351. /**
  352. * Applies Y Deriche filter to an image.
  353. *
  354. * For more details about this implementation, please see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.476.5736&amp;rep=rep1&amp;type=pdf
  355. *
  356. *
  357. * param op automatically generated
  358. * param dst automatically generated
  359. * param alpha automatically generated
  360. * param omega automatically generated
  361. */
  362. public static void GradientDericheY(Mat op, Mat dst, double alpha, double omega)
  363. {
  364. if (op != null) op.ThrowIfDisposed();
  365. if (dst != null) dst.ThrowIfDisposed();
  366. ximgproc_Ximgproc_GradientDericheY_10(op.nativeObj, dst.nativeObj, alpha, omega);
  367. }
  368. //
  369. // C++: void cv::ximgproc::GradientDericheX(Mat op, Mat& dst, double alpha, double omega)
  370. //
  371. /**
  372. * Applies X Deriche filter to an image.
  373. *
  374. * For more details about this implementation, please see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.476.5736&amp;rep=rep1&amp;type=pdf
  375. *
  376. *
  377. * param op automatically generated
  378. * param dst automatically generated
  379. * param alpha automatically generated
  380. * param omega automatically generated
  381. */
  382. public static void GradientDericheX(Mat op, Mat dst, double alpha, double omega)
  383. {
  384. if (op != null) op.ThrowIfDisposed();
  385. if (dst != null) dst.ThrowIfDisposed();
  386. ximgproc_Ximgproc_GradientDericheX_10(op.nativeObj, dst.nativeObj, alpha, omega);
  387. }
  388. //
  389. // C++: Ptr_DisparityWLSFilter cv::ximgproc::createDisparityWLSFilter(Ptr_StereoMatcher matcher_left)
  390. //
  391. /**
  392. * Convenience factory method that creates an instance of DisparityWLSFilter and sets up all the relevant
  393. * filter parameters automatically based on the matcher instance. Currently supports only StereoBM and StereoSGBM.
  394. *
  395. * param matcher_left stereo matcher instance that will be used with the filter
  396. * return automatically generated
  397. */
  398. public static DisparityWLSFilter createDisparityWLSFilter(StereoMatcher matcher_left)
  399. {
  400. if (matcher_left != null) matcher_left.ThrowIfDisposed();
  401. return DisparityWLSFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createDisparityWLSFilter_10(matcher_left.getNativeObjAddr())));
  402. }
  403. //
  404. // C++: Ptr_StereoMatcher cv::ximgproc::createRightMatcher(Ptr_StereoMatcher matcher_left)
  405. //
  406. /**
  407. * Convenience method to set up the matcher for computing the right-view disparity map
  408. * that is required in case of filtering with confidence.
  409. *
  410. * param matcher_left main stereo matcher instance that will be used with the filter
  411. * return automatically generated
  412. */
  413. public static StereoMatcher createRightMatcher(StereoMatcher matcher_left)
  414. {
  415. if (matcher_left != null) matcher_left.ThrowIfDisposed();
  416. return StereoMatcher.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createRightMatcher_10(matcher_left.getNativeObjAddr())));
  417. }
  418. //
  419. // C++: Ptr_DisparityWLSFilter cv::ximgproc::createDisparityWLSFilterGeneric(bool use_confidence)
  420. //
  421. /**
  422. * More generic factory method, create instance of DisparityWLSFilter and execute basic
  423. * initialization routines. When using this method you will need to set-up the ROI, matchers and
  424. * other parameters by yourself.
  425. *
  426. * param use_confidence filtering with confidence requires two disparity maps (for the left and right views) and is
  427. * approximately two times slower. However, quality is typically significantly better.
  428. * return automatically generated
  429. */
  430. public static DisparityWLSFilter createDisparityWLSFilterGeneric(bool use_confidence)
  431. {
  432. return DisparityWLSFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createDisparityWLSFilterGeneric_10(use_confidence)));
  433. }
  434. //
  435. // C++: int cv::ximgproc::readGT(String src_path, Mat& dst)
  436. //
  437. /**
  438. * Function for reading ground truth disparity maps. Supports basic Middlebury
  439. * and MPI-Sintel formats. Note that the resulting disparity map is scaled by 16.
  440. *
  441. * param src_path path to the image, containing ground-truth disparity map
  442. *
  443. * param dst output disparity map, CV_16S depth
  444. *
  445. * return returns zero if successfully read the ground truth
  446. */
  447. public static int readGT(string src_path, Mat dst)
  448. {
  449. if (dst != null) dst.ThrowIfDisposed();
  450. return ximgproc_Ximgproc_readGT_10(src_path, dst.nativeObj);
  451. }
  452. //
  453. // C++: double cv::ximgproc::computeMSE(Mat GT, Mat src, Rect ROI)
  454. //
  455. /**
  456. * Function for computing mean square error for disparity maps
  457. *
  458. * param GT ground truth disparity map
  459. *
  460. * param src disparity map to evaluate
  461. *
  462. * param ROI region of interest
  463. *
  464. * return returns mean square error between GT and src
  465. */
  466. public static double computeMSE(Mat GT, Mat src, Rect ROI)
  467. {
  468. if (GT != null) GT.ThrowIfDisposed();
  469. if (src != null) src.ThrowIfDisposed();
  470. return ximgproc_Ximgproc_computeMSE_10(GT.nativeObj, src.nativeObj, ROI.x, ROI.y, ROI.width, ROI.height);
  471. }
  472. //
  473. // C++: double cv::ximgproc::computeBadPixelPercent(Mat GT, Mat src, Rect ROI, int thresh = 24)
  474. //
  475. /**
  476. * Function for computing the percent of "bad" pixels in the disparity map
  477. * (pixels where error is higher than a specified threshold)
  478. *
  479. * param GT ground truth disparity map
  480. *
  481. * param src disparity map to evaluate
  482. *
  483. * param ROI region of interest
  484. *
  485. * param thresh threshold used to determine "bad" pixels
  486. *
  487. * return returns mean square error between GT and src
  488. */
  489. public static double computeBadPixelPercent(Mat GT, Mat src, Rect ROI, int thresh)
  490. {
  491. if (GT != null) GT.ThrowIfDisposed();
  492. if (src != null) src.ThrowIfDisposed();
  493. return ximgproc_Ximgproc_computeBadPixelPercent_10(GT.nativeObj, src.nativeObj, ROI.x, ROI.y, ROI.width, ROI.height, thresh);
  494. }
  495. /**
  496. * Function for computing the percent of "bad" pixels in the disparity map
  497. * (pixels where error is higher than a specified threshold)
  498. *
  499. * param GT ground truth disparity map
  500. *
  501. * param src disparity map to evaluate
  502. *
  503. * param ROI region of interest
  504. *
  505. *
  506. * return returns mean square error between GT and src
  507. */
  508. public static double computeBadPixelPercent(Mat GT, Mat src, Rect ROI)
  509. {
  510. if (GT != null) GT.ThrowIfDisposed();
  511. if (src != null) src.ThrowIfDisposed();
  512. return ximgproc_Ximgproc_computeBadPixelPercent_11(GT.nativeObj, src.nativeObj, ROI.x, ROI.y, ROI.width, ROI.height);
  513. }
  514. //
  515. // C++: void cv::ximgproc::getDisparityVis(Mat src, Mat& dst, double scale = 1.0)
  516. //
  517. /**
  518. * Function for creating a disparity map visualization (clamped CV_8U image)
  519. *
  520. * param src input disparity map (CV_16S depth)
  521. *
  522. * param dst output visualization
  523. *
  524. * param scale disparity map will be multiplied by this value for visualization
  525. */
  526. public static void getDisparityVis(Mat src, Mat dst, double scale)
  527. {
  528. if (src != null) src.ThrowIfDisposed();
  529. if (dst != null) dst.ThrowIfDisposed();
  530. ximgproc_Ximgproc_getDisparityVis_10(src.nativeObj, dst.nativeObj, scale);
  531. }
  532. /**
  533. * Function for creating a disparity map visualization (clamped CV_8U image)
  534. *
  535. * param src input disparity map (CV_16S depth)
  536. *
  537. * param dst output visualization
  538. *
  539. */
  540. public static void getDisparityVis(Mat src, Mat dst)
  541. {
  542. if (src != null) src.ThrowIfDisposed();
  543. if (dst != null) dst.ThrowIfDisposed();
  544. ximgproc_Ximgproc_getDisparityVis_11(src.nativeObj, dst.nativeObj);
  545. }
  546. //
  547. // C++: Ptr_EdgeBoxes cv::ximgproc::createEdgeBoxes(float alpha = 0.65f, float beta = 0.75f, float eta = 1, float minScore = 0.01f, int maxBoxes = 10000, float edgeMinMag = 0.1f, float edgeMergeThr = 0.5f, float clusterMinMag = 0.5f, float maxAspectRatio = 3, float minBoxArea = 1000, float gamma = 2, float kappa = 1.5f)
  548. //
  549. /**
  550. * Creates a Edgeboxes
  551. *
  552. * param alpha step size of sliding window search.
  553. * param beta nms threshold for object proposals.
  554. * param eta adaptation rate for nms threshold.
  555. * param minScore min score of boxes to detect.
  556. * param maxBoxes max number of boxes to detect.
  557. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  558. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  559. * param clusterMinMag cluster min magnitude. Increase to trade off accuracy for speed.
  560. * param maxAspectRatio max aspect ratio of boxes.
  561. * param minBoxArea minimum area of boxes.
  562. * param gamma affinity sensitivity.
  563. * param kappa scale sensitivity.
  564. * return automatically generated
  565. */
  566. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma, float kappa)
  567. {
  568. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_10(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr, clusterMinMag, maxAspectRatio, minBoxArea, gamma, kappa)));
  569. }
  570. /**
  571. * Creates a Edgeboxes
  572. *
  573. * param alpha step size of sliding window search.
  574. * param beta nms threshold for object proposals.
  575. * param eta adaptation rate for nms threshold.
  576. * param minScore min score of boxes to detect.
  577. * param maxBoxes max number of boxes to detect.
  578. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  579. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  580. * param clusterMinMag cluster min magnitude. Increase to trade off accuracy for speed.
  581. * param maxAspectRatio max aspect ratio of boxes.
  582. * param minBoxArea minimum area of boxes.
  583. * param gamma affinity sensitivity.
  584. * return automatically generated
  585. */
  586. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma)
  587. {
  588. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_11(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr, clusterMinMag, maxAspectRatio, minBoxArea, gamma)));
  589. }
  590. /**
  591. * Creates a Edgeboxes
  592. *
  593. * param alpha step size of sliding window search.
  594. * param beta nms threshold for object proposals.
  595. * param eta adaptation rate for nms threshold.
  596. * param minScore min score of boxes to detect.
  597. * param maxBoxes max number of boxes to detect.
  598. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  599. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  600. * param clusterMinMag cluster min magnitude. Increase to trade off accuracy for speed.
  601. * param maxAspectRatio max aspect ratio of boxes.
  602. * param minBoxArea minimum area of boxes.
  603. * return automatically generated
  604. */
  605. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea)
  606. {
  607. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_12(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr, clusterMinMag, maxAspectRatio, minBoxArea)));
  608. }
  609. /**
  610. * Creates a Edgeboxes
  611. *
  612. * param alpha step size of sliding window search.
  613. * param beta nms threshold for object proposals.
  614. * param eta adaptation rate for nms threshold.
  615. * param minScore min score of boxes to detect.
  616. * param maxBoxes max number of boxes to detect.
  617. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  618. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  619. * param clusterMinMag cluster min magnitude. Increase to trade off accuracy for speed.
  620. * param maxAspectRatio max aspect ratio of boxes.
  621. * return automatically generated
  622. */
  623. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio)
  624. {
  625. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_13(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr, clusterMinMag, maxAspectRatio)));
  626. }
  627. /**
  628. * Creates a Edgeboxes
  629. *
  630. * param alpha step size of sliding window search.
  631. * param beta nms threshold for object proposals.
  632. * param eta adaptation rate for nms threshold.
  633. * param minScore min score of boxes to detect.
  634. * param maxBoxes max number of boxes to detect.
  635. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  636. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  637. * param clusterMinMag cluster min magnitude. Increase to trade off accuracy for speed.
  638. * return automatically generated
  639. */
  640. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag)
  641. {
  642. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_14(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr, clusterMinMag)));
  643. }
  644. /**
  645. * Creates a Edgeboxes
  646. *
  647. * param alpha step size of sliding window search.
  648. * param beta nms threshold for object proposals.
  649. * param eta adaptation rate for nms threshold.
  650. * param minScore min score of boxes to detect.
  651. * param maxBoxes max number of boxes to detect.
  652. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  653. * param edgeMergeThr edge merge threshold. Increase to trade off accuracy for speed.
  654. * return automatically generated
  655. */
  656. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr)
  657. {
  658. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_15(alpha, beta, eta, minScore, maxBoxes, edgeMinMag, edgeMergeThr)));
  659. }
  660. /**
  661. * Creates a Edgeboxes
  662. *
  663. * param alpha step size of sliding window search.
  664. * param beta nms threshold for object proposals.
  665. * param eta adaptation rate for nms threshold.
  666. * param minScore min score of boxes to detect.
  667. * param maxBoxes max number of boxes to detect.
  668. * param edgeMinMag edge min magnitude. Increase to trade off accuracy for speed.
  669. * return automatically generated
  670. */
  671. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag)
  672. {
  673. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_16(alpha, beta, eta, minScore, maxBoxes, edgeMinMag)));
  674. }
  675. /**
  676. * Creates a Edgeboxes
  677. *
  678. * param alpha step size of sliding window search.
  679. * param beta nms threshold for object proposals.
  680. * param eta adaptation rate for nms threshold.
  681. * param minScore min score of boxes to detect.
  682. * param maxBoxes max number of boxes to detect.
  683. * return automatically generated
  684. */
  685. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore, int maxBoxes)
  686. {
  687. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_17(alpha, beta, eta, minScore, maxBoxes)));
  688. }
  689. /**
  690. * Creates a Edgeboxes
  691. *
  692. * param alpha step size of sliding window search.
  693. * param beta nms threshold for object proposals.
  694. * param eta adaptation rate for nms threshold.
  695. * param minScore min score of boxes to detect.
  696. * return automatically generated
  697. */
  698. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta, float minScore)
  699. {
  700. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_18(alpha, beta, eta, minScore)));
  701. }
  702. /**
  703. * Creates a Edgeboxes
  704. *
  705. * param alpha step size of sliding window search.
  706. * param beta nms threshold for object proposals.
  707. * param eta adaptation rate for nms threshold.
  708. * return automatically generated
  709. */
  710. public static EdgeBoxes createEdgeBoxes(float alpha, float beta, float eta)
  711. {
  712. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_19(alpha, beta, eta)));
  713. }
  714. /**
  715. * Creates a Edgeboxes
  716. *
  717. * param alpha step size of sliding window search.
  718. * param beta nms threshold for object proposals.
  719. * return automatically generated
  720. */
  721. public static EdgeBoxes createEdgeBoxes(float alpha, float beta)
  722. {
  723. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_110(alpha, beta)));
  724. }
  725. /**
  726. * Creates a Edgeboxes
  727. *
  728. * param alpha step size of sliding window search.
  729. * return automatically generated
  730. */
  731. public static EdgeBoxes createEdgeBoxes(float alpha)
  732. {
  733. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_111(alpha)));
  734. }
  735. /**
  736. * Creates a Edgeboxes
  737. *
  738. * return automatically generated
  739. */
  740. public static EdgeBoxes createEdgeBoxes()
  741. {
  742. return EdgeBoxes.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeBoxes_112()));
  743. }
  744. //
  745. // C++: void cv::ximgproc::edgePreservingFilter(Mat src, Mat& dst, int d, double threshold)
  746. //
  747. /**
  748. * Smoothes an image using the Edge-Preserving filter.
  749. *
  750. * The function smoothes Gaussian noise as well as salt &amp; pepper noise.
  751. * For more details about this implementation, please see
  752. * [ReiWoe18] Reich, S. and Wörgötter, F. and Dellen, B. (2018). A Real-Time Edge-Preserving Denoising Filter. Proceedings of the 13th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP): Visapp, 85-94, 4. DOI: 10.5220/0006509000850094.
  753. *
  754. * param src Source 8-bit 3-channel image.
  755. * param dst Destination image of the same size and type as src.
  756. * param d Diameter of each pixel neighborhood that is used during filtering. Must be greater or equal 3.
  757. * param threshold Threshold, which distinguishes between noise, outliers, and data.
  758. */
  759. public static void edgePreservingFilter(Mat src, Mat dst, int d, double threshold)
  760. {
  761. if (src != null) src.ThrowIfDisposed();
  762. if (dst != null) dst.ThrowIfDisposed();
  763. ximgproc_Ximgproc_edgePreservingFilter_10(src.nativeObj, dst.nativeObj, d, threshold);
  764. }
  765. //
  766. // C++: Ptr_EdgeDrawing cv::ximgproc::createEdgeDrawing()
  767. //
  768. /**
  769. * Creates a smart pointer to a EdgeDrawing object and initializes it
  770. * return automatically generated
  771. */
  772. public static EdgeDrawing createEdgeDrawing()
  773. {
  774. return EdgeDrawing.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeDrawing_10()));
  775. }
  776. //
  777. // C++: Ptr_DTFilter cv::ximgproc::createDTFilter(Mat guide, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3)
  778. //
  779. /**
  780. * Factory method, create instance of DTFilter and produce initialization routines.
  781. *
  782. * param guide guided image (used to build transformed distance, which describes edge structure of
  783. * guided image).
  784. *
  785. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  786. * coordinate space into bilateralFilter.
  787. *
  788. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  789. * color space into bilateralFilter.
  790. *
  791. * param mode one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
  792. * filtering 2D signals in the article.
  793. *
  794. * param numIters optional number of iterations used for filtering, 3 is quite enough.
  795. *
  796. * For more details about Domain Transform filter parameters, see the original article CITE: Gastal11 and
  797. * [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/).
  798. * return automatically generated
  799. */
  800. public static DTFilter createDTFilter(Mat guide, double sigmaSpatial, double sigmaColor, int mode, int numIters)
  801. {
  802. if (guide != null) guide.ThrowIfDisposed();
  803. return DTFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createDTFilter_10(guide.nativeObj, sigmaSpatial, sigmaColor, mode, numIters)));
  804. }
  805. /**
  806. * Factory method, create instance of DTFilter and produce initialization routines.
  807. *
  808. * param guide guided image (used to build transformed distance, which describes edge structure of
  809. * guided image).
  810. *
  811. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  812. * coordinate space into bilateralFilter.
  813. *
  814. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  815. * color space into bilateralFilter.
  816. *
  817. * param mode one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
  818. * filtering 2D signals in the article.
  819. *
  820. *
  821. * For more details about Domain Transform filter parameters, see the original article CITE: Gastal11 and
  822. * [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/).
  823. * return automatically generated
  824. */
  825. public static DTFilter createDTFilter(Mat guide, double sigmaSpatial, double sigmaColor, int mode)
  826. {
  827. if (guide != null) guide.ThrowIfDisposed();
  828. return DTFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createDTFilter_11(guide.nativeObj, sigmaSpatial, sigmaColor, mode)));
  829. }
  830. /**
  831. * Factory method, create instance of DTFilter and produce initialization routines.
  832. *
  833. * param guide guided image (used to build transformed distance, which describes edge structure of
  834. * guided image).
  835. *
  836. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  837. * coordinate space into bilateralFilter.
  838. *
  839. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  840. * color space into bilateralFilter.
  841. *
  842. * filtering 2D signals in the article.
  843. *
  844. *
  845. * For more details about Domain Transform filter parameters, see the original article CITE: Gastal11 and
  846. * [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/).
  847. * return automatically generated
  848. */
  849. public static DTFilter createDTFilter(Mat guide, double sigmaSpatial, double sigmaColor)
  850. {
  851. if (guide != null) guide.ThrowIfDisposed();
  852. return DTFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createDTFilter_12(guide.nativeObj, sigmaSpatial, sigmaColor)));
  853. }
  854. //
  855. // C++: void cv::ximgproc::dtFilter(Mat guide, Mat src, Mat& dst, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3)
  856. //
  857. /**
  858. * Simple one-line Domain Transform filter call. If you have multiple images to filter with the same
  859. * guided image then use DTFilter interface to avoid extra computations on initialization stage.
  860. *
  861. * param guide guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit
  862. * depth and up to 4 channels.
  863. * param src filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
  864. * param dst destination image
  865. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  866. * coordinate space into bilateralFilter.
  867. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  868. * color space into bilateralFilter.
  869. * param mode one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
  870. * filtering 2D signals in the article.
  871. * param numIters optional number of iterations used for filtering, 3 is quite enough.
  872. * SEE: bilateralFilter, guidedFilter, amFilter
  873. */
  874. public static void dtFilter(Mat guide, Mat src, Mat dst, double sigmaSpatial, double sigmaColor, int mode, int numIters)
  875. {
  876. if (guide != null) guide.ThrowIfDisposed();
  877. if (src != null) src.ThrowIfDisposed();
  878. if (dst != null) dst.ThrowIfDisposed();
  879. ximgproc_Ximgproc_dtFilter_10(guide.nativeObj, src.nativeObj, dst.nativeObj, sigmaSpatial, sigmaColor, mode, numIters);
  880. }
  881. /**
  882. * Simple one-line Domain Transform filter call. If you have multiple images to filter with the same
  883. * guided image then use DTFilter interface to avoid extra computations on initialization stage.
  884. *
  885. * param guide guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit
  886. * depth and up to 4 channels.
  887. * param src filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
  888. * param dst destination image
  889. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  890. * coordinate space into bilateralFilter.
  891. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  892. * color space into bilateralFilter.
  893. * param mode one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
  894. * filtering 2D signals in the article.
  895. * SEE: bilateralFilter, guidedFilter, amFilter
  896. */
  897. public static void dtFilter(Mat guide, Mat src, Mat dst, double sigmaSpatial, double sigmaColor, int mode)
  898. {
  899. if (guide != null) guide.ThrowIfDisposed();
  900. if (src != null) src.ThrowIfDisposed();
  901. if (dst != null) dst.ThrowIfDisposed();
  902. ximgproc_Ximgproc_dtFilter_11(guide.nativeObj, src.nativeObj, dst.nativeObj, sigmaSpatial, sigmaColor, mode);
  903. }
  904. /**
  905. * Simple one-line Domain Transform filter call. If you have multiple images to filter with the same
  906. * guided image then use DTFilter interface to avoid extra computations on initialization stage.
  907. *
  908. * param guide guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit
  909. * depth and up to 4 channels.
  910. * param src filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
  911. * param dst destination image
  912. * param sigmaSpatial \({\sigma}_H\) parameter in the original article, it's similar to the sigma in the
  913. * coordinate space into bilateralFilter.
  914. * param sigmaColor \({\sigma}_r\) parameter in the original article, it's similar to the sigma in the
  915. * color space into bilateralFilter.
  916. * filtering 2D signals in the article.
  917. * SEE: bilateralFilter, guidedFilter, amFilter
  918. */
  919. public static void dtFilter(Mat guide, Mat src, Mat dst, double sigmaSpatial, double sigmaColor)
  920. {
  921. if (guide != null) guide.ThrowIfDisposed();
  922. if (src != null) src.ThrowIfDisposed();
  923. if (dst != null) dst.ThrowIfDisposed();
  924. ximgproc_Ximgproc_dtFilter_12(guide.nativeObj, src.nativeObj, dst.nativeObj, sigmaSpatial, sigmaColor);
  925. }
  926. //
  927. // C++: Ptr_GuidedFilter cv::ximgproc::createGuidedFilter(Mat guide, int radius, double eps)
  928. //
  929. /**
  930. * Factory method, create instance of GuidedFilter and produce initialization routines.
  931. *
  932. * param guide guided image (or array of images) with up to 3 channels, if it have more then 3
  933. * channels then only first 3 channels will be used.
  934. *
  935. * param radius radius of Guided Filter.
  936. *
  937. * param eps regularization term of Guided Filter. \({eps}^2\) is similar to the sigma in the color
  938. * space into bilateralFilter.
  939. *
  940. * For more details about Guided Filter parameters, see the original article CITE: Kaiming10 .
  941. * return automatically generated
  942. */
  943. public static GuidedFilter createGuidedFilter(Mat guide, int radius, double eps)
  944. {
  945. if (guide != null) guide.ThrowIfDisposed();
  946. return GuidedFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createGuidedFilter_10(guide.nativeObj, radius, eps)));
  947. }
  948. //
  949. // C++: void cv::ximgproc::guidedFilter(Mat guide, Mat src, Mat& dst, int radius, double eps, int dDepth = -1)
  950. //
  951. /**
  952. * Simple one-line Guided Filter call.
  953. *
  954. * If you have multiple images to filter with the same guided image then use GuidedFilter interface to
  955. * avoid extra computations on initialization stage.
  956. *
  957. * param guide guided image (or array of images) with up to 3 channels, if it have more then 3
  958. * channels then only first 3 channels will be used.
  959. *
  960. * param src filtering image with any numbers of channels.
  961. *
  962. * param dst output image.
  963. *
  964. * param radius radius of Guided Filter.
  965. *
  966. * param eps regularization term of Guided Filter. \({eps}^2\) is similar to the sigma in the color
  967. * space into bilateralFilter.
  968. *
  969. * param dDepth optional depth of the output image.
  970. *
  971. * SEE: bilateralFilter, dtFilter, amFilter
  972. */
  973. public static void guidedFilter(Mat guide, Mat src, Mat dst, int radius, double eps, int dDepth)
  974. {
  975. if (guide != null) guide.ThrowIfDisposed();
  976. if (src != null) src.ThrowIfDisposed();
  977. if (dst != null) dst.ThrowIfDisposed();
  978. ximgproc_Ximgproc_guidedFilter_10(guide.nativeObj, src.nativeObj, dst.nativeObj, radius, eps, dDepth);
  979. }
  980. /**
  981. * Simple one-line Guided Filter call.
  982. *
  983. * If you have multiple images to filter with the same guided image then use GuidedFilter interface to
  984. * avoid extra computations on initialization stage.
  985. *
  986. * param guide guided image (or array of images) with up to 3 channels, if it have more then 3
  987. * channels then only first 3 channels will be used.
  988. *
  989. * param src filtering image with any numbers of channels.
  990. *
  991. * param dst output image.
  992. *
  993. * param radius radius of Guided Filter.
  994. *
  995. * param eps regularization term of Guided Filter. \({eps}^2\) is similar to the sigma in the color
  996. * space into bilateralFilter.
  997. *
  998. *
  999. * SEE: bilateralFilter, dtFilter, amFilter
  1000. */
  1001. public static void guidedFilter(Mat guide, Mat src, Mat dst, int radius, double eps)
  1002. {
  1003. if (guide != null) guide.ThrowIfDisposed();
  1004. if (src != null) src.ThrowIfDisposed();
  1005. if (dst != null) dst.ThrowIfDisposed();
  1006. ximgproc_Ximgproc_guidedFilter_11(guide.nativeObj, src.nativeObj, dst.nativeObj, radius, eps);
  1007. }
  1008. //
  1009. // C++: Ptr_AdaptiveManifoldFilter cv::ximgproc::createAMFilter(double sigma_s, double sigma_r, bool adjust_outliers = false)
  1010. //
  1011. /**
  1012. * Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.
  1013. *
  1014. * param sigma_s spatial standard deviation.
  1015. *
  1016. * param sigma_r color space standard deviation, it is similar to the sigma in the color space into
  1017. * bilateralFilter.
  1018. *
  1019. * param adjust_outliers optional, specify perform outliers adjust operation or not, (Eq. 9) in the
  1020. * original paper.
  1021. *
  1022. * For more details about Adaptive Manifold Filter parameters, see the original article CITE: Gastal12 .
  1023. *
  1024. * <b>Note:</b> Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
  1025. * color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
  1026. * sigmas in bilateralFilter and dtFilter functions.
  1027. * return automatically generated
  1028. */
  1029. public static AdaptiveManifoldFilter createAMFilter(double sigma_s, double sigma_r, bool adjust_outliers)
  1030. {
  1031. return AdaptiveManifoldFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createAMFilter_10(sigma_s, sigma_r, adjust_outliers)));
  1032. }
  1033. /**
  1034. * Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.
  1035. *
  1036. * param sigma_s spatial standard deviation.
  1037. *
  1038. * param sigma_r color space standard deviation, it is similar to the sigma in the color space into
  1039. * bilateralFilter.
  1040. *
  1041. * original paper.
  1042. *
  1043. * For more details about Adaptive Manifold Filter parameters, see the original article CITE: Gastal12 .
  1044. *
  1045. * <b>Note:</b> Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
  1046. * color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
  1047. * sigmas in bilateralFilter and dtFilter functions.
  1048. * return automatically generated
  1049. */
  1050. public static AdaptiveManifoldFilter createAMFilter(double sigma_s, double sigma_r)
  1051. {
  1052. return AdaptiveManifoldFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createAMFilter_11(sigma_s, sigma_r)));
  1053. }
  1054. //
  1055. // C++: void cv::ximgproc::amFilter(Mat joint, Mat src, Mat& dst, double sigma_s, double sigma_r, bool adjust_outliers = false)
  1056. //
  1057. /**
  1058. * Simple one-line Adaptive Manifold Filter call.
  1059. *
  1060. * param joint joint (also called as guided) image or array of images with any numbers of channels.
  1061. *
  1062. * param src filtering image with any numbers of channels.
  1063. *
  1064. * param dst output image.
  1065. *
  1066. * param sigma_s spatial standard deviation.
  1067. *
  1068. * param sigma_r color space standard deviation, it is similar to the sigma in the color space into
  1069. * bilateralFilter.
  1070. *
  1071. * param adjust_outliers optional, specify perform outliers adjust operation or not, (Eq. 9) in the
  1072. * original paper.
  1073. *
  1074. * <b>Note:</b> Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
  1075. * color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
  1076. * sigmas in bilateralFilter and dtFilter functions. SEE: bilateralFilter, dtFilter, guidedFilter
  1077. */
  1078. public static void amFilter(Mat joint, Mat src, Mat dst, double sigma_s, double sigma_r, bool adjust_outliers)
  1079. {
  1080. if (joint != null) joint.ThrowIfDisposed();
  1081. if (src != null) src.ThrowIfDisposed();
  1082. if (dst != null) dst.ThrowIfDisposed();
  1083. ximgproc_Ximgproc_amFilter_10(joint.nativeObj, src.nativeObj, dst.nativeObj, sigma_s, sigma_r, adjust_outliers);
  1084. }
  1085. /**
  1086. * Simple one-line Adaptive Manifold Filter call.
  1087. *
  1088. * param joint joint (also called as guided) image or array of images with any numbers of channels.
  1089. *
  1090. * param src filtering image with any numbers of channels.
  1091. *
  1092. * param dst output image.
  1093. *
  1094. * param sigma_s spatial standard deviation.
  1095. *
  1096. * param sigma_r color space standard deviation, it is similar to the sigma in the color space into
  1097. * bilateralFilter.
  1098. *
  1099. * original paper.
  1100. *
  1101. * <b>Note:</b> Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
  1102. * color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
  1103. * sigmas in bilateralFilter and dtFilter functions. SEE: bilateralFilter, dtFilter, guidedFilter
  1104. */
  1105. public static void amFilter(Mat joint, Mat src, Mat dst, double sigma_s, double sigma_r)
  1106. {
  1107. if (joint != null) joint.ThrowIfDisposed();
  1108. if (src != null) src.ThrowIfDisposed();
  1109. if (dst != null) dst.ThrowIfDisposed();
  1110. ximgproc_Ximgproc_amFilter_11(joint.nativeObj, src.nativeObj, dst.nativeObj, sigma_s, sigma_r);
  1111. }
  1112. //
  1113. // C++: void cv::ximgproc::jointBilateralFilter(Mat joint, Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
  1114. //
  1115. /**
  1116. * Applies the joint bilateral filter to an image.
  1117. *
  1118. * param joint Joint 8-bit or floating-point, 1-channel or 3-channel image.
  1119. *
  1120. * param src Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint
  1121. * image.
  1122. *
  1123. * param dst Destination image of the same size and type as src .
  1124. *
  1125. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1126. * it is computed from sigmaSpace .
  1127. *
  1128. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1129. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1130. * larger areas of semi-equal color.
  1131. *
  1132. * param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that
  1133. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1134. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1135. * proportional to sigmaSpace .
  1136. *
  1137. * param borderType
  1138. *
  1139. * <b>Note:</b> bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors.
  1140. *
  1141. * SEE: bilateralFilter, amFilter
  1142. */
  1143. public static void jointBilateralFilter(Mat joint, Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int borderType)
  1144. {
  1145. if (joint != null) joint.ThrowIfDisposed();
  1146. if (src != null) src.ThrowIfDisposed();
  1147. if (dst != null) dst.ThrowIfDisposed();
  1148. ximgproc_Ximgproc_jointBilateralFilter_10(joint.nativeObj, src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace, borderType);
  1149. }
  1150. /**
  1151. * Applies the joint bilateral filter to an image.
  1152. *
  1153. * param joint Joint 8-bit or floating-point, 1-channel or 3-channel image.
  1154. *
  1155. * param src Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint
  1156. * image.
  1157. *
  1158. * param dst Destination image of the same size and type as src .
  1159. *
  1160. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1161. * it is computed from sigmaSpace .
  1162. *
  1163. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1164. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1165. * larger areas of semi-equal color.
  1166. *
  1167. * param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that
  1168. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1169. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1170. * proportional to sigmaSpace .
  1171. *
  1172. *
  1173. * <b>Note:</b> bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors.
  1174. *
  1175. * SEE: bilateralFilter, amFilter
  1176. */
  1177. public static void jointBilateralFilter(Mat joint, Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace)
  1178. {
  1179. if (joint != null) joint.ThrowIfDisposed();
  1180. if (src != null) src.ThrowIfDisposed();
  1181. if (dst != null) dst.ThrowIfDisposed();
  1182. ximgproc_Ximgproc_jointBilateralFilter_11(joint.nativeObj, src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace);
  1183. }
  1184. //
  1185. // C++: void cv::ximgproc::bilateralTextureFilter(Mat src, Mat& dst, int fr = 3, int numIter = 1, double sigmaAlpha = -1., double sigmaAvg = -1.)
  1186. //
  1187. /**
  1188. * Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
  1189. * For more details about this filter see CITE: Cho2014.
  1190. *
  1191. * param src Source image whose depth is 8-bit UINT or 32-bit FLOAT
  1192. *
  1193. * param dst Destination image of the same size and type as src.
  1194. *
  1195. * param fr Radius of kernel to be used for filtering. It should be positive integer
  1196. *
  1197. * param numIter Number of iterations of algorithm, It should be positive integer
  1198. *
  1199. * param sigmaAlpha Controls the sharpness of the weight transition from edges to smooth/texture regions, where
  1200. * a bigger value means sharper transition. When the value is negative, it is automatically calculated.
  1201. *
  1202. * param sigmaAvg Range blur parameter for texture blurring. Larger value makes result to be more blurred. When the
  1203. * value is negative, it is automatically calculated as described in the paper.
  1204. *
  1205. * SEE: rollingGuidanceFilter, bilateralFilter
  1206. */
  1207. public static void bilateralTextureFilter(Mat src, Mat dst, int fr, int numIter, double sigmaAlpha, double sigmaAvg)
  1208. {
  1209. if (src != null) src.ThrowIfDisposed();
  1210. if (dst != null) dst.ThrowIfDisposed();
  1211. ximgproc_Ximgproc_bilateralTextureFilter_10(src.nativeObj, dst.nativeObj, fr, numIter, sigmaAlpha, sigmaAvg);
  1212. }
  1213. /**
  1214. * Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
  1215. * For more details about this filter see CITE: Cho2014.
  1216. *
  1217. * param src Source image whose depth is 8-bit UINT or 32-bit FLOAT
  1218. *
  1219. * param dst Destination image of the same size and type as src.
  1220. *
  1221. * param fr Radius of kernel to be used for filtering. It should be positive integer
  1222. *
  1223. * param numIter Number of iterations of algorithm, It should be positive integer
  1224. *
  1225. * param sigmaAlpha Controls the sharpness of the weight transition from edges to smooth/texture regions, where
  1226. * a bigger value means sharper transition. When the value is negative, it is automatically calculated.
  1227. *
  1228. * value is negative, it is automatically calculated as described in the paper.
  1229. *
  1230. * SEE: rollingGuidanceFilter, bilateralFilter
  1231. */
  1232. public static void bilateralTextureFilter(Mat src, Mat dst, int fr, int numIter, double sigmaAlpha)
  1233. {
  1234. if (src != null) src.ThrowIfDisposed();
  1235. if (dst != null) dst.ThrowIfDisposed();
  1236. ximgproc_Ximgproc_bilateralTextureFilter_11(src.nativeObj, dst.nativeObj, fr, numIter, sigmaAlpha);
  1237. }
  1238. /**
  1239. * Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
  1240. * For more details about this filter see CITE: Cho2014.
  1241. *
  1242. * param src Source image whose depth is 8-bit UINT or 32-bit FLOAT
  1243. *
  1244. * param dst Destination image of the same size and type as src.
  1245. *
  1246. * param fr Radius of kernel to be used for filtering. It should be positive integer
  1247. *
  1248. * param numIter Number of iterations of algorithm, It should be positive integer
  1249. *
  1250. * a bigger value means sharper transition. When the value is negative, it is automatically calculated.
  1251. *
  1252. * value is negative, it is automatically calculated as described in the paper.
  1253. *
  1254. * SEE: rollingGuidanceFilter, bilateralFilter
  1255. */
  1256. public static void bilateralTextureFilter(Mat src, Mat dst, int fr, int numIter)
  1257. {
  1258. if (src != null) src.ThrowIfDisposed();
  1259. if (dst != null) dst.ThrowIfDisposed();
  1260. ximgproc_Ximgproc_bilateralTextureFilter_12(src.nativeObj, dst.nativeObj, fr, numIter);
  1261. }
  1262. /**
  1263. * Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
  1264. * For more details about this filter see CITE: Cho2014.
  1265. *
  1266. * param src Source image whose depth is 8-bit UINT or 32-bit FLOAT
  1267. *
  1268. * param dst Destination image of the same size and type as src.
  1269. *
  1270. * param fr Radius of kernel to be used for filtering. It should be positive integer
  1271. *
  1272. *
  1273. * a bigger value means sharper transition. When the value is negative, it is automatically calculated.
  1274. *
  1275. * value is negative, it is automatically calculated as described in the paper.
  1276. *
  1277. * SEE: rollingGuidanceFilter, bilateralFilter
  1278. */
  1279. public static void bilateralTextureFilter(Mat src, Mat dst, int fr)
  1280. {
  1281. if (src != null) src.ThrowIfDisposed();
  1282. if (dst != null) dst.ThrowIfDisposed();
  1283. ximgproc_Ximgproc_bilateralTextureFilter_13(src.nativeObj, dst.nativeObj, fr);
  1284. }
  1285. /**
  1286. * Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
  1287. * For more details about this filter see CITE: Cho2014.
  1288. *
  1289. * param src Source image whose depth is 8-bit UINT or 32-bit FLOAT
  1290. *
  1291. * param dst Destination image of the same size and type as src.
  1292. *
  1293. *
  1294. *
  1295. * a bigger value means sharper transition. When the value is negative, it is automatically calculated.
  1296. *
  1297. * value is negative, it is automatically calculated as described in the paper.
  1298. *
  1299. * SEE: rollingGuidanceFilter, bilateralFilter
  1300. */
  1301. public static void bilateralTextureFilter(Mat src, Mat dst)
  1302. {
  1303. if (src != null) src.ThrowIfDisposed();
  1304. if (dst != null) dst.ThrowIfDisposed();
  1305. ximgproc_Ximgproc_bilateralTextureFilter_14(src.nativeObj, dst.nativeObj);
  1306. }
  1307. //
  1308. // C++: void cv::ximgproc::rollingGuidanceFilter(Mat src, Mat& dst, int d = -1, double sigmaColor = 25, double sigmaSpace = 3, int numOfIter = 4, int borderType = BORDER_DEFAULT)
  1309. //
  1310. /**
  1311. * Applies the rolling guidance filter to an image.
  1312. *
  1313. * For more details, please see CITE: zhang2014rolling
  1314. *
  1315. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1316. *
  1317. * param dst Destination image of the same size and type as src.
  1318. *
  1319. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1320. * it is computed from sigmaSpace .
  1321. *
  1322. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1323. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1324. * larger areas of semi-equal color.
  1325. *
  1326. * param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that
  1327. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1328. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1329. * proportional to sigmaSpace .
  1330. *
  1331. * param numOfIter Number of iterations of joint edge-preserving filtering applied on the source image.
  1332. *
  1333. * param borderType
  1334. *
  1335. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1336. *
  1337. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1338. */
  1339. public static void rollingGuidanceFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType)
  1340. {
  1341. if (src != null) src.ThrowIfDisposed();
  1342. if (dst != null) dst.ThrowIfDisposed();
  1343. ximgproc_Ximgproc_rollingGuidanceFilter_10(src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace, numOfIter, borderType);
  1344. }
  1345. /**
  1346. * Applies the rolling guidance filter to an image.
  1347. *
  1348. * For more details, please see CITE: zhang2014rolling
  1349. *
  1350. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1351. *
  1352. * param dst Destination image of the same size and type as src.
  1353. *
  1354. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1355. * it is computed from sigmaSpace .
  1356. *
  1357. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1358. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1359. * larger areas of semi-equal color.
  1360. *
  1361. * param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that
  1362. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1363. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1364. * proportional to sigmaSpace .
  1365. *
  1366. * param numOfIter Number of iterations of joint edge-preserving filtering applied on the source image.
  1367. *
  1368. *
  1369. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1370. *
  1371. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1372. */
  1373. public static void rollingGuidanceFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int numOfIter)
  1374. {
  1375. if (src != null) src.ThrowIfDisposed();
  1376. if (dst != null) dst.ThrowIfDisposed();
  1377. ximgproc_Ximgproc_rollingGuidanceFilter_11(src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace, numOfIter);
  1378. }
  1379. /**
  1380. * Applies the rolling guidance filter to an image.
  1381. *
  1382. * For more details, please see CITE: zhang2014rolling
  1383. *
  1384. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1385. *
  1386. * param dst Destination image of the same size and type as src.
  1387. *
  1388. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1389. * it is computed from sigmaSpace .
  1390. *
  1391. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1392. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1393. * larger areas of semi-equal color.
  1394. *
  1395. * param sigmaSpace Filter sigma in the coordinate space. A larger value of the parameter means that
  1396. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1397. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1398. * proportional to sigmaSpace .
  1399. *
  1400. *
  1401. *
  1402. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1403. *
  1404. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1405. */
  1406. public static void rollingGuidanceFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace)
  1407. {
  1408. if (src != null) src.ThrowIfDisposed();
  1409. if (dst != null) dst.ThrowIfDisposed();
  1410. ximgproc_Ximgproc_rollingGuidanceFilter_12(src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace);
  1411. }
  1412. /**
  1413. * Applies the rolling guidance filter to an image.
  1414. *
  1415. * For more details, please see CITE: zhang2014rolling
  1416. *
  1417. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1418. *
  1419. * param dst Destination image of the same size and type as src.
  1420. *
  1421. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1422. * it is computed from sigmaSpace .
  1423. *
  1424. * param sigmaColor Filter sigma in the color space. A larger value of the parameter means that
  1425. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1426. * larger areas of semi-equal color.
  1427. *
  1428. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1429. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1430. * proportional to sigmaSpace .
  1431. *
  1432. *
  1433. *
  1434. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1435. *
  1436. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1437. */
  1438. public static void rollingGuidanceFilter(Mat src, Mat dst, int d, double sigmaColor)
  1439. {
  1440. if (src != null) src.ThrowIfDisposed();
  1441. if (dst != null) dst.ThrowIfDisposed();
  1442. ximgproc_Ximgproc_rollingGuidanceFilter_13(src.nativeObj, dst.nativeObj, d, sigmaColor);
  1443. }
  1444. /**
  1445. * Applies the rolling guidance filter to an image.
  1446. *
  1447. * For more details, please see CITE: zhang2014rolling
  1448. *
  1449. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1450. *
  1451. * param dst Destination image of the same size and type as src.
  1452. *
  1453. * param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
  1454. * it is computed from sigmaSpace .
  1455. *
  1456. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1457. * larger areas of semi-equal color.
  1458. *
  1459. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1460. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1461. * proportional to sigmaSpace .
  1462. *
  1463. *
  1464. *
  1465. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1466. *
  1467. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1468. */
  1469. public static void rollingGuidanceFilter(Mat src, Mat dst, int d)
  1470. {
  1471. if (src != null) src.ThrowIfDisposed();
  1472. if (dst != null) dst.ThrowIfDisposed();
  1473. ximgproc_Ximgproc_rollingGuidanceFilter_14(src.nativeObj, dst.nativeObj, d);
  1474. }
  1475. /**
  1476. * Applies the rolling guidance filter to an image.
  1477. *
  1478. * For more details, please see CITE: zhang2014rolling
  1479. *
  1480. * param src Source 8-bit or floating-point, 1-channel or 3-channel image.
  1481. *
  1482. * param dst Destination image of the same size and type as src.
  1483. *
  1484. * it is computed from sigmaSpace .
  1485. *
  1486. * farther colors within the pixel neighborhood (see sigmaSpace ) will be mixed together, resulting in
  1487. * larger areas of semi-equal color.
  1488. *
  1489. * farther pixels will influence each other as long as their colors are close enough (see sigmaColor ).
  1490. * When d&gt;0 , it specifies the neighborhood size regardless of sigmaSpace . Otherwise, d is
  1491. * proportional to sigmaSpace .
  1492. *
  1493. *
  1494. *
  1495. * <b>Note:</b> rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
  1496. *
  1497. * SEE: jointBilateralFilter, bilateralFilter, amFilter
  1498. */
  1499. public static void rollingGuidanceFilter(Mat src, Mat dst)
  1500. {
  1501. if (src != null) src.ThrowIfDisposed();
  1502. if (dst != null) dst.ThrowIfDisposed();
  1503. ximgproc_Ximgproc_rollingGuidanceFilter_15(src.nativeObj, dst.nativeObj);
  1504. }
  1505. //
  1506. // C++: Ptr_FastBilateralSolverFilter cv::ximgproc::createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda = 128.0, int num_iter = 25, double max_tol = 1e-5)
  1507. //
  1508. /**
  1509. * Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
  1510. *
  1511. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1512. *
  1513. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1514. *
  1515. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1516. *
  1517. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1518. *
  1519. * param lambda smoothness strength parameter for solver.
  1520. *
  1521. * param num_iter number of iterations used for solver, 25 is usually enough.
  1522. *
  1523. * param max_tol convergence tolerance used for solver.
  1524. *
  1525. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1526. * return automatically generated
  1527. */
  1528. public static FastBilateralSolverFilter createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter, double max_tol)
  1529. {
  1530. if (guide != null) guide.ThrowIfDisposed();
  1531. return FastBilateralSolverFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastBilateralSolverFilter_10(guide.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter, max_tol)));
  1532. }
  1533. /**
  1534. * Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
  1535. *
  1536. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1537. *
  1538. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1539. *
  1540. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1541. *
  1542. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1543. *
  1544. * param lambda smoothness strength parameter for solver.
  1545. *
  1546. * param num_iter number of iterations used for solver, 25 is usually enough.
  1547. *
  1548. *
  1549. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1550. * return automatically generated
  1551. */
  1552. public static FastBilateralSolverFilter createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter)
  1553. {
  1554. if (guide != null) guide.ThrowIfDisposed();
  1555. return FastBilateralSolverFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastBilateralSolverFilter_11(guide.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter)));
  1556. }
  1557. /**
  1558. * Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
  1559. *
  1560. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1561. *
  1562. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1563. *
  1564. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1565. *
  1566. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1567. *
  1568. * param lambda smoothness strength parameter for solver.
  1569. *
  1570. *
  1571. *
  1572. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1573. * return automatically generated
  1574. */
  1575. public static FastBilateralSolverFilter createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda)
  1576. {
  1577. if (guide != null) guide.ThrowIfDisposed();
  1578. return FastBilateralSolverFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastBilateralSolverFilter_12(guide.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda)));
  1579. }
  1580. /**
  1581. * Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
  1582. *
  1583. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1584. *
  1585. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1586. *
  1587. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1588. *
  1589. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1590. *
  1591. *
  1592. *
  1593. *
  1594. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1595. * return automatically generated
  1596. */
  1597. public static FastBilateralSolverFilter createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma)
  1598. {
  1599. if (guide != null) guide.ThrowIfDisposed();
  1600. return FastBilateralSolverFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastBilateralSolverFilter_13(guide.nativeObj, sigma_spatial, sigma_luma, sigma_chroma)));
  1601. }
  1602. //
  1603. // C++: void cv::ximgproc::fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat& dst, double sigma_spatial = 8, double sigma_luma = 8, double sigma_chroma = 8, double lambda = 128.0, int num_iter = 25, double max_tol = 1e-5)
  1604. //
  1605. /**
  1606. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1607. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1608. *
  1609. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1610. *
  1611. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1612. *
  1613. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1614. *
  1615. * param dst destination image.
  1616. *
  1617. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1618. *
  1619. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1620. *
  1621. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1622. *
  1623. * param lambda smoothness strength parameter for solver.
  1624. *
  1625. * param num_iter number of iterations used for solver, 25 is usually enough.
  1626. *
  1627. * param max_tol convergence tolerance used for solver.
  1628. *
  1629. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1630. *
  1631. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1632. */
  1633. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter, double max_tol)
  1634. {
  1635. if (guide != null) guide.ThrowIfDisposed();
  1636. if (src != null) src.ThrowIfDisposed();
  1637. if (confidence != null) confidence.ThrowIfDisposed();
  1638. if (dst != null) dst.ThrowIfDisposed();
  1639. ximgproc_Ximgproc_fastBilateralSolverFilter_10(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter, max_tol);
  1640. }
  1641. /**
  1642. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1643. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1644. *
  1645. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1646. *
  1647. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1648. *
  1649. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1650. *
  1651. * param dst destination image.
  1652. *
  1653. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1654. *
  1655. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1656. *
  1657. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1658. *
  1659. * param lambda smoothness strength parameter for solver.
  1660. *
  1661. * param num_iter number of iterations used for solver, 25 is usually enough.
  1662. *
  1663. *
  1664. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1665. *
  1666. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1667. */
  1668. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter)
  1669. {
  1670. if (guide != null) guide.ThrowIfDisposed();
  1671. if (src != null) src.ThrowIfDisposed();
  1672. if (confidence != null) confidence.ThrowIfDisposed();
  1673. if (dst != null) dst.ThrowIfDisposed();
  1674. ximgproc_Ximgproc_fastBilateralSolverFilter_11(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter);
  1675. }
  1676. /**
  1677. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1678. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1679. *
  1680. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1681. *
  1682. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1683. *
  1684. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1685. *
  1686. * param dst destination image.
  1687. *
  1688. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1689. *
  1690. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1691. *
  1692. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1693. *
  1694. * param lambda smoothness strength parameter for solver.
  1695. *
  1696. *
  1697. *
  1698. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1699. *
  1700. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1701. */
  1702. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda)
  1703. {
  1704. if (guide != null) guide.ThrowIfDisposed();
  1705. if (src != null) src.ThrowIfDisposed();
  1706. if (confidence != null) confidence.ThrowIfDisposed();
  1707. if (dst != null) dst.ThrowIfDisposed();
  1708. ximgproc_Ximgproc_fastBilateralSolverFilter_12(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial, sigma_luma, sigma_chroma, lambda);
  1709. }
  1710. /**
  1711. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1712. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1713. *
  1714. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1715. *
  1716. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1717. *
  1718. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1719. *
  1720. * param dst destination image.
  1721. *
  1722. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1723. *
  1724. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1725. *
  1726. * param sigma_chroma parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
  1727. *
  1728. *
  1729. *
  1730. *
  1731. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1732. *
  1733. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1734. */
  1735. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial, double sigma_luma, double sigma_chroma)
  1736. {
  1737. if (guide != null) guide.ThrowIfDisposed();
  1738. if (src != null) src.ThrowIfDisposed();
  1739. if (confidence != null) confidence.ThrowIfDisposed();
  1740. if (dst != null) dst.ThrowIfDisposed();
  1741. ximgproc_Ximgproc_fastBilateralSolverFilter_13(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial, sigma_luma, sigma_chroma);
  1742. }
  1743. /**
  1744. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1745. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1746. *
  1747. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1748. *
  1749. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1750. *
  1751. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1752. *
  1753. * param dst destination image.
  1754. *
  1755. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1756. *
  1757. * param sigma_luma parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
  1758. *
  1759. *
  1760. *
  1761. *
  1762. *
  1763. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1764. *
  1765. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1766. */
  1767. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial, double sigma_luma)
  1768. {
  1769. if (guide != null) guide.ThrowIfDisposed();
  1770. if (src != null) src.ThrowIfDisposed();
  1771. if (confidence != null) confidence.ThrowIfDisposed();
  1772. if (dst != null) dst.ThrowIfDisposed();
  1773. ximgproc_Ximgproc_fastBilateralSolverFilter_14(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial, sigma_luma);
  1774. }
  1775. /**
  1776. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1777. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1778. *
  1779. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1780. *
  1781. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1782. *
  1783. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1784. *
  1785. * param dst destination image.
  1786. *
  1787. * param sigma_spatial parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
  1788. *
  1789. *
  1790. *
  1791. *
  1792. *
  1793. *
  1794. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1795. *
  1796. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1797. */
  1798. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst, double sigma_spatial)
  1799. {
  1800. if (guide != null) guide.ThrowIfDisposed();
  1801. if (src != null) src.ThrowIfDisposed();
  1802. if (confidence != null) confidence.ThrowIfDisposed();
  1803. if (dst != null) dst.ThrowIfDisposed();
  1804. ximgproc_Ximgproc_fastBilateralSolverFilter_15(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj, sigma_spatial);
  1805. }
  1806. /**
  1807. * Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
  1808. * guide then use FastBilateralSolverFilter interface to avoid extra computations.
  1809. *
  1810. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1811. *
  1812. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1813. *
  1814. * param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
  1815. *
  1816. * param dst destination image.
  1817. *
  1818. *
  1819. *
  1820. *
  1821. *
  1822. *
  1823. *
  1824. * For more details about the Fast Bilateral Solver parameters, see the original paper CITE: BarronPoole2016.
  1825. *
  1826. * <b>Note:</b> Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
  1827. */
  1828. public static void fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat dst)
  1829. {
  1830. if (guide != null) guide.ThrowIfDisposed();
  1831. if (src != null) src.ThrowIfDisposed();
  1832. if (confidence != null) confidence.ThrowIfDisposed();
  1833. if (dst != null) dst.ThrowIfDisposed();
  1834. ximgproc_Ximgproc_fastBilateralSolverFilter_16(guide.nativeObj, src.nativeObj, confidence.nativeObj, dst.nativeObj);
  1835. }
  1836. //
  1837. // C++: Ptr_FastGlobalSmootherFilter cv::ximgproc::createFastGlobalSmootherFilter(Mat guide, double lambda, double sigma_color, double lambda_attenuation = 0.25, int num_iter = 3)
  1838. //
  1839. /**
  1840. * Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
  1841. *
  1842. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1843. *
  1844. * param lambda parameter defining the amount of regularization
  1845. *
  1846. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1847. *
  1848. * param lambda_attenuation internal parameter, defining how much lambda decreases after each iteration. Normally,
  1849. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1850. *
  1851. * param num_iter number of iterations used for filtering, 3 is usually enough.
  1852. *
  1853. * For more details about Fast Global Smoother parameters, see the original paper CITE: Min2014. However, please note that
  1854. * there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not
  1855. * expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to
  1856. * achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors
  1857. * propose to dynamically update the guide image after each iteration. To maximize the performance this feature
  1858. * was not implemented here.
  1859. * return automatically generated
  1860. */
  1861. public static FastGlobalSmootherFilter createFastGlobalSmootherFilter(Mat guide, double lambda, double sigma_color, double lambda_attenuation, int num_iter)
  1862. {
  1863. if (guide != null) guide.ThrowIfDisposed();
  1864. return FastGlobalSmootherFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastGlobalSmootherFilter_10(guide.nativeObj, lambda, sigma_color, lambda_attenuation, num_iter)));
  1865. }
  1866. /**
  1867. * Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
  1868. *
  1869. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1870. *
  1871. * param lambda parameter defining the amount of regularization
  1872. *
  1873. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1874. *
  1875. * param lambda_attenuation internal parameter, defining how much lambda decreases after each iteration. Normally,
  1876. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1877. *
  1878. *
  1879. * For more details about Fast Global Smoother parameters, see the original paper CITE: Min2014. However, please note that
  1880. * there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not
  1881. * expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to
  1882. * achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors
  1883. * propose to dynamically update the guide image after each iteration. To maximize the performance this feature
  1884. * was not implemented here.
  1885. * return automatically generated
  1886. */
  1887. public static FastGlobalSmootherFilter createFastGlobalSmootherFilter(Mat guide, double lambda, double sigma_color, double lambda_attenuation)
  1888. {
  1889. if (guide != null) guide.ThrowIfDisposed();
  1890. return FastGlobalSmootherFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastGlobalSmootherFilter_11(guide.nativeObj, lambda, sigma_color, lambda_attenuation)));
  1891. }
  1892. /**
  1893. * Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
  1894. *
  1895. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1896. *
  1897. * param lambda parameter defining the amount of regularization
  1898. *
  1899. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1900. *
  1901. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1902. *
  1903. *
  1904. * For more details about Fast Global Smoother parameters, see the original paper CITE: Min2014. However, please note that
  1905. * there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not
  1906. * expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to
  1907. * achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors
  1908. * propose to dynamically update the guide image after each iteration. To maximize the performance this feature
  1909. * was not implemented here.
  1910. * return automatically generated
  1911. */
  1912. public static FastGlobalSmootherFilter createFastGlobalSmootherFilter(Mat guide, double lambda, double sigma_color)
  1913. {
  1914. if (guide != null) guide.ThrowIfDisposed();
  1915. return FastGlobalSmootherFilter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastGlobalSmootherFilter_12(guide.nativeObj, lambda, sigma_color)));
  1916. }
  1917. //
  1918. // C++: void cv::ximgproc::fastGlobalSmootherFilter(Mat guide, Mat src, Mat& dst, double lambda, double sigma_color, double lambda_attenuation = 0.25, int num_iter = 3)
  1919. //
  1920. /**
  1921. * Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same
  1922. * guide then use FastGlobalSmootherFilter interface to avoid extra computations.
  1923. *
  1924. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1925. *
  1926. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1927. *
  1928. * param dst destination image.
  1929. *
  1930. * param lambda parameter defining the amount of regularization
  1931. *
  1932. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1933. *
  1934. * param lambda_attenuation internal parameter, defining how much lambda decreases after each iteration. Normally,
  1935. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1936. *
  1937. * param num_iter number of iterations used for filtering, 3 is usually enough.
  1938. */
  1939. public static void fastGlobalSmootherFilter(Mat guide, Mat src, Mat dst, double lambda, double sigma_color, double lambda_attenuation, int num_iter)
  1940. {
  1941. if (guide != null) guide.ThrowIfDisposed();
  1942. if (src != null) src.ThrowIfDisposed();
  1943. if (dst != null) dst.ThrowIfDisposed();
  1944. ximgproc_Ximgproc_fastGlobalSmootherFilter_10(guide.nativeObj, src.nativeObj, dst.nativeObj, lambda, sigma_color, lambda_attenuation, num_iter);
  1945. }
  1946. /**
  1947. * Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same
  1948. * guide then use FastGlobalSmootherFilter interface to avoid extra computations.
  1949. *
  1950. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1951. *
  1952. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1953. *
  1954. * param dst destination image.
  1955. *
  1956. * param lambda parameter defining the amount of regularization
  1957. *
  1958. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1959. *
  1960. * param lambda_attenuation internal parameter, defining how much lambda decreases after each iteration. Normally,
  1961. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1962. *
  1963. */
  1964. public static void fastGlobalSmootherFilter(Mat guide, Mat src, Mat dst, double lambda, double sigma_color, double lambda_attenuation)
  1965. {
  1966. if (guide != null) guide.ThrowIfDisposed();
  1967. if (src != null) src.ThrowIfDisposed();
  1968. if (dst != null) dst.ThrowIfDisposed();
  1969. ximgproc_Ximgproc_fastGlobalSmootherFilter_11(guide.nativeObj, src.nativeObj, dst.nativeObj, lambda, sigma_color, lambda_attenuation);
  1970. }
  1971. /**
  1972. * Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same
  1973. * guide then use FastGlobalSmootherFilter interface to avoid extra computations.
  1974. *
  1975. * param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
  1976. *
  1977. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
  1978. *
  1979. * param dst destination image.
  1980. *
  1981. * param lambda parameter defining the amount of regularization
  1982. *
  1983. * param sigma_color parameter, that is similar to color space sigma in bilateralFilter.
  1984. *
  1985. * it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
  1986. *
  1987. */
  1988. public static void fastGlobalSmootherFilter(Mat guide, Mat src, Mat dst, double lambda, double sigma_color)
  1989. {
  1990. if (guide != null) guide.ThrowIfDisposed();
  1991. if (src != null) src.ThrowIfDisposed();
  1992. if (dst != null) dst.ThrowIfDisposed();
  1993. ximgproc_Ximgproc_fastGlobalSmootherFilter_12(guide.nativeObj, src.nativeObj, dst.nativeObj, lambda, sigma_color);
  1994. }
  1995. //
  1996. // C++: void cv::ximgproc::l0Smooth(Mat src, Mat& dst, double lambda = 0.02, double kappa = 2.0)
  1997. //
  1998. /**
  1999. * Global image smoothing via L0 gradient minimization.
  2000. *
  2001. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth.
  2002. *
  2003. * param dst destination image.
  2004. *
  2005. * param lambda parameter defining the smooth term weight.
  2006. *
  2007. * param kappa parameter defining the increasing factor of the weight of the gradient data term.
  2008. *
  2009. * For more details about L0 Smoother, see the original paper CITE: xu2011image.
  2010. */
  2011. public static void l0Smooth(Mat src, Mat dst, double lambda, double kappa)
  2012. {
  2013. if (src != null) src.ThrowIfDisposed();
  2014. if (dst != null) dst.ThrowIfDisposed();
  2015. ximgproc_Ximgproc_l0Smooth_10(src.nativeObj, dst.nativeObj, lambda, kappa);
  2016. }
  2017. /**
  2018. * Global image smoothing via L0 gradient minimization.
  2019. *
  2020. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth.
  2021. *
  2022. * param dst destination image.
  2023. *
  2024. * param lambda parameter defining the smooth term weight.
  2025. *
  2026. *
  2027. * For more details about L0 Smoother, see the original paper CITE: xu2011image.
  2028. */
  2029. public static void l0Smooth(Mat src, Mat dst, double lambda)
  2030. {
  2031. if (src != null) src.ThrowIfDisposed();
  2032. if (dst != null) dst.ThrowIfDisposed();
  2033. ximgproc_Ximgproc_l0Smooth_11(src.nativeObj, dst.nativeObj, lambda);
  2034. }
  2035. /**
  2036. * Global image smoothing via L0 gradient minimization.
  2037. *
  2038. * param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth.
  2039. *
  2040. * param dst destination image.
  2041. *
  2042. *
  2043. *
  2044. * For more details about L0 Smoother, see the original paper CITE: xu2011image.
  2045. */
  2046. public static void l0Smooth(Mat src, Mat dst)
  2047. {
  2048. if (src != null) src.ThrowIfDisposed();
  2049. if (dst != null) dst.ThrowIfDisposed();
  2050. ximgproc_Ximgproc_l0Smooth_12(src.nativeObj, dst.nativeObj);
  2051. }
  2052. //
  2053. // C++: void cv::ximgproc::covarianceEstimation(Mat src, Mat& dst, int windowRows, int windowCols)
  2054. //
  2055. /**
  2056. * Computes the estimated covariance matrix of an image using the sliding
  2057. * window forumlation.
  2058. *
  2059. * param src The source image. Input image must be of a complex type.
  2060. * param dst The destination estimated covariance matrix. Output matrix will be size (windowRows*windowCols, windowRows*windowCols).
  2061. * param windowRows The number of rows in the window.
  2062. * param windowCols The number of cols in the window.
  2063. * The window size parameters control the accuracy of the estimation.
  2064. * The sliding window moves over the entire image from the top-left corner
  2065. * to the bottom right corner. Each location of the window represents a sample.
  2066. * If the window is the size of the image, then this gives the exact covariance matrix.
  2067. * For all other cases, the sizes of the window will impact the number of samples
  2068. * and the number of elements in the estimated covariance matrix.
  2069. */
  2070. public static void covarianceEstimation(Mat src, Mat dst, int windowRows, int windowCols)
  2071. {
  2072. if (src != null) src.ThrowIfDisposed();
  2073. if (dst != null) dst.ThrowIfDisposed();
  2074. ximgproc_Ximgproc_covarianceEstimation_10(src.nativeObj, dst.nativeObj, windowRows, windowCols);
  2075. }
  2076. //
  2077. // C++: void cv::ximgproc::FastHoughTransform(Mat src, Mat& dst, int dstMatDepth, int angleRange = ARO_315_135, int op = FHT_ADD, int makeSkew = HDO_DESKEW)
  2078. //
  2079. /**
  2080. * Calculates 2D Fast Hough transform of an image.
  2081. *
  2082. * The function calculates the fast Hough transform for full, half or quarter
  2083. * range of angles.
  2084. * param src automatically generated
  2085. * param dst automatically generated
  2086. * param dstMatDepth automatically generated
  2087. * param angleRange automatically generated
  2088. * param op automatically generated
  2089. * param makeSkew automatically generated
  2090. */
  2091. public static void FastHoughTransform(Mat src, Mat dst, int dstMatDepth, int angleRange, int op, int makeSkew)
  2092. {
  2093. if (src != null) src.ThrowIfDisposed();
  2094. if (dst != null) dst.ThrowIfDisposed();
  2095. ximgproc_Ximgproc_FastHoughTransform_10(src.nativeObj, dst.nativeObj, dstMatDepth, angleRange, op, makeSkew);
  2096. }
  2097. /**
  2098. * Calculates 2D Fast Hough transform of an image.
  2099. *
  2100. * The function calculates the fast Hough transform for full, half or quarter
  2101. * range of angles.
  2102. * param src automatically generated
  2103. * param dst automatically generated
  2104. * param dstMatDepth automatically generated
  2105. * param angleRange automatically generated
  2106. * param op automatically generated
  2107. */
  2108. public static void FastHoughTransform(Mat src, Mat dst, int dstMatDepth, int angleRange, int op)
  2109. {
  2110. if (src != null) src.ThrowIfDisposed();
  2111. if (dst != null) dst.ThrowIfDisposed();
  2112. ximgproc_Ximgproc_FastHoughTransform_11(src.nativeObj, dst.nativeObj, dstMatDepth, angleRange, op);
  2113. }
  2114. /**
  2115. * Calculates 2D Fast Hough transform of an image.
  2116. *
  2117. * The function calculates the fast Hough transform for full, half or quarter
  2118. * range of angles.
  2119. * param src automatically generated
  2120. * param dst automatically generated
  2121. * param dstMatDepth automatically generated
  2122. * param angleRange automatically generated
  2123. */
  2124. public static void FastHoughTransform(Mat src, Mat dst, int dstMatDepth, int angleRange)
  2125. {
  2126. if (src != null) src.ThrowIfDisposed();
  2127. if (dst != null) dst.ThrowIfDisposed();
  2128. ximgproc_Ximgproc_FastHoughTransform_12(src.nativeObj, dst.nativeObj, dstMatDepth, angleRange);
  2129. }
  2130. /**
  2131. * Calculates 2D Fast Hough transform of an image.
  2132. *
  2133. * The function calculates the fast Hough transform for full, half or quarter
  2134. * range of angles.
  2135. * param src automatically generated
  2136. * param dst automatically generated
  2137. * param dstMatDepth automatically generated
  2138. */
  2139. public static void FastHoughTransform(Mat src, Mat dst, int dstMatDepth)
  2140. {
  2141. if (src != null) src.ThrowIfDisposed();
  2142. if (dst != null) dst.ThrowIfDisposed();
  2143. ximgproc_Ximgproc_FastHoughTransform_13(src.nativeObj, dst.nativeObj, dstMatDepth);
  2144. }
  2145. //
  2146. // C++: Vec4i cv::ximgproc::HoughPoint2Line(Point houghPoint, Mat srcImgInfo, int angleRange = ARO_315_135, int makeSkew = HDO_DESKEW, int rules = RO_IGNORE_BORDERS)
  2147. //
  2148. // Return type 'Vec4i' is not supported, skipping the function
  2149. //
  2150. // C++: Ptr_FastLineDetector cv::ximgproc::createFastLineDetector(int length_threshold = 10, float distance_threshold = 1.414213562f, double canny_th1 = 50.0, double canny_th2 = 50.0, int canny_aperture_size = 3, bool do_merge = false)
  2151. //
  2152. /**
  2153. * Creates a smart pointer to a FastLineDetector object and initializes it
  2154. *
  2155. * param length_threshold Segment shorter than this will be discarded
  2156. * param distance_threshold A point placed from a hypothesis line
  2157. * segment farther than this will be regarded as an outlier
  2158. * param canny_th1 First threshold for hysteresis procedure in Canny()
  2159. * param canny_th2 Second threshold for hysteresis procedure in Canny()
  2160. * param canny_aperture_size Aperturesize for the sobel operator in Canny().
  2161. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2162. * param do_merge If true, incremental merging of segments will be performed
  2163. * return automatically generated
  2164. */
  2165. public static FastLineDetector createFastLineDetector(int length_threshold, float distance_threshold, double canny_th1, double canny_th2, int canny_aperture_size, bool do_merge)
  2166. {
  2167. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_10(length_threshold, distance_threshold, canny_th1, canny_th2, canny_aperture_size, do_merge)));
  2168. }
  2169. /**
  2170. * Creates a smart pointer to a FastLineDetector object and initializes it
  2171. *
  2172. * param length_threshold Segment shorter than this will be discarded
  2173. * param distance_threshold A point placed from a hypothesis line
  2174. * segment farther than this will be regarded as an outlier
  2175. * param canny_th1 First threshold for hysteresis procedure in Canny()
  2176. * param canny_th2 Second threshold for hysteresis procedure in Canny()
  2177. * param canny_aperture_size Aperturesize for the sobel operator in Canny().
  2178. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2179. * return automatically generated
  2180. */
  2181. public static FastLineDetector createFastLineDetector(int length_threshold, float distance_threshold, double canny_th1, double canny_th2, int canny_aperture_size)
  2182. {
  2183. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_11(length_threshold, distance_threshold, canny_th1, canny_th2, canny_aperture_size)));
  2184. }
  2185. /**
  2186. * Creates a smart pointer to a FastLineDetector object and initializes it
  2187. *
  2188. * param length_threshold Segment shorter than this will be discarded
  2189. * param distance_threshold A point placed from a hypothesis line
  2190. * segment farther than this will be regarded as an outlier
  2191. * param canny_th1 First threshold for hysteresis procedure in Canny()
  2192. * param canny_th2 Second threshold for hysteresis procedure in Canny()
  2193. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2194. * return automatically generated
  2195. */
  2196. public static FastLineDetector createFastLineDetector(int length_threshold, float distance_threshold, double canny_th1, double canny_th2)
  2197. {
  2198. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_12(length_threshold, distance_threshold, canny_th1, canny_th2)));
  2199. }
  2200. /**
  2201. * Creates a smart pointer to a FastLineDetector object and initializes it
  2202. *
  2203. * param length_threshold Segment shorter than this will be discarded
  2204. * param distance_threshold A point placed from a hypothesis line
  2205. * segment farther than this will be regarded as an outlier
  2206. * param canny_th1 First threshold for hysteresis procedure in Canny()
  2207. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2208. * return automatically generated
  2209. */
  2210. public static FastLineDetector createFastLineDetector(int length_threshold, float distance_threshold, double canny_th1)
  2211. {
  2212. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_13(length_threshold, distance_threshold, canny_th1)));
  2213. }
  2214. /**
  2215. * Creates a smart pointer to a FastLineDetector object and initializes it
  2216. *
  2217. * param length_threshold Segment shorter than this will be discarded
  2218. * param distance_threshold A point placed from a hypothesis line
  2219. * segment farther than this will be regarded as an outlier
  2220. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2221. * return automatically generated
  2222. */
  2223. public static FastLineDetector createFastLineDetector(int length_threshold, float distance_threshold)
  2224. {
  2225. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_14(length_threshold, distance_threshold)));
  2226. }
  2227. /**
  2228. * Creates a smart pointer to a FastLineDetector object and initializes it
  2229. *
  2230. * param length_threshold Segment shorter than this will be discarded
  2231. * segment farther than this will be regarded as an outlier
  2232. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2233. * return automatically generated
  2234. */
  2235. public static FastLineDetector createFastLineDetector(int length_threshold)
  2236. {
  2237. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_15(length_threshold)));
  2238. }
  2239. /**
  2240. * Creates a smart pointer to a FastLineDetector object and initializes it
  2241. *
  2242. * segment farther than this will be regarded as an outlier
  2243. * If zero, Canny() is not applied and the input image is taken as an edge image.
  2244. * return automatically generated
  2245. */
  2246. public static FastLineDetector createFastLineDetector()
  2247. {
  2248. return FastLineDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createFastLineDetector_16()));
  2249. }
  2250. //
  2251. // C++: void cv::ximgproc::findEllipses(Mat image, Mat& ellipses, float scoreThreshold = 0.7f, float reliabilityThreshold = 0.5f, float centerDistanceThreshold = 0.05f)
  2252. //
  2253. /**
  2254. * Finds ellipses fastly in an image using projective invariant pruning.
  2255. *
  2256. * The function detects ellipses in images using projective invariant pruning.
  2257. * For more details about this implementation, please see CITE: jia2017fast
  2258. * Jia, Qi et al, (2017).
  2259. * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
  2260. *
  2261. * param image input image, could be gray or color.
  2262. * param ellipses output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
  2263. * param scoreThreshold float, the threshold of ellipse score.
  2264. * param reliabilityThreshold float, the threshold of reliability.
  2265. * param centerDistanceThreshold float, the threshold of center distance.
  2266. */
  2267. public static void findEllipses(Mat image, Mat ellipses, float scoreThreshold, float reliabilityThreshold, float centerDistanceThreshold)
  2268. {
  2269. if (image != null) image.ThrowIfDisposed();
  2270. if (ellipses != null) ellipses.ThrowIfDisposed();
  2271. ximgproc_Ximgproc_findEllipses_10(image.nativeObj, ellipses.nativeObj, scoreThreshold, reliabilityThreshold, centerDistanceThreshold);
  2272. }
  2273. /**
  2274. * Finds ellipses fastly in an image using projective invariant pruning.
  2275. *
  2276. * The function detects ellipses in images using projective invariant pruning.
  2277. * For more details about this implementation, please see CITE: jia2017fast
  2278. * Jia, Qi et al, (2017).
  2279. * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
  2280. *
  2281. * param image input image, could be gray or color.
  2282. * param ellipses output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
  2283. * param scoreThreshold float, the threshold of ellipse score.
  2284. * param reliabilityThreshold float, the threshold of reliability.
  2285. */
  2286. public static void findEllipses(Mat image, Mat ellipses, float scoreThreshold, float reliabilityThreshold)
  2287. {
  2288. if (image != null) image.ThrowIfDisposed();
  2289. if (ellipses != null) ellipses.ThrowIfDisposed();
  2290. ximgproc_Ximgproc_findEllipses_11(image.nativeObj, ellipses.nativeObj, scoreThreshold, reliabilityThreshold);
  2291. }
  2292. /**
  2293. * Finds ellipses fastly in an image using projective invariant pruning.
  2294. *
  2295. * The function detects ellipses in images using projective invariant pruning.
  2296. * For more details about this implementation, please see CITE: jia2017fast
  2297. * Jia, Qi et al, (2017).
  2298. * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
  2299. *
  2300. * param image input image, could be gray or color.
  2301. * param ellipses output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
  2302. * param scoreThreshold float, the threshold of ellipse score.
  2303. */
  2304. public static void findEllipses(Mat image, Mat ellipses, float scoreThreshold)
  2305. {
  2306. if (image != null) image.ThrowIfDisposed();
  2307. if (ellipses != null) ellipses.ThrowIfDisposed();
  2308. ximgproc_Ximgproc_findEllipses_12(image.nativeObj, ellipses.nativeObj, scoreThreshold);
  2309. }
  2310. /**
  2311. * Finds ellipses fastly in an image using projective invariant pruning.
  2312. *
  2313. * The function detects ellipses in images using projective invariant pruning.
  2314. * For more details about this implementation, please see CITE: jia2017fast
  2315. * Jia, Qi et al, (2017).
  2316. * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
  2317. *
  2318. * param image input image, could be gray or color.
  2319. * param ellipses output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
  2320. */
  2321. public static void findEllipses(Mat image, Mat ellipses)
  2322. {
  2323. if (image != null) image.ThrowIfDisposed();
  2324. if (ellipses != null) ellipses.ThrowIfDisposed();
  2325. ximgproc_Ximgproc_findEllipses_13(image.nativeObj, ellipses.nativeObj);
  2326. }
  2327. //
  2328. // C++: void cv::ximgproc::fourierDescriptor(Mat src, Mat& dst, int nbElt = -1, int nbFD = -1)
  2329. //
  2330. /**
  2331. * Fourier descriptors for planed closed curves
  2332. *
  2333. * For more details about this implementation, please see CITE: PersoonFu1977
  2334. *
  2335. *
  2336. * param src automatically generated
  2337. * param dst automatically generated
  2338. * param nbElt automatically generated
  2339. * param nbFD automatically generated
  2340. */
  2341. public static void fourierDescriptor(Mat src, Mat dst, int nbElt, int nbFD)
  2342. {
  2343. if (src != null) src.ThrowIfDisposed();
  2344. if (dst != null) dst.ThrowIfDisposed();
  2345. ximgproc_Ximgproc_fourierDescriptor_10(src.nativeObj, dst.nativeObj, nbElt, nbFD);
  2346. }
  2347. /**
  2348. * Fourier descriptors for planed closed curves
  2349. *
  2350. * For more details about this implementation, please see CITE: PersoonFu1977
  2351. *
  2352. *
  2353. * param src automatically generated
  2354. * param dst automatically generated
  2355. * param nbElt automatically generated
  2356. */
  2357. public static void fourierDescriptor(Mat src, Mat dst, int nbElt)
  2358. {
  2359. if (src != null) src.ThrowIfDisposed();
  2360. if (dst != null) dst.ThrowIfDisposed();
  2361. ximgproc_Ximgproc_fourierDescriptor_11(src.nativeObj, dst.nativeObj, nbElt);
  2362. }
  2363. /**
  2364. * Fourier descriptors for planed closed curves
  2365. *
  2366. * For more details about this implementation, please see CITE: PersoonFu1977
  2367. *
  2368. *
  2369. * param src automatically generated
  2370. * param dst automatically generated
  2371. */
  2372. public static void fourierDescriptor(Mat src, Mat dst)
  2373. {
  2374. if (src != null) src.ThrowIfDisposed();
  2375. if (dst != null) dst.ThrowIfDisposed();
  2376. ximgproc_Ximgproc_fourierDescriptor_12(src.nativeObj, dst.nativeObj);
  2377. }
  2378. //
  2379. // C++: void cv::ximgproc::transformFD(Mat src, Mat t, Mat& dst, bool fdContour = true)
  2380. //
  2381. /**
  2382. * transform a contour
  2383. *
  2384. *
  2385. * param src automatically generated
  2386. * param t automatically generated
  2387. * param dst automatically generated
  2388. * param fdContour automatically generated
  2389. */
  2390. public static void transformFD(Mat src, Mat t, Mat dst, bool fdContour)
  2391. {
  2392. if (src != null) src.ThrowIfDisposed();
  2393. if (t != null) t.ThrowIfDisposed();
  2394. if (dst != null) dst.ThrowIfDisposed();
  2395. ximgproc_Ximgproc_transformFD_10(src.nativeObj, t.nativeObj, dst.nativeObj, fdContour);
  2396. }
  2397. /**
  2398. * transform a contour
  2399. *
  2400. *
  2401. * param src automatically generated
  2402. * param t automatically generated
  2403. * param dst automatically generated
  2404. */
  2405. public static void transformFD(Mat src, Mat t, Mat dst)
  2406. {
  2407. if (src != null) src.ThrowIfDisposed();
  2408. if (t != null) t.ThrowIfDisposed();
  2409. if (dst != null) dst.ThrowIfDisposed();
  2410. ximgproc_Ximgproc_transformFD_11(src.nativeObj, t.nativeObj, dst.nativeObj);
  2411. }
  2412. //
  2413. // C++: void cv::ximgproc::contourSampling(Mat src, Mat& _out, int nbElt)
  2414. //
  2415. /**
  2416. * Contour sampling .
  2417. *
  2418. *
  2419. * param src automatically generated
  2420. * param _out automatically generated
  2421. * param nbElt automatically generated
  2422. */
  2423. public static void contourSampling(Mat src, Mat _out, int nbElt)
  2424. {
  2425. if (src != null) src.ThrowIfDisposed();
  2426. if (_out != null) _out.ThrowIfDisposed();
  2427. ximgproc_Ximgproc_contourSampling_10(src.nativeObj, _out.nativeObj, nbElt);
  2428. }
  2429. //
  2430. // C++: Ptr_ContourFitting cv::ximgproc::createContourFitting(int ctr = 1024, int fd = 16)
  2431. //
  2432. /**
  2433. * create ContourFitting algorithm object
  2434. *
  2435. * param ctr number of Fourier descriptors equal to number of contour points after resampling.
  2436. * param fd Contour defining second shape (Target).
  2437. * return automatically generated
  2438. */
  2439. public static ContourFitting createContourFitting(int ctr, int fd)
  2440. {
  2441. return ContourFitting.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createContourFitting_10(ctr, fd)));
  2442. }
  2443. /**
  2444. * create ContourFitting algorithm object
  2445. *
  2446. * param ctr number of Fourier descriptors equal to number of contour points after resampling.
  2447. * return automatically generated
  2448. */
  2449. public static ContourFitting createContourFitting(int ctr)
  2450. {
  2451. return ContourFitting.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createContourFitting_11(ctr)));
  2452. }
  2453. /**
  2454. * create ContourFitting algorithm object
  2455. *
  2456. * return automatically generated
  2457. */
  2458. public static ContourFitting createContourFitting()
  2459. {
  2460. return ContourFitting.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createContourFitting_12()));
  2461. }
  2462. //
  2463. // C++: Ptr_SuperpixelLSC cv::ximgproc::createSuperpixelLSC(Mat image, int region_size = 10, float ratio = 0.075f)
  2464. //
  2465. /**
  2466. * Class implementing the LSC (Linear Spectral Clustering) superpixels
  2467. *
  2468. * param image Image to segment
  2469. * param region_size Chooses an average superpixel size measured in pixels
  2470. * param ratio Chooses the enforcement of superpixel compactness factor of superpixel
  2471. *
  2472. * The function initializes a SuperpixelLSC object for the input image. It sets the parameters of
  2473. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  2474. * computing iterations over the given image. An example of LSC is ilustrated in the following picture.
  2475. * For enanched results it is recommended for color images to preprocess image with little gaussian blur
  2476. * with a small 3 x 3 kernel and additional conversion into CieLAB color space.
  2477. *
  2478. * ![image](pics/superpixels_lsc.png)
  2479. * return automatically generated
  2480. */
  2481. public static SuperpixelLSC createSuperpixelLSC(Mat image, int region_size, float ratio)
  2482. {
  2483. if (image != null) image.ThrowIfDisposed();
  2484. return SuperpixelLSC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelLSC_10(image.nativeObj, region_size, ratio)));
  2485. }
  2486. /**
  2487. * Class implementing the LSC (Linear Spectral Clustering) superpixels
  2488. *
  2489. * param image Image to segment
  2490. * param region_size Chooses an average superpixel size measured in pixels
  2491. *
  2492. * The function initializes a SuperpixelLSC object for the input image. It sets the parameters of
  2493. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  2494. * computing iterations over the given image. An example of LSC is ilustrated in the following picture.
  2495. * For enanched results it is recommended for color images to preprocess image with little gaussian blur
  2496. * with a small 3 x 3 kernel and additional conversion into CieLAB color space.
  2497. *
  2498. * ![image](pics/superpixels_lsc.png)
  2499. * return automatically generated
  2500. */
  2501. public static SuperpixelLSC createSuperpixelLSC(Mat image, int region_size)
  2502. {
  2503. if (image != null) image.ThrowIfDisposed();
  2504. return SuperpixelLSC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelLSC_11(image.nativeObj, region_size)));
  2505. }
  2506. /**
  2507. * Class implementing the LSC (Linear Spectral Clustering) superpixels
  2508. *
  2509. * param image Image to segment
  2510. *
  2511. * The function initializes a SuperpixelLSC object for the input image. It sets the parameters of
  2512. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  2513. * computing iterations over the given image. An example of LSC is ilustrated in the following picture.
  2514. * For enanched results it is recommended for color images to preprocess image with little gaussian blur
  2515. * with a small 3 x 3 kernel and additional conversion into CieLAB color space.
  2516. *
  2517. * ![image](pics/superpixels_lsc.png)
  2518. * return automatically generated
  2519. */
  2520. public static SuperpixelLSC createSuperpixelLSC(Mat image)
  2521. {
  2522. if (image != null) image.ThrowIfDisposed();
  2523. return SuperpixelLSC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelLSC_12(image.nativeObj)));
  2524. }
  2525. //
  2526. // C++: void cv::ximgproc::PeiLinNormalization(Mat I, Mat& T)
  2527. //
  2528. public static void PeiLinNormalization(Mat I, Mat T)
  2529. {
  2530. if (I != null) I.ThrowIfDisposed();
  2531. if (T != null) T.ThrowIfDisposed();
  2532. ximgproc_Ximgproc_PeiLinNormalization_10(I.nativeObj, T.nativeObj);
  2533. }
  2534. //
  2535. // C++: void cv::ximgproc::RadonTransform(Mat src, Mat& dst, double theta = 1, double start_angle = 0, double end_angle = 180, bool crop = false, bool norm = false)
  2536. //
  2537. /**
  2538. * Calculate Radon Transform of an image.
  2539. *
  2540. * This function calculates the Radon Transform of a given image in any range.
  2541. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2542. * If the input type is CV_8U, the output will be CV_32S.
  2543. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2544. * The output size will be num_of_integral x src_diagonal_length.
  2545. * If crop is selected, the input image will be crop into square then circle,
  2546. * and output size will be num_of_integral x min_edge.
  2547. *
  2548. * param src automatically generated
  2549. * param dst automatically generated
  2550. * param theta automatically generated
  2551. * param start_angle automatically generated
  2552. * param end_angle automatically generated
  2553. * param crop automatically generated
  2554. * param norm automatically generated
  2555. */
  2556. public static void RadonTransform(Mat src, Mat dst, double theta, double start_angle, double end_angle, bool crop, bool norm)
  2557. {
  2558. if (src != null) src.ThrowIfDisposed();
  2559. if (dst != null) dst.ThrowIfDisposed();
  2560. ximgproc_Ximgproc_RadonTransform_10(src.nativeObj, dst.nativeObj, theta, start_angle, end_angle, crop, norm);
  2561. }
  2562. /**
  2563. * Calculate Radon Transform of an image.
  2564. *
  2565. * This function calculates the Radon Transform of a given image in any range.
  2566. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2567. * If the input type is CV_8U, the output will be CV_32S.
  2568. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2569. * The output size will be num_of_integral x src_diagonal_length.
  2570. * If crop is selected, the input image will be crop into square then circle,
  2571. * and output size will be num_of_integral x min_edge.
  2572. *
  2573. * param src automatically generated
  2574. * param dst automatically generated
  2575. * param theta automatically generated
  2576. * param start_angle automatically generated
  2577. * param end_angle automatically generated
  2578. * param crop automatically generated
  2579. */
  2580. public static void RadonTransform(Mat src, Mat dst, double theta, double start_angle, double end_angle, bool crop)
  2581. {
  2582. if (src != null) src.ThrowIfDisposed();
  2583. if (dst != null) dst.ThrowIfDisposed();
  2584. ximgproc_Ximgproc_RadonTransform_11(src.nativeObj, dst.nativeObj, theta, start_angle, end_angle, crop);
  2585. }
  2586. /**
  2587. * Calculate Radon Transform of an image.
  2588. *
  2589. * This function calculates the Radon Transform of a given image in any range.
  2590. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2591. * If the input type is CV_8U, the output will be CV_32S.
  2592. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2593. * The output size will be num_of_integral x src_diagonal_length.
  2594. * If crop is selected, the input image will be crop into square then circle,
  2595. * and output size will be num_of_integral x min_edge.
  2596. *
  2597. * param src automatically generated
  2598. * param dst automatically generated
  2599. * param theta automatically generated
  2600. * param start_angle automatically generated
  2601. * param end_angle automatically generated
  2602. */
  2603. public static void RadonTransform(Mat src, Mat dst, double theta, double start_angle, double end_angle)
  2604. {
  2605. if (src != null) src.ThrowIfDisposed();
  2606. if (dst != null) dst.ThrowIfDisposed();
  2607. ximgproc_Ximgproc_RadonTransform_12(src.nativeObj, dst.nativeObj, theta, start_angle, end_angle);
  2608. }
  2609. /**
  2610. * Calculate Radon Transform of an image.
  2611. *
  2612. * This function calculates the Radon Transform of a given image in any range.
  2613. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2614. * If the input type is CV_8U, the output will be CV_32S.
  2615. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2616. * The output size will be num_of_integral x src_diagonal_length.
  2617. * If crop is selected, the input image will be crop into square then circle,
  2618. * and output size will be num_of_integral x min_edge.
  2619. *
  2620. * param src automatically generated
  2621. * param dst automatically generated
  2622. * param theta automatically generated
  2623. * param start_angle automatically generated
  2624. */
  2625. public static void RadonTransform(Mat src, Mat dst, double theta, double start_angle)
  2626. {
  2627. if (src != null) src.ThrowIfDisposed();
  2628. if (dst != null) dst.ThrowIfDisposed();
  2629. ximgproc_Ximgproc_RadonTransform_13(src.nativeObj, dst.nativeObj, theta, start_angle);
  2630. }
  2631. /**
  2632. * Calculate Radon Transform of an image.
  2633. *
  2634. * This function calculates the Radon Transform of a given image in any range.
  2635. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2636. * If the input type is CV_8U, the output will be CV_32S.
  2637. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2638. * The output size will be num_of_integral x src_diagonal_length.
  2639. * If crop is selected, the input image will be crop into square then circle,
  2640. * and output size will be num_of_integral x min_edge.
  2641. *
  2642. * param src automatically generated
  2643. * param dst automatically generated
  2644. * param theta automatically generated
  2645. */
  2646. public static void RadonTransform(Mat src, Mat dst, double theta)
  2647. {
  2648. if (src != null) src.ThrowIfDisposed();
  2649. if (dst != null) dst.ThrowIfDisposed();
  2650. ximgproc_Ximgproc_RadonTransform_14(src.nativeObj, dst.nativeObj, theta);
  2651. }
  2652. /**
  2653. * Calculate Radon Transform of an image.
  2654. *
  2655. * This function calculates the Radon Transform of a given image in any range.
  2656. * See https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf for detail.
  2657. * If the input type is CV_8U, the output will be CV_32S.
  2658. * If the input type is CV_32F or CV_64F, the output will be CV_64F
  2659. * The output size will be num_of_integral x src_diagonal_length.
  2660. * If crop is selected, the input image will be crop into square then circle,
  2661. * and output size will be num_of_integral x min_edge.
  2662. *
  2663. * param src automatically generated
  2664. * param dst automatically generated
  2665. */
  2666. public static void RadonTransform(Mat src, Mat dst)
  2667. {
  2668. if (src != null) src.ThrowIfDisposed();
  2669. if (dst != null) dst.ThrowIfDisposed();
  2670. ximgproc_Ximgproc_RadonTransform_15(src.nativeObj, dst.nativeObj);
  2671. }
  2672. //
  2673. // C++: Ptr_ScanSegment cv::ximgproc::createScanSegment(int image_width, int image_height, int num_superpixels, int slices = 8, bool merge_small = true)
  2674. //
  2675. /**
  2676. * Initializes a ScanSegment object.
  2677. *
  2678. * The function initializes a ScanSegment object for the input image. It stores the parameters of
  2679. * the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel
  2680. * algorithm, which are: num_superpixels, threads, and merge_small.
  2681. *
  2682. * param image_width Image width.
  2683. * param image_height Image height.
  2684. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2685. * due to restrictions (depending on the image size). Use getNumberOfSuperpixels() to
  2686. * get the actual number.
  2687. * param slices Number of processing threads for parallelisation. Setting -1 uses the maximum number
  2688. * of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.
  2689. * param merge_small merge small segments to give the desired number of superpixels. Processing is
  2690. * much faster without merging, but many small segments will be left in the image.
  2691. * return automatically generated
  2692. */
  2693. public static ScanSegment createScanSegment(int image_width, int image_height, int num_superpixels, int slices, bool merge_small)
  2694. {
  2695. return ScanSegment.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createScanSegment_10(image_width, image_height, num_superpixels, slices, merge_small)));
  2696. }
  2697. /**
  2698. * Initializes a ScanSegment object.
  2699. *
  2700. * The function initializes a ScanSegment object for the input image. It stores the parameters of
  2701. * the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel
  2702. * algorithm, which are: num_superpixels, threads, and merge_small.
  2703. *
  2704. * param image_width Image width.
  2705. * param image_height Image height.
  2706. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2707. * due to restrictions (depending on the image size). Use getNumberOfSuperpixels() to
  2708. * get the actual number.
  2709. * param slices Number of processing threads for parallelisation. Setting -1 uses the maximum number
  2710. * of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.
  2711. * much faster without merging, but many small segments will be left in the image.
  2712. * return automatically generated
  2713. */
  2714. public static ScanSegment createScanSegment(int image_width, int image_height, int num_superpixels, int slices)
  2715. {
  2716. return ScanSegment.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createScanSegment_11(image_width, image_height, num_superpixels, slices)));
  2717. }
  2718. /**
  2719. * Initializes a ScanSegment object.
  2720. *
  2721. * The function initializes a ScanSegment object for the input image. It stores the parameters of
  2722. * the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel
  2723. * algorithm, which are: num_superpixels, threads, and merge_small.
  2724. *
  2725. * param image_width Image width.
  2726. * param image_height Image height.
  2727. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2728. * due to restrictions (depending on the image size). Use getNumberOfSuperpixels() to
  2729. * get the actual number.
  2730. * of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.
  2731. * much faster without merging, but many small segments will be left in the image.
  2732. * return automatically generated
  2733. */
  2734. public static ScanSegment createScanSegment(int image_width, int image_height, int num_superpixels)
  2735. {
  2736. return ScanSegment.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createScanSegment_12(image_width, image_height, num_superpixels)));
  2737. }
  2738. //
  2739. // C++: Ptr_SuperpixelSEEDS cv::ximgproc::createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior = 2, int histogram_bins = 5, bool double_step = false)
  2740. //
  2741. /**
  2742. * Initializes a SuperpixelSEEDS object.
  2743. *
  2744. * param image_width Image width.
  2745. * param image_height Image height.
  2746. * param image_channels Number of channels of the image.
  2747. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2748. * due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
  2749. * get the actual number.
  2750. * param num_levels Number of block levels. The more levels, the more accurate is the segmentation,
  2751. * but needs more memory and CPU time.
  2752. * param prior enable 3x3 shape smoothing term if &gt;0. A larger value leads to smoother shapes. prior
  2753. * must be in the range [0, 5].
  2754. * param histogram_bins Number of histogram bins.
  2755. * param double_step If true, iterate each block level twice for higher accuracy.
  2756. *
  2757. * The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
  2758. * the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
  2759. * superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
  2760. * double_step.
  2761. *
  2762. * The number of levels in num_levels defines the amount of block levels that the algorithm use in the
  2763. * optimization. The initialization is a grid, in which the superpixels are equally distributed through
  2764. * the width and the height of the image. The larger blocks correspond to the superpixel size, and the
  2765. * levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
  2766. * recursively until the smaller block level. An example of initialization of 4 block levels is
  2767. * illustrated in the following figure.
  2768. *
  2769. * ![image](pics/superpixels_blocks.png)
  2770. * return automatically generated
  2771. */
  2772. public static SuperpixelSEEDS createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior, int histogram_bins, bool double_step)
  2773. {
  2774. return SuperpixelSEEDS.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSEEDS_10(image_width, image_height, image_channels, num_superpixels, num_levels, prior, histogram_bins, double_step)));
  2775. }
  2776. /**
  2777. * Initializes a SuperpixelSEEDS object.
  2778. *
  2779. * param image_width Image width.
  2780. * param image_height Image height.
  2781. * param image_channels Number of channels of the image.
  2782. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2783. * due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
  2784. * get the actual number.
  2785. * param num_levels Number of block levels. The more levels, the more accurate is the segmentation,
  2786. * but needs more memory and CPU time.
  2787. * param prior enable 3x3 shape smoothing term if &gt;0. A larger value leads to smoother shapes. prior
  2788. * must be in the range [0, 5].
  2789. * param histogram_bins Number of histogram bins.
  2790. *
  2791. * The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
  2792. * the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
  2793. * superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
  2794. * double_step.
  2795. *
  2796. * The number of levels in num_levels defines the amount of block levels that the algorithm use in the
  2797. * optimization. The initialization is a grid, in which the superpixels are equally distributed through
  2798. * the width and the height of the image. The larger blocks correspond to the superpixel size, and the
  2799. * levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
  2800. * recursively until the smaller block level. An example of initialization of 4 block levels is
  2801. * illustrated in the following figure.
  2802. *
  2803. * ![image](pics/superpixels_blocks.png)
  2804. * return automatically generated
  2805. */
  2806. public static SuperpixelSEEDS createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior, int histogram_bins)
  2807. {
  2808. return SuperpixelSEEDS.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSEEDS_11(image_width, image_height, image_channels, num_superpixels, num_levels, prior, histogram_bins)));
  2809. }
  2810. /**
  2811. * Initializes a SuperpixelSEEDS object.
  2812. *
  2813. * param image_width Image width.
  2814. * param image_height Image height.
  2815. * param image_channels Number of channels of the image.
  2816. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2817. * due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
  2818. * get the actual number.
  2819. * param num_levels Number of block levels. The more levels, the more accurate is the segmentation,
  2820. * but needs more memory and CPU time.
  2821. * param prior enable 3x3 shape smoothing term if &gt;0. A larger value leads to smoother shapes. prior
  2822. * must be in the range [0, 5].
  2823. *
  2824. * The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
  2825. * the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
  2826. * superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
  2827. * double_step.
  2828. *
  2829. * The number of levels in num_levels defines the amount of block levels that the algorithm use in the
  2830. * optimization. The initialization is a grid, in which the superpixels are equally distributed through
  2831. * the width and the height of the image. The larger blocks correspond to the superpixel size, and the
  2832. * levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
  2833. * recursively until the smaller block level. An example of initialization of 4 block levels is
  2834. * illustrated in the following figure.
  2835. *
  2836. * ![image](pics/superpixels_blocks.png)
  2837. * return automatically generated
  2838. */
  2839. public static SuperpixelSEEDS createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior)
  2840. {
  2841. return SuperpixelSEEDS.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSEEDS_12(image_width, image_height, image_channels, num_superpixels, num_levels, prior)));
  2842. }
  2843. /**
  2844. * Initializes a SuperpixelSEEDS object.
  2845. *
  2846. * param image_width Image width.
  2847. * param image_height Image height.
  2848. * param image_channels Number of channels of the image.
  2849. * param num_superpixels Desired number of superpixels. Note that the actual number may be smaller
  2850. * due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
  2851. * get the actual number.
  2852. * param num_levels Number of block levels. The more levels, the more accurate is the segmentation,
  2853. * but needs more memory and CPU time.
  2854. * must be in the range [0, 5].
  2855. *
  2856. * The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
  2857. * the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
  2858. * superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
  2859. * double_step.
  2860. *
  2861. * The number of levels in num_levels defines the amount of block levels that the algorithm use in the
  2862. * optimization. The initialization is a grid, in which the superpixels are equally distributed through
  2863. * the width and the height of the image. The larger blocks correspond to the superpixel size, and the
  2864. * levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
  2865. * recursively until the smaller block level. An example of initialization of 4 block levels is
  2866. * illustrated in the following figure.
  2867. *
  2868. * ![image](pics/superpixels_blocks.png)
  2869. * return automatically generated
  2870. */
  2871. public static SuperpixelSEEDS createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels)
  2872. {
  2873. return SuperpixelSEEDS.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSEEDS_13(image_width, image_height, image_channels, num_superpixels, num_levels)));
  2874. }
  2875. //
  2876. // C++: Ptr_GraphSegmentation cv::ximgproc::segmentation::createGraphSegmentation(double sigma = 0.5, float k = 300, int min_size = 100)
  2877. //
  2878. /**
  2879. * Creates a graph based segmentor
  2880. * param sigma The sigma parameter, used to smooth image
  2881. * param k The k parameter of the algorythm
  2882. * param min_size The minimum size of segments
  2883. * return automatically generated
  2884. */
  2885. public static GraphSegmentation createGraphSegmentation(double sigma, float k, int min_size)
  2886. {
  2887. return GraphSegmentation.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createGraphSegmentation_10(sigma, k, min_size)));
  2888. }
  2889. /**
  2890. * Creates a graph based segmentor
  2891. * param sigma The sigma parameter, used to smooth image
  2892. * param k The k parameter of the algorythm
  2893. * return automatically generated
  2894. */
  2895. public static GraphSegmentation createGraphSegmentation(double sigma, float k)
  2896. {
  2897. return GraphSegmentation.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createGraphSegmentation_11(sigma, k)));
  2898. }
  2899. /**
  2900. * Creates a graph based segmentor
  2901. * param sigma The sigma parameter, used to smooth image
  2902. * return automatically generated
  2903. */
  2904. public static GraphSegmentation createGraphSegmentation(double sigma)
  2905. {
  2906. return GraphSegmentation.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createGraphSegmentation_12(sigma)));
  2907. }
  2908. /**
  2909. * Creates a graph based segmentor
  2910. * return automatically generated
  2911. */
  2912. public static GraphSegmentation createGraphSegmentation()
  2913. {
  2914. return GraphSegmentation.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createGraphSegmentation_13()));
  2915. }
  2916. //
  2917. // C++: Ptr_SelectiveSearchSegmentationStrategyColor cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyColor()
  2918. //
  2919. /**
  2920. * Create a new color-based strategy
  2921. * return automatically generated
  2922. */
  2923. public static SelectiveSearchSegmentationStrategyColor createSelectiveSearchSegmentationStrategyColor()
  2924. {
  2925. return SelectiveSearchSegmentationStrategyColor.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyColor_10()));
  2926. }
  2927. //
  2928. // C++: Ptr_SelectiveSearchSegmentationStrategySize cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategySize()
  2929. //
  2930. /**
  2931. * Create a new size-based strategy
  2932. * return automatically generated
  2933. */
  2934. public static SelectiveSearchSegmentationStrategySize createSelectiveSearchSegmentationStrategySize()
  2935. {
  2936. return SelectiveSearchSegmentationStrategySize.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategySize_10()));
  2937. }
  2938. //
  2939. // C++: Ptr_SelectiveSearchSegmentationStrategyTexture cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyTexture()
  2940. //
  2941. /**
  2942. * Create a new size-based strategy
  2943. * return automatically generated
  2944. */
  2945. public static SelectiveSearchSegmentationStrategyTexture createSelectiveSearchSegmentationStrategyTexture()
  2946. {
  2947. return SelectiveSearchSegmentationStrategyTexture.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyTexture_10()));
  2948. }
  2949. //
  2950. // C++: Ptr_SelectiveSearchSegmentationStrategyFill cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyFill()
  2951. //
  2952. /**
  2953. * Create a new fill-based strategy
  2954. * return automatically generated
  2955. */
  2956. public static SelectiveSearchSegmentationStrategyFill createSelectiveSearchSegmentationStrategyFill()
  2957. {
  2958. return SelectiveSearchSegmentationStrategyFill.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyFill_10()));
  2959. }
  2960. //
  2961. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple()
  2962. //
  2963. /**
  2964. * Create a new multiple strategy
  2965. * return automatically generated
  2966. */
  2967. public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple()
  2968. {
  2969. return SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_10()));
  2970. }
  2971. //
  2972. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1)
  2973. //
  2974. /**
  2975. * Create a new multiple strategy and set one subtrategy
  2976. * param s1 The first strategy
  2977. * return automatically generated
  2978. */
  2979. public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple(SelectiveSearchSegmentationStrategy s1)
  2980. {
  2981. if (s1 != null) s1.ThrowIfDisposed();
  2982. return SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_11(s1.getNativeObjAddr())));
  2983. }
  2984. //
  2985. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2)
  2986. //
  2987. /**
  2988. * Create a new multiple strategy and set two subtrategies, with equal weights
  2989. * param s1 The first strategy
  2990. * param s2 The second strategy
  2991. * return automatically generated
  2992. */
  2993. public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2)
  2994. {
  2995. if (s1 != null) s1.ThrowIfDisposed();
  2996. if (s2 != null) s2.ThrowIfDisposed();
  2997. return SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_12(s1.getNativeObjAddr(), s2.getNativeObjAddr())));
  2998. }
  2999. //
  3000. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2, Ptr_SelectiveSearchSegmentationStrategy s3)
  3001. //
  3002. /**
  3003. * Create a new multiple strategy and set three subtrategies, with equal weights
  3004. * param s1 The first strategy
  3005. * param s2 The second strategy
  3006. * param s3 The third strategy
  3007. * return automatically generated
  3008. */
  3009. public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2, SelectiveSearchSegmentationStrategy s3)
  3010. {
  3011. if (s1 != null) s1.ThrowIfDisposed();
  3012. if (s2 != null) s2.ThrowIfDisposed();
  3013. if (s3 != null) s3.ThrowIfDisposed();
  3014. return SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_13(s1.getNativeObjAddr(), s2.getNativeObjAddr(), s3.getNativeObjAddr())));
  3015. }
  3016. //
  3017. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2, Ptr_SelectiveSearchSegmentationStrategy s3, Ptr_SelectiveSearchSegmentationStrategy s4)
  3018. //
  3019. /**
  3020. * Create a new multiple strategy and set four subtrategies, with equal weights
  3021. * param s1 The first strategy
  3022. * param s2 The second strategy
  3023. * param s3 The third strategy
  3024. * param s4 The forth strategy
  3025. * return automatically generated
  3026. */
  3027. public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2, SelectiveSearchSegmentationStrategy s3, SelectiveSearchSegmentationStrategy s4)
  3028. {
  3029. if (s1 != null) s1.ThrowIfDisposed();
  3030. if (s2 != null) s2.ThrowIfDisposed();
  3031. if (s3 != null) s3.ThrowIfDisposed();
  3032. if (s4 != null) s4.ThrowIfDisposed();
  3033. return SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_14(s1.getNativeObjAddr(), s2.getNativeObjAddr(), s3.getNativeObjAddr(), s4.getNativeObjAddr())));
  3034. }
  3035. //
  3036. // C++: Ptr_SelectiveSearchSegmentation cv::ximgproc::segmentation::createSelectiveSearchSegmentation()
  3037. //
  3038. /**
  3039. * Create a new SelectiveSearchSegmentation class.
  3040. * return automatically generated
  3041. */
  3042. public static SelectiveSearchSegmentation createSelectiveSearchSegmentation()
  3043. {
  3044. return SelectiveSearchSegmentation.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSelectiveSearchSegmentation_10()));
  3045. }
  3046. //
  3047. // C++: Ptr_SuperpixelSLIC cv::ximgproc::createSuperpixelSLIC(Mat image, int algorithm = SLICO, int region_size = 10, float ruler = 10.0f)
  3048. //
  3049. /**
  3050. * Initialize a SuperpixelSLIC object
  3051. *
  3052. * param image Image to segment
  3053. * param algorithm Chooses the algorithm variant to use:
  3054. * SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
  3055. * while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
  3056. * param region_size Chooses an average superpixel size measured in pixels
  3057. * param ruler Chooses the enforcement of superpixel smoothness factor of superpixel
  3058. *
  3059. * The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
  3060. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  3061. * computing iterations over the given image. For enanched results it is recommended for color images to
  3062. * preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
  3063. * CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
  3064. *
  3065. * ![image](pics/superpixels_slic.png)
  3066. * return automatically generated
  3067. */
  3068. public static SuperpixelSLIC createSuperpixelSLIC(Mat image, int algorithm, int region_size, float ruler)
  3069. {
  3070. if (image != null) image.ThrowIfDisposed();
  3071. return SuperpixelSLIC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSLIC_10(image.nativeObj, algorithm, region_size, ruler)));
  3072. }
  3073. /**
  3074. * Initialize a SuperpixelSLIC object
  3075. *
  3076. * param image Image to segment
  3077. * param algorithm Chooses the algorithm variant to use:
  3078. * SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
  3079. * while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
  3080. * param region_size Chooses an average superpixel size measured in pixels
  3081. *
  3082. * The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
  3083. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  3084. * computing iterations over the given image. For enanched results it is recommended for color images to
  3085. * preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
  3086. * CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
  3087. *
  3088. * ![image](pics/superpixels_slic.png)
  3089. * return automatically generated
  3090. */
  3091. public static SuperpixelSLIC createSuperpixelSLIC(Mat image, int algorithm, int region_size)
  3092. {
  3093. if (image != null) image.ThrowIfDisposed();
  3094. return SuperpixelSLIC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSLIC_11(image.nativeObj, algorithm, region_size)));
  3095. }
  3096. /**
  3097. * Initialize a SuperpixelSLIC object
  3098. *
  3099. * param image Image to segment
  3100. * param algorithm Chooses the algorithm variant to use:
  3101. * SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
  3102. * while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
  3103. *
  3104. * The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
  3105. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  3106. * computing iterations over the given image. For enanched results it is recommended for color images to
  3107. * preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
  3108. * CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
  3109. *
  3110. * ![image](pics/superpixels_slic.png)
  3111. * return automatically generated
  3112. */
  3113. public static SuperpixelSLIC createSuperpixelSLIC(Mat image, int algorithm)
  3114. {
  3115. if (image != null) image.ThrowIfDisposed();
  3116. return SuperpixelSLIC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSLIC_12(image.nativeObj, algorithm)));
  3117. }
  3118. /**
  3119. * Initialize a SuperpixelSLIC object
  3120. *
  3121. * param image Image to segment
  3122. * SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
  3123. * while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
  3124. *
  3125. * The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
  3126. * superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
  3127. * computing iterations over the given image. For enanched results it is recommended for color images to
  3128. * preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
  3129. * CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
  3130. *
  3131. * ![image](pics/superpixels_slic.png)
  3132. * return automatically generated
  3133. */
  3134. public static SuperpixelSLIC createSuperpixelSLIC(Mat image)
  3135. {
  3136. if (image != null) image.ThrowIfDisposed();
  3137. return SuperpixelSLIC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createSuperpixelSLIC_13(image.nativeObj)));
  3138. }
  3139. //
  3140. // C++: Ptr_EdgeAwareInterpolator cv::ximgproc::createEdgeAwareInterpolator()
  3141. //
  3142. /**
  3143. * Factory method that creates an instance of the
  3144. * EdgeAwareInterpolator.
  3145. * return automatically generated
  3146. */
  3147. public static EdgeAwareInterpolator createEdgeAwareInterpolator()
  3148. {
  3149. return EdgeAwareInterpolator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createEdgeAwareInterpolator_10()));
  3150. }
  3151. //
  3152. // C++: Ptr_RICInterpolator cv::ximgproc::createRICInterpolator()
  3153. //
  3154. /**
  3155. * Factory method that creates an instance of the
  3156. * RICInterpolator.
  3157. * return automatically generated
  3158. */
  3159. public static RICInterpolator createRICInterpolator()
  3160. {
  3161. return RICInterpolator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createRICInterpolator_10()));
  3162. }
  3163. //
  3164. // C++: Ptr_RFFeatureGetter cv::ximgproc::createRFFeatureGetter()
  3165. //
  3166. public static RFFeatureGetter createRFFeatureGetter()
  3167. {
  3168. return RFFeatureGetter.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createRFFeatureGetter_10()));
  3169. }
  3170. //
  3171. // C++: Ptr_StructuredEdgeDetection cv::ximgproc::createStructuredEdgeDetection(String model, Ptr_RFFeatureGetter howToGetFeatures = Ptr<RFFeatureGetter>())
  3172. //
  3173. public static StructuredEdgeDetection createStructuredEdgeDetection(string model, RFFeatureGetter howToGetFeatures)
  3174. {
  3175. if (howToGetFeatures != null) howToGetFeatures.ThrowIfDisposed();
  3176. return StructuredEdgeDetection.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createStructuredEdgeDetection_10(model, howToGetFeatures.getNativeObjAddr())));
  3177. }
  3178. public static StructuredEdgeDetection createStructuredEdgeDetection(string model)
  3179. {
  3180. return StructuredEdgeDetection.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(ximgproc_Ximgproc_createStructuredEdgeDetection_11(model)));
  3181. }
  3182. //
  3183. // C++: void cv::ximgproc::weightedMedianFilter(Mat joint, Mat src, Mat& dst, int r, double sigma = 25.5, int weightType = WMF_EXP, Mat mask = Mat())
  3184. //
  3185. /**
  3186. * Applies weighted median filter to an image.
  3187. *
  3188. * For more details about this implementation, please see CITE: zhang2014100+
  3189. *
  3190. * the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
  3191. *
  3192. * SEE: medianBlur, jointBilateralFilter
  3193. * param joint automatically generated
  3194. * param src automatically generated
  3195. * param dst automatically generated
  3196. * param r automatically generated
  3197. * param sigma automatically generated
  3198. * param weightType automatically generated
  3199. * param mask automatically generated
  3200. */
  3201. public static void weightedMedianFilter(Mat joint, Mat src, Mat dst, int r, double sigma, int weightType, Mat mask)
  3202. {
  3203. if (joint != null) joint.ThrowIfDisposed();
  3204. if (src != null) src.ThrowIfDisposed();
  3205. if (dst != null) dst.ThrowIfDisposed();
  3206. if (mask != null) mask.ThrowIfDisposed();
  3207. ximgproc_Ximgproc_weightedMedianFilter_10(joint.nativeObj, src.nativeObj, dst.nativeObj, r, sigma, weightType, mask.nativeObj);
  3208. }
  3209. /**
  3210. * Applies weighted median filter to an image.
  3211. *
  3212. * For more details about this implementation, please see CITE: zhang2014100+
  3213. *
  3214. * the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
  3215. *
  3216. * SEE: medianBlur, jointBilateralFilter
  3217. * param joint automatically generated
  3218. * param src automatically generated
  3219. * param dst automatically generated
  3220. * param r automatically generated
  3221. * param sigma automatically generated
  3222. * param weightType automatically generated
  3223. */
  3224. public static void weightedMedianFilter(Mat joint, Mat src, Mat dst, int r, double sigma, int weightType)
  3225. {
  3226. if (joint != null) joint.ThrowIfDisposed();
  3227. if (src != null) src.ThrowIfDisposed();
  3228. if (dst != null) dst.ThrowIfDisposed();
  3229. ximgproc_Ximgproc_weightedMedianFilter_11(joint.nativeObj, src.nativeObj, dst.nativeObj, r, sigma, weightType);
  3230. }
  3231. /**
  3232. * Applies weighted median filter to an image.
  3233. *
  3234. * For more details about this implementation, please see CITE: zhang2014100+
  3235. *
  3236. * the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
  3237. *
  3238. * SEE: medianBlur, jointBilateralFilter
  3239. * param joint automatically generated
  3240. * param src automatically generated
  3241. * param dst automatically generated
  3242. * param r automatically generated
  3243. * param sigma automatically generated
  3244. */
  3245. public static void weightedMedianFilter(Mat joint, Mat src, Mat dst, int r, double sigma)
  3246. {
  3247. if (joint != null) joint.ThrowIfDisposed();
  3248. if (src != null) src.ThrowIfDisposed();
  3249. if (dst != null) dst.ThrowIfDisposed();
  3250. ximgproc_Ximgproc_weightedMedianFilter_12(joint.nativeObj, src.nativeObj, dst.nativeObj, r, sigma);
  3251. }
  3252. /**
  3253. * Applies weighted median filter to an image.
  3254. *
  3255. * For more details about this implementation, please see CITE: zhang2014100+
  3256. *
  3257. * the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
  3258. *
  3259. * SEE: medianBlur, jointBilateralFilter
  3260. * param joint automatically generated
  3261. * param src automatically generated
  3262. * param dst automatically generated
  3263. * param r automatically generated
  3264. */
  3265. public static void weightedMedianFilter(Mat joint, Mat src, Mat dst, int r)
  3266. {
  3267. if (joint != null) joint.ThrowIfDisposed();
  3268. if (src != null) src.ThrowIfDisposed();
  3269. if (dst != null) dst.ThrowIfDisposed();
  3270. ximgproc_Ximgproc_weightedMedianFilter_13(joint.nativeObj, src.nativeObj, dst.nativeObj, r);
  3271. }
  3272. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  3273. const string LIBNAME = "__Internal";
  3274. #else
  3275. const string LIBNAME = "opencvforunity";
  3276. #endif
  3277. // C++: void cv::ximgproc::niBlackThreshold(Mat _src, Mat& _dst, double maxValue, int type, int blockSize, double k, int binarizationMethod = BINARIZATION_NIBLACK, double r = 128)
  3278. [DllImport(LIBNAME)]
  3279. private static extern void ximgproc_Ximgproc_niBlackThreshold_10(IntPtr _src_nativeObj, IntPtr _dst_nativeObj, double maxValue, int type, int blockSize, double k, int binarizationMethod, double r);
  3280. [DllImport(LIBNAME)]
  3281. private static extern void ximgproc_Ximgproc_niBlackThreshold_11(IntPtr _src_nativeObj, IntPtr _dst_nativeObj, double maxValue, int type, int blockSize, double k, int binarizationMethod);
  3282. [DllImport(LIBNAME)]
  3283. private static extern void ximgproc_Ximgproc_niBlackThreshold_12(IntPtr _src_nativeObj, IntPtr _dst_nativeObj, double maxValue, int type, int blockSize, double k);
  3284. // C++: void cv::ximgproc::thinning(Mat src, Mat& dst, int thinningType = THINNING_ZHANGSUEN)
  3285. [DllImport(LIBNAME)]
  3286. private static extern void ximgproc_Ximgproc_thinning_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int thinningType);
  3287. [DllImport(LIBNAME)]
  3288. private static extern void ximgproc_Ximgproc_thinning_11(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3289. // C++: void cv::ximgproc::anisotropicDiffusion(Mat src, Mat& dst, float alpha, float K, int niters)
  3290. [DllImport(LIBNAME)]
  3291. private static extern void ximgproc_Ximgproc_anisotropicDiffusion_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, float alpha, float K, int niters);
  3292. // C++: void cv::ximgproc::createQuaternionImage(Mat img, Mat& qimg)
  3293. [DllImport(LIBNAME)]
  3294. private static extern void ximgproc_Ximgproc_createQuaternionImage_10(IntPtr img_nativeObj, IntPtr qimg_nativeObj);
  3295. // C++: void cv::ximgproc::qconj(Mat qimg, Mat& qcimg)
  3296. [DllImport(LIBNAME)]
  3297. private static extern void ximgproc_Ximgproc_qconj_10(IntPtr qimg_nativeObj, IntPtr qcimg_nativeObj);
  3298. // C++: void cv::ximgproc::qunitary(Mat qimg, Mat& qnimg)
  3299. [DllImport(LIBNAME)]
  3300. private static extern void ximgproc_Ximgproc_qunitary_10(IntPtr qimg_nativeObj, IntPtr qnimg_nativeObj);
  3301. // C++: void cv::ximgproc::qmultiply(Mat src1, Mat src2, Mat& dst)
  3302. [DllImport(LIBNAME)]
  3303. private static extern void ximgproc_Ximgproc_qmultiply_10(IntPtr src1_nativeObj, IntPtr src2_nativeObj, IntPtr dst_nativeObj);
  3304. // C++: void cv::ximgproc::qdft(Mat img, Mat& qimg, int flags, bool sideLeft)
  3305. [DllImport(LIBNAME)]
  3306. private static extern void ximgproc_Ximgproc_qdft_10(IntPtr img_nativeObj, IntPtr qimg_nativeObj, int flags, [MarshalAs(UnmanagedType.U1)] bool sideLeft);
  3307. // C++: void cv::ximgproc::colorMatchTemplate(Mat img, Mat templ, Mat& result)
  3308. [DllImport(LIBNAME)]
  3309. private static extern void ximgproc_Ximgproc_colorMatchTemplate_10(IntPtr img_nativeObj, IntPtr templ_nativeObj, IntPtr result_nativeObj);
  3310. // C++: void cv::ximgproc::GradientDericheY(Mat op, Mat& dst, double alpha, double omega)
  3311. [DllImport(LIBNAME)]
  3312. private static extern void ximgproc_Ximgproc_GradientDericheY_10(IntPtr op_nativeObj, IntPtr dst_nativeObj, double alpha, double omega);
  3313. // C++: void cv::ximgproc::GradientDericheX(Mat op, Mat& dst, double alpha, double omega)
  3314. [DllImport(LIBNAME)]
  3315. private static extern void ximgproc_Ximgproc_GradientDericheX_10(IntPtr op_nativeObj, IntPtr dst_nativeObj, double alpha, double omega);
  3316. // C++: Ptr_DisparityWLSFilter cv::ximgproc::createDisparityWLSFilter(Ptr_StereoMatcher matcher_left)
  3317. [DllImport(LIBNAME)]
  3318. private static extern IntPtr ximgproc_Ximgproc_createDisparityWLSFilter_10(IntPtr matcher_left_nativeObj);
  3319. // C++: Ptr_StereoMatcher cv::ximgproc::createRightMatcher(Ptr_StereoMatcher matcher_left)
  3320. [DllImport(LIBNAME)]
  3321. private static extern IntPtr ximgproc_Ximgproc_createRightMatcher_10(IntPtr matcher_left_nativeObj);
  3322. // C++: Ptr_DisparityWLSFilter cv::ximgproc::createDisparityWLSFilterGeneric(bool use_confidence)
  3323. [DllImport(LIBNAME)]
  3324. private static extern IntPtr ximgproc_Ximgproc_createDisparityWLSFilterGeneric_10([MarshalAs(UnmanagedType.U1)] bool use_confidence);
  3325. // C++: int cv::ximgproc::readGT(String src_path, Mat& dst)
  3326. [DllImport(LIBNAME)]
  3327. private static extern int ximgproc_Ximgproc_readGT_10(string src_path, IntPtr dst_nativeObj);
  3328. // C++: double cv::ximgproc::computeMSE(Mat GT, Mat src, Rect ROI)
  3329. [DllImport(LIBNAME)]
  3330. private static extern double ximgproc_Ximgproc_computeMSE_10(IntPtr GT_nativeObj, IntPtr src_nativeObj, int ROI_x, int ROI_y, int ROI_width, int ROI_height);
  3331. // C++: double cv::ximgproc::computeBadPixelPercent(Mat GT, Mat src, Rect ROI, int thresh = 24)
  3332. [DllImport(LIBNAME)]
  3333. private static extern double ximgproc_Ximgproc_computeBadPixelPercent_10(IntPtr GT_nativeObj, IntPtr src_nativeObj, int ROI_x, int ROI_y, int ROI_width, int ROI_height, int thresh);
  3334. [DllImport(LIBNAME)]
  3335. private static extern double ximgproc_Ximgproc_computeBadPixelPercent_11(IntPtr GT_nativeObj, IntPtr src_nativeObj, int ROI_x, int ROI_y, int ROI_width, int ROI_height);
  3336. // C++: void cv::ximgproc::getDisparityVis(Mat src, Mat& dst, double scale = 1.0)
  3337. [DllImport(LIBNAME)]
  3338. private static extern void ximgproc_Ximgproc_getDisparityVis_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, double scale);
  3339. [DllImport(LIBNAME)]
  3340. private static extern void ximgproc_Ximgproc_getDisparityVis_11(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3341. // C++: Ptr_EdgeBoxes cv::ximgproc::createEdgeBoxes(float alpha = 0.65f, float beta = 0.75f, float eta = 1, float minScore = 0.01f, int maxBoxes = 10000, float edgeMinMag = 0.1f, float edgeMergeThr = 0.5f, float clusterMinMag = 0.5f, float maxAspectRatio = 3, float minBoxArea = 1000, float gamma = 2, float kappa = 1.5f)
  3342. [DllImport(LIBNAME)]
  3343. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_10(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma, float kappa);
  3344. [DllImport(LIBNAME)]
  3345. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_11(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma);
  3346. [DllImport(LIBNAME)]
  3347. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_12(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea);
  3348. [DllImport(LIBNAME)]
  3349. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_13(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio);
  3350. [DllImport(LIBNAME)]
  3351. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_14(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag);
  3352. [DllImport(LIBNAME)]
  3353. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_15(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr);
  3354. [DllImport(LIBNAME)]
  3355. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_16(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag);
  3356. [DllImport(LIBNAME)]
  3357. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_17(float alpha, float beta, float eta, float minScore, int maxBoxes);
  3358. [DllImport(LIBNAME)]
  3359. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_18(float alpha, float beta, float eta, float minScore);
  3360. [DllImport(LIBNAME)]
  3361. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_19(float alpha, float beta, float eta);
  3362. [DllImport(LIBNAME)]
  3363. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_110(float alpha, float beta);
  3364. [DllImport(LIBNAME)]
  3365. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_111(float alpha);
  3366. [DllImport(LIBNAME)]
  3367. private static extern IntPtr ximgproc_Ximgproc_createEdgeBoxes_112();
  3368. // C++: void cv::ximgproc::edgePreservingFilter(Mat src, Mat& dst, int d, double threshold)
  3369. [DllImport(LIBNAME)]
  3370. private static extern void ximgproc_Ximgproc_edgePreservingFilter_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double threshold);
  3371. // C++: Ptr_EdgeDrawing cv::ximgproc::createEdgeDrawing()
  3372. [DllImport(LIBNAME)]
  3373. private static extern IntPtr ximgproc_Ximgproc_createEdgeDrawing_10();
  3374. // C++: Ptr_DTFilter cv::ximgproc::createDTFilter(Mat guide, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3)
  3375. [DllImport(LIBNAME)]
  3376. private static extern IntPtr ximgproc_Ximgproc_createDTFilter_10(IntPtr guide_nativeObj, double sigmaSpatial, double sigmaColor, int mode, int numIters);
  3377. [DllImport(LIBNAME)]
  3378. private static extern IntPtr ximgproc_Ximgproc_createDTFilter_11(IntPtr guide_nativeObj, double sigmaSpatial, double sigmaColor, int mode);
  3379. [DllImport(LIBNAME)]
  3380. private static extern IntPtr ximgproc_Ximgproc_createDTFilter_12(IntPtr guide_nativeObj, double sigmaSpatial, double sigmaColor);
  3381. // C++: void cv::ximgproc::dtFilter(Mat guide, Mat src, Mat& dst, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3)
  3382. [DllImport(LIBNAME)]
  3383. private static extern void ximgproc_Ximgproc_dtFilter_10(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigmaSpatial, double sigmaColor, int mode, int numIters);
  3384. [DllImport(LIBNAME)]
  3385. private static extern void ximgproc_Ximgproc_dtFilter_11(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigmaSpatial, double sigmaColor, int mode);
  3386. [DllImport(LIBNAME)]
  3387. private static extern void ximgproc_Ximgproc_dtFilter_12(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigmaSpatial, double sigmaColor);
  3388. // C++: Ptr_GuidedFilter cv::ximgproc::createGuidedFilter(Mat guide, int radius, double eps)
  3389. [DllImport(LIBNAME)]
  3390. private static extern IntPtr ximgproc_Ximgproc_createGuidedFilter_10(IntPtr guide_nativeObj, int radius, double eps);
  3391. // C++: void cv::ximgproc::guidedFilter(Mat guide, Mat src, Mat& dst, int radius, double eps, int dDepth = -1)
  3392. [DllImport(LIBNAME)]
  3393. private static extern void ximgproc_Ximgproc_guidedFilter_10(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int radius, double eps, int dDepth);
  3394. [DllImport(LIBNAME)]
  3395. private static extern void ximgproc_Ximgproc_guidedFilter_11(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int radius, double eps);
  3396. // C++: Ptr_AdaptiveManifoldFilter cv::ximgproc::createAMFilter(double sigma_s, double sigma_r, bool adjust_outliers = false)
  3397. [DllImport(LIBNAME)]
  3398. private static extern IntPtr ximgproc_Ximgproc_createAMFilter_10(double sigma_s, double sigma_r, [MarshalAs(UnmanagedType.U1)] bool adjust_outliers);
  3399. [DllImport(LIBNAME)]
  3400. private static extern IntPtr ximgproc_Ximgproc_createAMFilter_11(double sigma_s, double sigma_r);
  3401. // C++: void cv::ximgproc::amFilter(Mat joint, Mat src, Mat& dst, double sigma_s, double sigma_r, bool adjust_outliers = false)
  3402. [DllImport(LIBNAME)]
  3403. private static extern void ximgproc_Ximgproc_amFilter_10(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigma_s, double sigma_r, [MarshalAs(UnmanagedType.U1)] bool adjust_outliers);
  3404. [DllImport(LIBNAME)]
  3405. private static extern void ximgproc_Ximgproc_amFilter_11(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigma_s, double sigma_r);
  3406. // C++: void cv::ximgproc::jointBilateralFilter(Mat joint, Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
  3407. [DllImport(LIBNAME)]
  3408. private static extern void ximgproc_Ximgproc_jointBilateralFilter_10(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int borderType);
  3409. [DllImport(LIBNAME)]
  3410. private static extern void ximgproc_Ximgproc_jointBilateralFilter_11(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor, double sigmaSpace);
  3411. // C++: void cv::ximgproc::bilateralTextureFilter(Mat src, Mat& dst, int fr = 3, int numIter = 1, double sigmaAlpha = -1., double sigmaAvg = -1.)
  3412. [DllImport(LIBNAME)]
  3413. private static extern void ximgproc_Ximgproc_bilateralTextureFilter_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int fr, int numIter, double sigmaAlpha, double sigmaAvg);
  3414. [DllImport(LIBNAME)]
  3415. private static extern void ximgproc_Ximgproc_bilateralTextureFilter_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, int fr, int numIter, double sigmaAlpha);
  3416. [DllImport(LIBNAME)]
  3417. private static extern void ximgproc_Ximgproc_bilateralTextureFilter_12(IntPtr src_nativeObj, IntPtr dst_nativeObj, int fr, int numIter);
  3418. [DllImport(LIBNAME)]
  3419. private static extern void ximgproc_Ximgproc_bilateralTextureFilter_13(IntPtr src_nativeObj, IntPtr dst_nativeObj, int fr);
  3420. [DllImport(LIBNAME)]
  3421. private static extern void ximgproc_Ximgproc_bilateralTextureFilter_14(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3422. // C++: void cv::ximgproc::rollingGuidanceFilter(Mat src, Mat& dst, int d = -1, double sigmaColor = 25, double sigmaSpace = 3, int numOfIter = 4, int borderType = BORDER_DEFAULT)
  3423. [DllImport(LIBNAME)]
  3424. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);
  3425. [DllImport(LIBNAME)]
  3426. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter);
  3427. [DllImport(LIBNAME)]
  3428. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_12(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor, double sigmaSpace);
  3429. [DllImport(LIBNAME)]
  3430. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_13(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d, double sigmaColor);
  3431. [DllImport(LIBNAME)]
  3432. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_14(IntPtr src_nativeObj, IntPtr dst_nativeObj, int d);
  3433. [DllImport(LIBNAME)]
  3434. private static extern void ximgproc_Ximgproc_rollingGuidanceFilter_15(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3435. // C++: Ptr_FastBilateralSolverFilter cv::ximgproc::createFastBilateralSolverFilter(Mat guide, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda = 128.0, int num_iter = 25, double max_tol = 1e-5)
  3436. [DllImport(LIBNAME)]
  3437. private static extern IntPtr ximgproc_Ximgproc_createFastBilateralSolverFilter_10(IntPtr guide_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter, double max_tol);
  3438. [DllImport(LIBNAME)]
  3439. private static extern IntPtr ximgproc_Ximgproc_createFastBilateralSolverFilter_11(IntPtr guide_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter);
  3440. [DllImport(LIBNAME)]
  3441. private static extern IntPtr ximgproc_Ximgproc_createFastBilateralSolverFilter_12(IntPtr guide_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda);
  3442. [DllImport(LIBNAME)]
  3443. private static extern IntPtr ximgproc_Ximgproc_createFastBilateralSolverFilter_13(IntPtr guide_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma);
  3444. // C++: void cv::ximgproc::fastBilateralSolverFilter(Mat guide, Mat src, Mat confidence, Mat& dst, double sigma_spatial = 8, double sigma_luma = 8, double sigma_chroma = 8, double lambda = 128.0, int num_iter = 25, double max_tol = 1e-5)
  3445. [DllImport(LIBNAME)]
  3446. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_10(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter, double max_tol);
  3447. [DllImport(LIBNAME)]
  3448. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_11(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda, int num_iter);
  3449. [DllImport(LIBNAME)]
  3450. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_12(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma, double lambda);
  3451. [DllImport(LIBNAME)]
  3452. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_13(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial, double sigma_luma, double sigma_chroma);
  3453. [DllImport(LIBNAME)]
  3454. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_14(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial, double sigma_luma);
  3455. [DllImport(LIBNAME)]
  3456. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_15(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj, double sigma_spatial);
  3457. [DllImport(LIBNAME)]
  3458. private static extern void ximgproc_Ximgproc_fastBilateralSolverFilter_16(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr confidence_nativeObj, IntPtr dst_nativeObj);
  3459. // C++: Ptr_FastGlobalSmootherFilter cv::ximgproc::createFastGlobalSmootherFilter(Mat guide, double lambda, double sigma_color, double lambda_attenuation = 0.25, int num_iter = 3)
  3460. [DllImport(LIBNAME)]
  3461. private static extern IntPtr ximgproc_Ximgproc_createFastGlobalSmootherFilter_10(IntPtr guide_nativeObj, double lambda, double sigma_color, double lambda_attenuation, int num_iter);
  3462. [DllImport(LIBNAME)]
  3463. private static extern IntPtr ximgproc_Ximgproc_createFastGlobalSmootherFilter_11(IntPtr guide_nativeObj, double lambda, double sigma_color, double lambda_attenuation);
  3464. [DllImport(LIBNAME)]
  3465. private static extern IntPtr ximgproc_Ximgproc_createFastGlobalSmootherFilter_12(IntPtr guide_nativeObj, double lambda, double sigma_color);
  3466. // C++: void cv::ximgproc::fastGlobalSmootherFilter(Mat guide, Mat src, Mat& dst, double lambda, double sigma_color, double lambda_attenuation = 0.25, int num_iter = 3)
  3467. [DllImport(LIBNAME)]
  3468. private static extern void ximgproc_Ximgproc_fastGlobalSmootherFilter_10(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double lambda, double sigma_color, double lambda_attenuation, int num_iter);
  3469. [DllImport(LIBNAME)]
  3470. private static extern void ximgproc_Ximgproc_fastGlobalSmootherFilter_11(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double lambda, double sigma_color, double lambda_attenuation);
  3471. [DllImport(LIBNAME)]
  3472. private static extern void ximgproc_Ximgproc_fastGlobalSmootherFilter_12(IntPtr guide_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, double lambda, double sigma_color);
  3473. // C++: void cv::ximgproc::l0Smooth(Mat src, Mat& dst, double lambda = 0.02, double kappa = 2.0)
  3474. [DllImport(LIBNAME)]
  3475. private static extern void ximgproc_Ximgproc_l0Smooth_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, double lambda, double kappa);
  3476. [DllImport(LIBNAME)]
  3477. private static extern void ximgproc_Ximgproc_l0Smooth_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, double lambda);
  3478. [DllImport(LIBNAME)]
  3479. private static extern void ximgproc_Ximgproc_l0Smooth_12(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3480. // C++: void cv::ximgproc::covarianceEstimation(Mat src, Mat& dst, int windowRows, int windowCols)
  3481. [DllImport(LIBNAME)]
  3482. private static extern void ximgproc_Ximgproc_covarianceEstimation_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int windowRows, int windowCols);
  3483. // C++: void cv::ximgproc::FastHoughTransform(Mat src, Mat& dst, int dstMatDepth, int angleRange = ARO_315_135, int op = FHT_ADD, int makeSkew = HDO_DESKEW)
  3484. [DllImport(LIBNAME)]
  3485. private static extern void ximgproc_Ximgproc_FastHoughTransform_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int dstMatDepth, int angleRange, int op, int makeSkew);
  3486. [DllImport(LIBNAME)]
  3487. private static extern void ximgproc_Ximgproc_FastHoughTransform_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, int dstMatDepth, int angleRange, int op);
  3488. [DllImport(LIBNAME)]
  3489. private static extern void ximgproc_Ximgproc_FastHoughTransform_12(IntPtr src_nativeObj, IntPtr dst_nativeObj, int dstMatDepth, int angleRange);
  3490. [DllImport(LIBNAME)]
  3491. private static extern void ximgproc_Ximgproc_FastHoughTransform_13(IntPtr src_nativeObj, IntPtr dst_nativeObj, int dstMatDepth);
  3492. // C++: Ptr_FastLineDetector cv::ximgproc::createFastLineDetector(int length_threshold = 10, float distance_threshold = 1.414213562f, double canny_th1 = 50.0, double canny_th2 = 50.0, int canny_aperture_size = 3, bool do_merge = false)
  3493. [DllImport(LIBNAME)]
  3494. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_10(int length_threshold, float distance_threshold, double canny_th1, double canny_th2, int canny_aperture_size, [MarshalAs(UnmanagedType.U1)] bool do_merge);
  3495. [DllImport(LIBNAME)]
  3496. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_11(int length_threshold, float distance_threshold, double canny_th1, double canny_th2, int canny_aperture_size);
  3497. [DllImport(LIBNAME)]
  3498. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_12(int length_threshold, float distance_threshold, double canny_th1, double canny_th2);
  3499. [DllImport(LIBNAME)]
  3500. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_13(int length_threshold, float distance_threshold, double canny_th1);
  3501. [DllImport(LIBNAME)]
  3502. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_14(int length_threshold, float distance_threshold);
  3503. [DllImport(LIBNAME)]
  3504. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_15(int length_threshold);
  3505. [DllImport(LIBNAME)]
  3506. private static extern IntPtr ximgproc_Ximgproc_createFastLineDetector_16();
  3507. // C++: void cv::ximgproc::findEllipses(Mat image, Mat& ellipses, float scoreThreshold = 0.7f, float reliabilityThreshold = 0.5f, float centerDistanceThreshold = 0.05f)
  3508. [DllImport(LIBNAME)]
  3509. private static extern void ximgproc_Ximgproc_findEllipses_10(IntPtr image_nativeObj, IntPtr ellipses_nativeObj, float scoreThreshold, float reliabilityThreshold, float centerDistanceThreshold);
  3510. [DllImport(LIBNAME)]
  3511. private static extern void ximgproc_Ximgproc_findEllipses_11(IntPtr image_nativeObj, IntPtr ellipses_nativeObj, float scoreThreshold, float reliabilityThreshold);
  3512. [DllImport(LIBNAME)]
  3513. private static extern void ximgproc_Ximgproc_findEllipses_12(IntPtr image_nativeObj, IntPtr ellipses_nativeObj, float scoreThreshold);
  3514. [DllImport(LIBNAME)]
  3515. private static extern void ximgproc_Ximgproc_findEllipses_13(IntPtr image_nativeObj, IntPtr ellipses_nativeObj);
  3516. // C++: void cv::ximgproc::fourierDescriptor(Mat src, Mat& dst, int nbElt = -1, int nbFD = -1)
  3517. [DllImport(LIBNAME)]
  3518. private static extern void ximgproc_Ximgproc_fourierDescriptor_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, int nbElt, int nbFD);
  3519. [DllImport(LIBNAME)]
  3520. private static extern void ximgproc_Ximgproc_fourierDescriptor_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, int nbElt);
  3521. [DllImport(LIBNAME)]
  3522. private static extern void ximgproc_Ximgproc_fourierDescriptor_12(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3523. // C++: void cv::ximgproc::transformFD(Mat src, Mat t, Mat& dst, bool fdContour = true)
  3524. [DllImport(LIBNAME)]
  3525. private static extern void ximgproc_Ximgproc_transformFD_10(IntPtr src_nativeObj, IntPtr t_nativeObj, IntPtr dst_nativeObj, [MarshalAs(UnmanagedType.U1)] bool fdContour);
  3526. [DllImport(LIBNAME)]
  3527. private static extern void ximgproc_Ximgproc_transformFD_11(IntPtr src_nativeObj, IntPtr t_nativeObj, IntPtr dst_nativeObj);
  3528. // C++: void cv::ximgproc::contourSampling(Mat src, Mat& _out, int nbElt)
  3529. [DllImport(LIBNAME)]
  3530. private static extern void ximgproc_Ximgproc_contourSampling_10(IntPtr src_nativeObj, IntPtr _out_nativeObj, int nbElt);
  3531. // C++: Ptr_ContourFitting cv::ximgproc::createContourFitting(int ctr = 1024, int fd = 16)
  3532. [DllImport(LIBNAME)]
  3533. private static extern IntPtr ximgproc_Ximgproc_createContourFitting_10(int ctr, int fd);
  3534. [DllImport(LIBNAME)]
  3535. private static extern IntPtr ximgproc_Ximgproc_createContourFitting_11(int ctr);
  3536. [DllImport(LIBNAME)]
  3537. private static extern IntPtr ximgproc_Ximgproc_createContourFitting_12();
  3538. // C++: Ptr_SuperpixelLSC cv::ximgproc::createSuperpixelLSC(Mat image, int region_size = 10, float ratio = 0.075f)
  3539. [DllImport(LIBNAME)]
  3540. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelLSC_10(IntPtr image_nativeObj, int region_size, float ratio);
  3541. [DllImport(LIBNAME)]
  3542. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelLSC_11(IntPtr image_nativeObj, int region_size);
  3543. [DllImport(LIBNAME)]
  3544. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelLSC_12(IntPtr image_nativeObj);
  3545. // C++: void cv::ximgproc::PeiLinNormalization(Mat I, Mat& T)
  3546. [DllImport(LIBNAME)]
  3547. private static extern void ximgproc_Ximgproc_PeiLinNormalization_10(IntPtr I_nativeObj, IntPtr T_nativeObj);
  3548. // C++: void cv::ximgproc::RadonTransform(Mat src, Mat& dst, double theta = 1, double start_angle = 0, double end_angle = 180, bool crop = false, bool norm = false)
  3549. [DllImport(LIBNAME)]
  3550. private static extern void ximgproc_Ximgproc_RadonTransform_10(IntPtr src_nativeObj, IntPtr dst_nativeObj, double theta, double start_angle, double end_angle, [MarshalAs(UnmanagedType.U1)] bool crop, [MarshalAs(UnmanagedType.U1)] bool norm);
  3551. [DllImport(LIBNAME)]
  3552. private static extern void ximgproc_Ximgproc_RadonTransform_11(IntPtr src_nativeObj, IntPtr dst_nativeObj, double theta, double start_angle, double end_angle, [MarshalAs(UnmanagedType.U1)] bool crop);
  3553. [DllImport(LIBNAME)]
  3554. private static extern void ximgproc_Ximgproc_RadonTransform_12(IntPtr src_nativeObj, IntPtr dst_nativeObj, double theta, double start_angle, double end_angle);
  3555. [DllImport(LIBNAME)]
  3556. private static extern void ximgproc_Ximgproc_RadonTransform_13(IntPtr src_nativeObj, IntPtr dst_nativeObj, double theta, double start_angle);
  3557. [DllImport(LIBNAME)]
  3558. private static extern void ximgproc_Ximgproc_RadonTransform_14(IntPtr src_nativeObj, IntPtr dst_nativeObj, double theta);
  3559. [DllImport(LIBNAME)]
  3560. private static extern void ximgproc_Ximgproc_RadonTransform_15(IntPtr src_nativeObj, IntPtr dst_nativeObj);
  3561. // C++: Ptr_ScanSegment cv::ximgproc::createScanSegment(int image_width, int image_height, int num_superpixels, int slices = 8, bool merge_small = true)
  3562. [DllImport(LIBNAME)]
  3563. private static extern IntPtr ximgproc_Ximgproc_createScanSegment_10(int image_width, int image_height, int num_superpixels, int slices, [MarshalAs(UnmanagedType.U1)] bool merge_small);
  3564. [DllImport(LIBNAME)]
  3565. private static extern IntPtr ximgproc_Ximgproc_createScanSegment_11(int image_width, int image_height, int num_superpixels, int slices);
  3566. [DllImport(LIBNAME)]
  3567. private static extern IntPtr ximgproc_Ximgproc_createScanSegment_12(int image_width, int image_height, int num_superpixels);
  3568. // C++: Ptr_SuperpixelSEEDS cv::ximgproc::createSuperpixelSEEDS(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior = 2, int histogram_bins = 5, bool double_step = false)
  3569. [DllImport(LIBNAME)]
  3570. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSEEDS_10(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior, int histogram_bins, [MarshalAs(UnmanagedType.U1)] bool double_step);
  3571. [DllImport(LIBNAME)]
  3572. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSEEDS_11(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior, int histogram_bins);
  3573. [DllImport(LIBNAME)]
  3574. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSEEDS_12(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels, int prior);
  3575. [DllImport(LIBNAME)]
  3576. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSEEDS_13(int image_width, int image_height, int image_channels, int num_superpixels, int num_levels);
  3577. // C++: Ptr_GraphSegmentation cv::ximgproc::segmentation::createGraphSegmentation(double sigma = 0.5, float k = 300, int min_size = 100)
  3578. [DllImport(LIBNAME)]
  3579. private static extern IntPtr ximgproc_Ximgproc_createGraphSegmentation_10(double sigma, float k, int min_size);
  3580. [DllImport(LIBNAME)]
  3581. private static extern IntPtr ximgproc_Ximgproc_createGraphSegmentation_11(double sigma, float k);
  3582. [DllImport(LIBNAME)]
  3583. private static extern IntPtr ximgproc_Ximgproc_createGraphSegmentation_12(double sigma);
  3584. [DllImport(LIBNAME)]
  3585. private static extern IntPtr ximgproc_Ximgproc_createGraphSegmentation_13();
  3586. // C++: Ptr_SelectiveSearchSegmentationStrategyColor cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyColor()
  3587. [DllImport(LIBNAME)]
  3588. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyColor_10();
  3589. // C++: Ptr_SelectiveSearchSegmentationStrategySize cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategySize()
  3590. [DllImport(LIBNAME)]
  3591. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategySize_10();
  3592. // C++: Ptr_SelectiveSearchSegmentationStrategyTexture cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyTexture()
  3593. [DllImport(LIBNAME)]
  3594. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyTexture_10();
  3595. // C++: Ptr_SelectiveSearchSegmentationStrategyFill cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyFill()
  3596. [DllImport(LIBNAME)]
  3597. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyFill_10();
  3598. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple()
  3599. [DllImport(LIBNAME)]
  3600. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_10();
  3601. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1)
  3602. [DllImport(LIBNAME)]
  3603. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_11(IntPtr s1_nativeObj);
  3604. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2)
  3605. [DllImport(LIBNAME)]
  3606. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_12(IntPtr s1_nativeObj, IntPtr s2_nativeObj);
  3607. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2, Ptr_SelectiveSearchSegmentationStrategy s3)
  3608. [DllImport(LIBNAME)]
  3609. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_13(IntPtr s1_nativeObj, IntPtr s2_nativeObj, IntPtr s3_nativeObj);
  3610. // C++: Ptr_SelectiveSearchSegmentationStrategyMultiple cv::ximgproc::segmentation::createSelectiveSearchSegmentationStrategyMultiple(Ptr_SelectiveSearchSegmentationStrategy s1, Ptr_SelectiveSearchSegmentationStrategy s2, Ptr_SelectiveSearchSegmentationStrategy s3, Ptr_SelectiveSearchSegmentationStrategy s4)
  3611. [DllImport(LIBNAME)]
  3612. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentationStrategyMultiple_14(IntPtr s1_nativeObj, IntPtr s2_nativeObj, IntPtr s3_nativeObj, IntPtr s4_nativeObj);
  3613. // C++: Ptr_SelectiveSearchSegmentation cv::ximgproc::segmentation::createSelectiveSearchSegmentation()
  3614. [DllImport(LIBNAME)]
  3615. private static extern IntPtr ximgproc_Ximgproc_createSelectiveSearchSegmentation_10();
  3616. // C++: Ptr_SuperpixelSLIC cv::ximgproc::createSuperpixelSLIC(Mat image, int algorithm = SLICO, int region_size = 10, float ruler = 10.0f)
  3617. [DllImport(LIBNAME)]
  3618. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSLIC_10(IntPtr image_nativeObj, int algorithm, int region_size, float ruler);
  3619. [DllImport(LIBNAME)]
  3620. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSLIC_11(IntPtr image_nativeObj, int algorithm, int region_size);
  3621. [DllImport(LIBNAME)]
  3622. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSLIC_12(IntPtr image_nativeObj, int algorithm);
  3623. [DllImport(LIBNAME)]
  3624. private static extern IntPtr ximgproc_Ximgproc_createSuperpixelSLIC_13(IntPtr image_nativeObj);
  3625. // C++: Ptr_EdgeAwareInterpolator cv::ximgproc::createEdgeAwareInterpolator()
  3626. [DllImport(LIBNAME)]
  3627. private static extern IntPtr ximgproc_Ximgproc_createEdgeAwareInterpolator_10();
  3628. // C++: Ptr_RICInterpolator cv::ximgproc::createRICInterpolator()
  3629. [DllImport(LIBNAME)]
  3630. private static extern IntPtr ximgproc_Ximgproc_createRICInterpolator_10();
  3631. // C++: Ptr_RFFeatureGetter cv::ximgproc::createRFFeatureGetter()
  3632. [DllImport(LIBNAME)]
  3633. private static extern IntPtr ximgproc_Ximgproc_createRFFeatureGetter_10();
  3634. // C++: Ptr_StructuredEdgeDetection cv::ximgproc::createStructuredEdgeDetection(String model, Ptr_RFFeatureGetter howToGetFeatures = Ptr<RFFeatureGetter>())
  3635. [DllImport(LIBNAME)]
  3636. private static extern IntPtr ximgproc_Ximgproc_createStructuredEdgeDetection_10(string model, IntPtr howToGetFeatures_nativeObj);
  3637. [DllImport(LIBNAME)]
  3638. private static extern IntPtr ximgproc_Ximgproc_createStructuredEdgeDetection_11(string model);
  3639. // C++: void cv::ximgproc::weightedMedianFilter(Mat joint, Mat src, Mat& dst, int r, double sigma = 25.5, int weightType = WMF_EXP, Mat mask = Mat())
  3640. [DllImport(LIBNAME)]
  3641. private static extern void ximgproc_Ximgproc_weightedMedianFilter_10(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int r, double sigma, int weightType, IntPtr mask_nativeObj);
  3642. [DllImport(LIBNAME)]
  3643. private static extern void ximgproc_Ximgproc_weightedMedianFilter_11(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int r, double sigma, int weightType);
  3644. [DllImport(LIBNAME)]
  3645. private static extern void ximgproc_Ximgproc_weightedMedianFilter_12(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int r, double sigma);
  3646. [DllImport(LIBNAME)]
  3647. private static extern void ximgproc_Ximgproc_weightedMedianFilter_13(IntPtr joint_nativeObj, IntPtr src_nativeObj, IntPtr dst_nativeObj, int r);
  3648. }
  3649. }