Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Finding a simple corner in a simple PDF

Posted 1 year ago
POSTED BY: Rodrigo Amor
2 Replies

Rodrigo,

here is one way:

img0 = First@Import["SamplePDF.pdf"]

enter image description here

img = ColorNegate@Nest[ColorNegate@*DeleteSmallComponents, img0, 2];
bbox = ComponentMeasurements[img, "BoundingBox"];
HighlightImage[img0, bbox]

enter image description here

Isn't Mathematica just great ?!! Regards -- Henrik

Attachments:
POSTED BY: Henrik Schachner
Posted 1 year ago

I'm not sure whether or not this is too late or even worth your time, but it seems to me that perhaps you might be better to use Mathematica's built-in image selection tool? If you have your image in the processor, you can click on it and an array of options comes up. From there you can select the region you want, copy it and then run TextRecognize on it to get the text, from which you can then output to wherever you want. It might take a little longer than having Mathematica do it automatically, but from my experience using functions like ImageCorners is problematic when text is involved.

It would probably take less time than marking the red spots and then coding something to create bounding boxes, in my opinion at least. This might not be what you're looking for, but hope it helps!

POSTED BY: Theo Vine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard