Jump to content
Sign in to follow this  

Translate OpenCV Code / Or compile code

Recommended Posts



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??


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; 
  cv::erode(img, eroded, element);
  cv::dilate(eroded, temp, element); // temp = open(img)
  cv::subtract(img, temp, temp);
  cv::bitwise_or(skel, temp, skel);

  done = (cv::norm(img) == 0);
} while (!done);

Share this post

Link to post
Share on other sites

What does that do for someone who knows nothing about OpenCV?

As in... what are you trying to accomplish?

Share this post

Link to post
Share on other sites

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.

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post

Link to post
Share on other sites


I´ve .jpg´s showing characters for each letter and installed Font.

Now I want to set an Array containing data about edge distance.

So I can set data with highest value to skelett-line.

Example 'O'

Share this post

Link to post
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
Sign in to follow this