Skip to content

Conversation

@Shreeshrii
Copy link
Collaborator

Fixes #1052

@amitdo
Copy link
Collaborator

amitdo commented Feb 21, 2019

Shree, I don't think mixing the distort & degrade methods is right.

Basically, the distort method should be directly called from text2image.cpp.

@zdenop zdenop merged commit c02f5e9 into tesseract-ocr:master Feb 22, 2019
(*boxes)[b].set_right((*boxes)[b].left() + 1);
}
}
if (invert && randomizer->SignedRand(1.0) < -0.9)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why -0.9?

I think it should be kept as 0 (50% percents of images inverted).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also,

  • Todo -> TODO (like in other places in the codebase).
  • Why are you keeping the commented code in DegradeImage()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 (50% percents of images inverted).

Is that a realistic expectation of the types of images which will be OCRed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Todo -> TODO (like in other places in the codebase).

OK.

  • Why are you keeping the commented code in DegradeImage()?

I meant to delete it after the changes to text2image worked fine. I will fix that.

@amitdo
Copy link
Collaborator

amitdo commented Feb 23, 2019

0 (50% percents of images inverted).

Is that a realistic expectation of the types of images which will be OCRed?

Generally no, but...
If you want good accuracy for inverted images, you should train with enough samples.

@Shreeshrii
Copy link
Collaborator Author

If you want good accuracy for inverted images, you should train with enough samples.

OK, that makes sense. I will change it to 0.

Thanks!

@amitdo
Copy link
Collaborator

amitdo commented Feb 23, 2019

Thanks!

Thank you too :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused function PrepareDistortedPix()

3 participants