This is my original painting, and I want to find a plate to look for the number plate in this rectangle instead of looking for the whole picture
Original image test_1.jpg:

using the following code in javacv:
IplImage originalImage = cvLoadImage("test_1.jpg"); IplImage resultImage = IplImage.create(originalImage.width(), originalImage.height(), IPL_DEPTH_8U, 1); cvCvtColor(originalImage, resultImage, CV_BGR2GRAY); cvAdaptiveThreshold(resultImage, resultImage, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY_INV, 7, 7); cvSaveImage("test_2.jpg", resultImage);
The resulting image - test_2.jpg looks like this:

and adding this code specifying the thresholdImg resultImg
static void findLines(IplImage thresholdImg) { IplImage dst; IplImage colorDst; dst = cvCreateImage(cvGetSize(thresholdImg), thresholdImg.depth(), 1); colorDst = cvCreateImage(cvGetSize(thresholdImg), thresholdImg.depth(), 3); cvCanny(thresholdImg, dst, 100, 200, 3); CvSeq lines = new CvSeq(); CvMemStorage storage = cvCreateMemStorage(100000); cvSaveImage("test_3.jpg", dst); }
Final image test_3.jpg:

Is there any picture of what I generated that I can use to continue my code to find the rectangle containing the plate in the image.
java image-processing opencv javacv
Haddev
source share