How to crop a part of Image that doesn't hold any text or image

hi Team,

I’m trying to crop an image where there is no handwritten text and position could vary in multiple image.
Sample image uploaded (would like to crop from top/left/bottom/right where its only white background without any image or text.
Please share idea’s.

Hello @harji.5

I Don’t think this is possible with the normal activities in UiPath. You will have to create an ML model which is having image recognition and the capability to crop the region and integrate with Uipath.

1 Like

Can you please provide some more light on above approach.
Currently I’m trying to use ‘Get OCR Text’ to find if it returns null then crop region by region. but some times it fails to recognize pattern.

Can you please give more clarity on the use case. What is the use case here??

hi Rahul,

Usecase is to crop unwanted space in an image. for eg. In attached image(handwritten ) above I want to crop bottom area of image where there is no text.


So do you want to crop only the region with the text???

that’s right, crop region where text is present only.

Can you explore the below activity.

Also another approach is, using the Set clipping region, but need to check more on that. Let me try to find some other solution if the above one doesn’t works.

hi Rahul,

Thanks for the above approach.
Custom Crop works for reducing 50 % of images dimension with text but still lot of empty space.
and if I resize image, quality of text hampers.