Ask Your Question

Revision history [back]

Your question has many sub-question, I will try to get pointer for each point.

  1. See getRotationMatrix2D and this sample.
  2. No idea, but you seem to know how to do...
  3. Use threshold function, where each pixel below thresh will be white, and pixels above thresh will be black.
  4. You can detect each hole with Hough or use a simple medianBlur for example. It depends on your hole, maybe with an image sample, we could have more relevant idea.
  5. See this post where the thinning methods seem adapted to your context.
  6. A simple filter could be tested, but, you probably have to do some bibliography on that topic (look at research paper, which could be coded with OpenCV features.
  7. I don't understand what you mean here. Filter JPEG blocks? See if the image was in JPEG? Please give some more explanations.

To use every OpenCV functions with the java binding, see the doc here.