发明名称 Automated contrast verifications
摘要 A developer tool is used to programmatically calculate the contrast between the text and background in a user interface. A luminosity ratio is automatically calculated by the tool by capturing an image of a user interface, archiving user interface elements that do not contain text, performing optical character recognition on the remaining user interface elements to find pixels on the text part of the user interface element and pixels on the background part of the user interface element, and finally calculating the luminosity ratio. Results including errors, warnings and luminosity ratio for one or more hotspots in the image can be returned. Results can be used to identify user interface elements that comply or fail to comply with visibility guidelines for contrast between user interface text and background.
申请公布号 US8917275(B2) 申请公布日期 2014.12.23
申请号 US201012815383 申请日期 2010.06.14
申请人 Microsoft Corporation 发明人 Grieves Jason Anthony;Karr Matthew;Corner Katherine Ann
分类号 G06T11/00;G06K9/00;G09G5/14;G06K9/38;G06K9/03;G09G5/20;G06T11/20;G09G5/02;G09G5/22 主分类号 G06T11/00
代理机构 Stolowitz Ford Cowger LLP 代理人 Stolowitz Ford Cowger LLP
主权项 1. A system comprising: a processor and a memory; and a module configured to cause the processor to: obtain a first image of a user interface element that includes text;responsive to obtaining the first image, generate a second different image that comprises a grayscale representation of the first image;correlate a subset of a plurality of maxima of a histogram of the second image with a background pixel in the second image;determine a first maximum on the histogram of the second image by locating at least one maximum from the correlated ones of the plurality of maxima;responsive to determining the first maximum on the histogram of the second image, identify, in the first image, a first pixel corresponding to the determined first maximum;select, from the uncorrelated ones of the plurality of maxima, a second maximum farthest from the first maximum;wherein the second maximum corresponds to the text of the user interface element and the first maximum does not correspond to the text of the user interface element;responsive to selecting the second maximum, identify, in the first image, a second different pixel corresponding to the determined second maximum; andcalculate a ratio of a value associated with one of the identified first and second pixels to a value associated with the other of the identified first and second pixels.
地址 Redmond WA US