IP Library Granted Patent US 12,499,652
Granted Patent B1
US 12,499,652 · App. 19/174,027 · Granted Dec 16, 2025

Image difference generator with shift detection

Inventors: Chinmay Maheshwari (Indore, IN); Amit Singh Sansoya (Nawanshahr, IN); Shivam Singh (Prayagraj, IN); Akshay Minocha (Bengaluru, IN)
Assignee: BrowserStack Limited
G06V10/7515G06T11/00G06V10/762
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,499,652
App. No.
19/174,027
Filed
Apr 9, 2025
Granted
Dec 16, 2025
Kind
B1
Examiner
HON, MING Y
Art Unit
2666
USPC
382/209
Abstract

An image difference generator can receive first and second screenshots of first and second display outputs of a computer program. The image difference generator can be configured to generate a difference image between the two screenshots. The difference image can be generated to exclude minor changes, such as slight horizontal or vertical shift in the same content or graphics between the two screenshots.

Claims (68)

1 . A method comprising:

receiving first and second images;

generating a first difference image by determining difference areas between the first and second images;

grouping the difference areas, generating grouped difference areas (GDAs);

determining, for each GDA, an amount of pixel shift between the first and second images;

selecting a representative shift, wherein the representative shift is a pixel shift occurring with maximum frequency among the determined pixel shifts of the GDAs;

generating a shifted second image, by shifting the GDAs in the second image, by the representative shift;

determining differences between the shifted second image and the first image;

when determining no differences between the shifted second image and the first image, removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed; and

when determining differences between the shifted second image and the first image, outputting the first difference image; and

generating an output difference display of the first and second images with minor differences between the first and second images excluded from the output difference display.

2 . The method of claim 1 , wherein removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed, comprises:

shifting the second image by the representative shift,

generating a second difference image between the first image and the shifted second image, based on determining differences between the first image and the shifted second image; and

outputting the second difference image.

3 . The method of claim 1 , wherein grouping the difference areas comprises:

selecting a box of a selected size around a difference area;

determining a difference area near the outside perimeter of the box; and

iteratively expanding the size of the box to include nearby difference areas, until no nearby difference areas can be found.

4 . The method of claim 1 , wherein determining pixel shifts is based on a phase correlation algorithm.

5 . The method of claim 1 , further comprising:

when the representative shift equals zero, generating the shifted second image by shifting the GDAs by a small selected margin.

6 . The method of claim 1 , further comprising when the representative shift is greater than a maximum shift tolerance, outputting the first difference image.

7 . A non-transitory computer storage medium that stores executable program instructions that, when executed by one or more computing devices, configure the one or more computing devices to perform operations comprising:

receiving first and second images;

generating a first difference image by determining difference areas between the first and second images;

grouping the difference areas, generating grouped difference areas (GDAs);

determining, for each GDA, an amount of pixel shift between the first and second images;

selecting a representative shift, wherein the representative shift is a pixel shift occurring with maximum frequency among the determined pixel shifts of the GDAs;

generating a shifted second image, by shifting the GDAs in the second image, by the representative shift;

determining differences between the shifted second image and the first image;

when determining no differences between the shifted second image and the first image, removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed; and

when determining differences between the shifted second image and the first image, outputting the first difference image; and

generating an output difference display of the first and second images with minor differences between the first and second images excluded from the output difference display.

8 . The non-transitory computer storage of claim 7 , wherein removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed, comprises:

shifting the second image by the representative shift,

generating a second difference image between the first image and the shifted second image, based on determining differences between the first image and the shifted second image; and

outputting the second difference image.

9 . The non-transitory computer storage of claim 7 , wherein grouping the difference areas comprises:

selecting a box of a selected size around a difference area;

determining a difference area near the outside perimeter of the box; and

iteratively expanding the size of the box to include nearby difference areas, until no nearby difference areas can be found.

10 . The non-transitory computer storage of claim 7 , wherein determining pixel shifts is based on a phase correlation algorithm.

11 . The non-transitory computer storage of claim 7 , wherein the operations further comprise:

when the representative shift equals zero, generating the shifted second image by shifting the GDAs by a small selected margin.

12 . The non-transitory computer storage of claim 7 , wherein the operations further comprise: when the representative shift is greater than a maximum shift tolerance, outputting the first difference image.

13 . A system comprising one or more processors, wherein the one or more processors are configured to perform operations comprising:

receiving first and second images;

generating a first difference image by determining difference areas between the first and second images;

grouping the difference areas, generating grouped difference areas (GDAs);

determining, for each GDA, an amount of pixel shift between the first and second images;

selecting a representative shift, wherein the representative shift is a pixel shift occurring with maximum frequency among the determined pixel shifts of the GDAs;

generating a shifted second image, by shifting the GDAs in the second image, by the representative shift;

determining differences between the shifted second image and the first image;

when determining no differences between the shifted second image and the first image, removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed; and

when determining differences between the shifted second image and the first image, outputting the first difference image; and

generating an output difference display of the first and second images with minor differences between the first and second images excluded from the output difference display.

14 . The system of claim 13 , wherein removing the GDAs from the first difference image and outputting the first difference image, with the GDAs removed, comprises:

shifting the second image by the representative shift,

generating a second difference image between the first image and the shifted second image, based on determining differences between the first image and the shifted second image; and

outputting the second difference image.

15 . The system of claim 13 , wherein grouping the difference areas comprises:

selecting a box of a selected size around a difference area;

determining a difference area near the outside perimeter of the box; and

iteratively expanding the size of the box to include nearby difference areas, until no nearby difference areas can be found.

16 . The system of claim 13 , wherein determining pixel shifts is based on a phase correlation algorithm.

17 . The system of claim 13 , wherein the operations further comprise:

when the representative shift equals zero, generating the shifted second image by shifting the GDAs by a small selected margin.