How to extract and detect repeated texture patterns in a vector-based PDF? #4580
Replies: 1 comment 1 reply
-
Thanks for your appreciation and compliments. Otherwise ... hm! It seems the issue is not the extraction itself but how to define & detect a new class of drawings. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a vector-based architectural floor plan PDF that uses repeating textures (known as Hatches) to represent things like new walls or demolition. These patterns/textures also appear in a legend box.
I’m trying to:
1. Extract a texture from the legend area (Currently manually cropping it and saving as PNG).
2. Detect where it appears elsewhere on the page
3. Measure its total area.
I’d like to work with the vector data directly using PyMuPDF, rather than rendering to an image.
Is it possible to access and compare these texture fills or path objects in PyMuPDF? Any tips for matching repeated textures across regions?
Unfortunatly I am unable to share the original PDF file, but I did extact drawing and re-drawed them by layers to seperate PDF files that I can share.
Example of layer 1:
500-Harisa.pdf
Example of layer 2:
Wall-new.pdf
I would highly appreciate any help with this situation!
Besides that, for a different task - symbols detection - I already used cluster drawing extraction, re-drawed each to a shape, and got good results with template matching (using cv2) so I wanted to say a big thanks, it's been a journy so far and this library is amazing and very educating!
Beta Was this translation helpful? Give feedback.
All reactions