auto crop image (need idea or code)

1 visualizzazione (ultimi 30 giorni)
symmm
symmm il 24 Apr 2017
Commentato: symmm il 26 Apr 2017
Hey. I want to auto crop/trim the attached image. An image for every kanji character should be the solution. thanks for the help.
  2 Commenti
Rik
Rik il 24 Apr 2017
Unless every pixel is identical for each character, this will be very difficult. If you are in luck, you can simply look for completely white rows to separate the characters.
Image Analyst
Image Analyst il 24 Apr 2017
It looks like there is kerning involved, so looking for white columns won't solve the problem.

Accedi per commentare.

Risposta accettata

Image Analyst
Image Analyst il 24 Apr 2017
23.4.4 Chinese and Kanji Characters
23.4.4.1 Chinese Characters, Review, Survey, Evaluations
23.4.4.2 Chinese Characters, Using Stroke and Radical Analysis, Features
23.4.4.3 Chinese Characters, Japanese Characters, Handwritten
23.4.4.4 Online Recognition of Chinese Characters
23.4.4.5 Chinese Character Seals
  6 Commenti
Image Analyst
Image Analyst il 25 Apr 2017
Modificato: Image Analyst il 26 Apr 2017
symmm, just try the attached code and you'll see it gets every character in every row.
symmm
symmm il 26 Apr 2017
Thank You!

Accedi per commentare.

Più risposte (1)

symmm
symmm il 25 Apr 2017
Thanks for the help, but i need to solve this without using ocr(school project). I think i didn't explain the problem enough. I need to trim the strip (see red line for example).
So is there a possibility to count the white pixels between the kanji characters. Or maybe search for a box with white pixels (see black box in picture) and find out the center of the box for the x, y coordinate.
  1 Commento
Rik
Rik il 25 Apr 2017
For that orange line, you can use my idea of looking for white rows. To separate them further is much more complicated.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by