<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div style="" class="" itemprop="description">
<div style="" class="">I have thes 3 defcfuns, for OpenCV functions (C++) which have
been wrapped in C(C and C+++ function definitions have been included),
the top 2, <code style="" class="">%brisk</code> and <code style="" class="">surf0</code> can both can be used as the <code style="" class="">(self feature-detector)</code> param in the bottom one, <code style="" class="">%feat-detect-detect</code> If the output of the top two and the <code style="" class="">self</code> param of <code style="" class="">feat-detect-detect</code>
are just :pointer, But I need to have all three of their types defined
similiarly to the ones on the bottom of the page so I can use
finalizers. All of the finalizers and types for the three are the same,
just substitute in <code style="" class="">brisk</code> and <code style="" class="">surf</code> for <code style="" class="">feature-detector</code>
in the four functions at the bottom of the page and you will know what
each looks like. Should I just call the types for the output of <code style="" class="">brisk</code> and <code style="" class="">surf</code> and the input type of<code style="" class="">feat-detect-detect</code>
by the same name, and make them all use the same 4 function
type/finalizer combo at the bottom of the page, or is there a better
way.</div>
<pre style="" class=""><code style="" class=""><span style="" class=""> </span><span style="" class="">;; BRISK::BRISK(int thresh=30, int octaves=3, float patternScale=1.0f)</span><span style="" class="">
</span><span style="" class="">;; BRISK* cv_create_BRISK(int thresh, int octaves, float patternScale)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defcfun </span><span style="" class="">(</span><span style="" class="">"cv_create_BRISK"</span><span style="" class=""> </span><span style="" class="">%</span><span style="" class="">brisk</span><span style="" class="">)</span><span style="" class=""> brisk
</span><span style="" class="">(</span><span style="" class="">thresh </span><span style="" class="">:</span><span style="" class="">int</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">octaves </span><span style="" class="">:</span><span style="" class="">int</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">pattern-scale </span><span style="" class="">:</span><span style="" class="">float</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">;; SURF::SURF()</span><span style="" class="">
</span><span style="" class="">;; SURF* cv_create_SURF() </span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defcfun </span><span style="" class="">(</span><span style="" class="">"cv_create_SURF"</span><span style="" class=""> surf0</span><span style="" class="">)</span><span style="" class=""> surf</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">;; void FeatureDetector::detect(const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const</span><span style="" class="">
</span><span style="" class="">;; void cv_FeatureDetector_detect3(FeatureDetector* self, Mat* image, vector_KeyPoint* keypoints, Mat* mask)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defcfun </span><span style="" class="">(</span><span style="" class="">"cv_FeatureDetector_detect3"</span><span style="" class=""> </span><span style="" class="">%</span><span style="" class="">feat-detector-detect</span><span style="" class="">)</span><span style="" class=""> </span><span style="" class="">:</span><span style="" class="">void
</span><span style="" class="">(</span><span style="" class="">self feature-detector</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">image mat</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">keypoints </span><span style="" class="">(</span><span style="" class="">:</span><span style="" class="">pointer vector-keypoint</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">mask mat</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">define</span><span style="" class="">-foreign-type feature-detector </span><span style="" class="">(</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">((</span><span style="" class="">garbage-collect </span><span style="" class="">:</span><span style="" class="">reader garbage-collect </span><span style="" class="">:</span><span style="" class="">initform </span><span style="" class="">nil</span><span style="" class=""> </span><span style="" class="">:</span><span style="" class="">initarg
</span><span style="" class="">:</span><span style="" class="">garbage-collect</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">:</span><span style="" class="">actual-type </span><span style="" class="">:</span><span style="" class="">pointer</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">:</span><span style="" class="">simple-parser feature-detector</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defclass cv-feature-detector </span><span style="" class="">(</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">((</span><span style="" class="">c-pointer </span><span style="" class="">:</span><span style="" class="">reader c-pointer </span><span style="" class="">:</span><span style="" class="">initarg </span><span style="" class="">:</span><span style="" class="">c-pointer</span><span style="" class="">)))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defmethod translate-to-foreign </span><span style="" class="">((</span><span style="" class="">lisp-value cv-feature-detector</span><span style="" class="">)</span><span style="" class=""> </span><span style="" class="">(</span><span style="" class="">c-type feature-detector</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">c-pointer lisp-value</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">defmethod translate-from-foreign </span><span style="" class="">(</span><span style="" class="">c-pointer </span><span style="" class="">(</span><span style="" class="">c-type feature-detector</span><span style="" class="">))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">let</span><span style="" class=""> </span><span style="" class="">((</span><span style="" class="">feature-detector </span><span style="" class="">(</span><span style="" class="">make-instance </span><span style="" class="">'cv-feature-detector</span><span style="" class=""> </span><span style="" class="">:</span><span style="" class="">c-pointer c-pointer</span><span style="" class="">)))</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">when </span><span style="" class="">(</span><span style="" class="">garbage-collect c-type</span><span style="" class="">)</span><span style="" class="">
</span><span style="" class="">(</span><span style="" class="">tg</span><span style="" class="">:</span><span style="" class="">finalize feature-detector </span><span style="" class="">(</span><span style="" class="">lambda</span><span style="" class=""> </span><span style="" class="">(</span><span style="" class="">)</span><span style="" class=""> </span><span style="" class="">(</span><span style="" class="">del-feature-detector c-pointer</span><span style="" class="">))))</span><span style="" class="">
feature-detector</span><span style="" class="">))</span><span style="" class="">
ound matches of keypoints from two images</span><span style="" class="">.</span><span style="" class="">"
(%draw-matches img1 keypoints1 img2 keypoints2 matches1to2 outimg match-color single-point-color matches-mask flags))</span></code></pre>
</div><div style="" class=""><br style=""></div></div></body></html>