public-roadmap icon indicating copy to clipboard operation
public-roadmap copied to clipboard

[Google Lens API] Support custom cropping of images

Open alexbarron opened this issue 1 year ago • 6 comments

Google Lens will automatically crop images while trying to focus on an object in an image. Search results can change slightly based on how the image is cropped.

A potential customer requested the ability to stop cropping entirely. It seems Google Lens doesn't have a way to stop the auto-cropping, but cropping can be customized to include the full image in the search. See arrows pointing to where users can drag to change the cropping.

Default cropped results:

image

Uncropped results:

image

Public links: Google Lens Cropped | Google Lens Uncropped

Internal links: Intercom

alexbarron avatar Oct 16 '24 12:10 alexbarron

Another customer requested this:

Intercom

martin-serpapi avatar Feb 17 '25 07:02 martin-serpapi

A customer mentioned that the exact matches feature will be more useful if we implemented this cropping feature.

Intercom

hilmanski avatar Mar 02 '25 22:03 hilmanski

Another customer requested some control over cropping. Their concern is that Google's autocropping is inconsistent. They requested we manually crop to include the full image by default:

Front

schaferyan avatar Jul 21 '25 17:07 schaferyan

For anyone affected by Google Lens’ auto-cropping, we have a workaround for you.

If you want to prevent auto-cropping, send your request with type=visual_matches. This requires an additional call behind the scenes, but that endpoint allow control on the cropping area (we always defaults to the full image). The downside is that it may increase response time. Unfortunately, the default endpoint doesn’t allow any adjustments, so using type=visual_matches is recommended.

This doesn't crop and searched with the full image (you can scroll down to see the default behaviour). Playground Image

This is the default and the chair was cropped, results shown are mostly related to chair Image

They are essentially the same results. Playground

Image

I am putting it back to freezer as issues are mostly to prevent auto cropping.

If you’re interested in the custom cropping feature, please leave us a comment 😃.

tanys123 avatar Aug 11 '25 07:08 tanys123

Another customer is interested in the custom cropping feature to select parts of the image:

Front

sonika-serpapi avatar Nov 12 '25 22:11 sonika-serpapi

Another user requested the ability to change the crop, specifically to search for full size images. The issue with the work around is this user requires "Exact matches" instead of "Visual matches". When you search for "All" or "Visual Matches" it mostly includes "Visual Matches" and not the "Exact Matches". Front

AutumroseS avatar Nov 17 '25 21:11 AutumroseS

A customer is interested in this. (Custom Cropping)

Front

Putting this back in the queue as the request is for "cropping on our side". Honestly, I'm not sure how it should be done via API. Sharing coordinates is inconvenient for the users.

hilmanski avatar Dec 05 '25 06:12 hilmanski