Jump to content

Translate OpenCV Code / Or compile code


Recommended Posts

Hi!

I´m trying to write a little Graphic-Tool and now I´ve found what I needed!!

But I can´t get it to work! How can I translate this code to AutoIt? Or can someone tell me how to compile this code to an usable File to work with in AutoIt??

Code:

cv::Mat skel(img.size(), CV_8UC1, cv::Scalar(0));
cv::Mat temp;
cv::Mat eroded;

cv::Mat element = cv::getStructuringElement(cv::MORPH_CROSS, cv::Size(3, 3));

bool done; 
do
{
  cv::erode(img, eroded, element);
  cv::dilate(eroded, temp, element); // temp = open(img)
  cv::subtract(img, temp, temp);
  cv::bitwise_or(skel, temp, skel);
  eroded.copyTo(img);

  done = (cv::norm(img) == 0);
} while (!done);
Link to comment
Share on other sites

  • Moderators

Morrison, it will be much easier to give a detailed description of what you're attempting to do, as ZacUSNYR pointed out, than expecting someone on an AutoIT forum to parse your code from another language for you, then port it into AutoIT. I guarantee if you lay out, step by step, what you would like to do, someone will be able to assist you much more quickly.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...