WO2022142080A1 - 图像比对方法及装置 - Google Patents

图像比对方法及装置 Download PDF

Info

Publication number
WO2022142080A1
WO2022142080A1 PCT/CN2021/094857 CN2021094857W WO2022142080A1 WO 2022142080 A1 WO2022142080 A1 WO 2022142080A1 CN 2021094857 W CN2021094857 W CN 2021094857W WO 2022142080 A1 WO2022142080 A1 WO 2022142080A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixels
error
tested
pixel
Prior art date
Application number
PCT/CN2021/094857
Other languages
English (en)
French (fr)
Inventor
刘志杰
苏泽荫
林炳河
Original Assignee
稿定(厦门)科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 稿定(厦门)科技有限公司 filed Critical 稿定(厦门)科技有限公司
Publication of WO2022142080A1 publication Critical patent/WO2022142080A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present invention relates to the technical field of image processing, and in particular, to an image comparison method, a computer-readable storage medium, a computer device, and an image comparison device.
  • the method of feature quantity comparison is often used to judge whether the two images are consistent through the feature quantity comparison; however, this method only judges the two images by the feature quantity.
  • the similarity between images, in the process of visual verification, the results obtained by this method are often inaccurate (that is, the judgment results of the feature quantities are consistent, but the naked eye can clearly observe the difference between the two images).
  • an object of the present invention is to propose an image comparison method, which can make the image comparison result more in line with the visual verification requirements from the perspective of visual verification.
  • a second object of the present invention is to provide a computer-readable storage medium.
  • the third object of the present invention is to propose a computer device.
  • the fourth object of the present invention is to provide an image comparison device.
  • an embodiment of the first aspect of the present invention proposes an image comparison method, which includes the following steps: acquiring an image to be measured and a standard image, wherein the pixels in the image to be measured and the pixels in the standard image are obtained. Points are in a one-to-one correspondence; calculate the pixel difference between the pixel point in the image to be tested and the pixel point in the corresponding standard image, and determine whether the pixel difference is greater than the preset difference threshold, and in the judgment result If yes, take the pixels in the image to be tested as error pixels; count the number of the error pixels, and judge whether the image to be tested meets the visual requirements according to the number of error pixels.
  • a test image and a standard image are acquired, wherein the pixel points in the test image and the pixel points in the standard image are in a one-to-one correspondence; Describe the pixel difference between the pixel in the image to be tested and the pixel in the corresponding standard image, and determine whether the pixel difference is greater than the preset difference threshold, and when the judgment result is yes, the pixel in the image to be tested.
  • the number of the error pixels is counted, and according to the number of the error pixels, it is judged whether the image to be tested meets the visual requirements; thus, from the perspective of visual verification, the image ratio is The results are more in line with the visual verification requirements.
  • the image comparison method proposed according to the above embodiments of the present invention may also have the following additional technical features.
  • judging whether the image to be tested meets the visual requirements according to the number of error pixels includes: calculating the ratio between the number of error pixels and the total number of pixels of the image to be tested, and judging the ratio. Whether it is greater than the preset ratio threshold; if not, it is considered that the image to be tested meets the visual requirements.
  • judging whether the image to be tested meets the visual requirements according to the number of the error pixels including: judging whether the number of error pixels is greater than a preset error number threshold; Calculate the average pixel difference from the pixel difference between the pixel points in the corresponding standard image; determine whether the average pixel difference is greater than the preset error average threshold; if not, it is considered that the image to be tested meets the visual requirements.
  • the embodiment of the second aspect of the present invention provides a computer-readable storage medium on which an image comparison program is stored.
  • the image comparison program implements the above image comparison method when the image comparison program is executed by a processor.
  • the processor by storing the image comparison program, the processor implements the above-mentioned image comparison method when executing the image comparison program; thus, it is realized from the perspective of visual verification. , making the image comparison result more in line with the visual verification requirements.
  • a third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that the processor executes all When the above program is executed, the image comparison method as described above is realized.
  • the image comparison program is stored in the memory, so that the processor implements the above-mentioned image comparison method when executing the image comparison program; thus, it is realized from the perspective of visual verification , making the image comparison result more in line with the visual verification requirements.
  • an embodiment of the fourth aspect of the present invention provides an image comparison device, including: an acquisition module, the acquisition module is used to acquire a to-be-measured image and a standard image, wherein the pixel points in the to-be-measured image There is a one-to-one relationship with the pixels in the standard image; the calculation module is used to calculate the pixel difference between the pixels in the image to be tested and the pixels in the corresponding standard image, and determine Whether the pixel difference is greater than the preset difference threshold, and when the judgment result is yes, the pixel in the image to be tested is regarded as an error pixel; a statistics module, which is used to count the number of the error pixels ; Judging module, the judging module is used for judging whether the image to be tested meets the visual requirements according to the number of the error pixels.
  • the acquisition module is configured to acquire the image to be measured and the standard image, wherein the pixels in the image to be measured and the pixels in the standard image are in a one-to-one correspondence;
  • the calculation module is used to calculate the pixel difference value between the pixel point in the image to be tested and the pixel point in the corresponding standard image, and determine whether the pixel difference value is greater than the preset difference value threshold, and when the judgment result is yes.
  • the pixels in the image to be measured are used as error pixels; the statistics module is used to count the number of the error pixels; the judgment module is used to judge whether the image to be measured meets the visual requirements according to the number of the error pixels; From the perspective of visual verification, the image comparison result is more in line with the requirements of visual verification.
  • the image comparison apparatus proposed according to the above embodiments of the present invention may also have the following additional technical features.
  • judging whether the image to be tested meets the visual requirements according to the number of error pixels includes: calculating the ratio between the number of error pixels and the total number of pixels of the image to be tested, and judging the ratio. Whether it is greater than the preset ratio threshold; if not, it is considered that the image to be tested meets the visual requirements.
  • judging whether the image to be tested meets the visual requirements according to the number of the error pixels including: judging whether the number of error pixels is greater than a preset error number threshold; Calculate the average pixel difference from the pixel difference between the pixel points in the corresponding standard image; determine whether the average pixel difference is greater than the preset error average threshold; if not, it is considered that the image to be tested meets the visual requirements.
  • FIG. 1 is a schematic flowchart of an image comparison method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of an image comparison method according to another embodiment of the present invention.
  • FIG. 3 is a schematic block diagram of an image comparison apparatus according to an embodiment of the present invention.
  • the image comparison method of the embodiment of the present invention first, the image to be tested and the standard image are obtained, wherein, There is a one-to-one correspondence between the pixel points in the image to be tested and the pixel points in the standard image; then, calculate the pixel difference between the pixel points in the image to be tested and the corresponding pixel points in the standard image, and Judging whether the pixel difference is greater than the preset difference threshold, and when the judgment result is yes, the pixel in the image to be tested is regarded as an error pixel; then, count the number of the error pixels, and according to the error The number of pixel points determines whether the image to be tested meets the visual requirements; thus, from the perspective of visual verification, the image comparison result is more in line with the visual verification requirements.
  • FIG. 1 is a schematic flowchart of an image comparison method according to an embodiment of the present invention. As shown in FIG. 1 , the image comparison method includes the following steps.
  • the to-be-measured image and its corresponding standard image are acquired, and the to-be-measured image and the corresponding standard image have the same specifications; and according to the coordinates of the pixels in the to-be-measured image and the coordinates of the pixels in the standard image; any Each pixel in an image to be tested has a corresponding pixel in the standard image.
  • S102 Calculate the pixel difference value between the pixel point in the image to be tested and the pixel point in the corresponding standard image, and determine whether the pixel difference value is greater than a preset difference threshold, and when the determination result is yes, the image to be tested The middle pixel is used as the error pixel.
  • the image to be tested is considered to meet the visual requirements.
  • the image to be tested is considered to meet the visual requirements.
  • the number of error pixels is 50, and the preset error number threshold is 30; then the number of error pixels is greater than the preset error number threshold; further, each of the 50 error pixels is obtained.
  • Set the error mean threshold if it is, it is considered that the image to be tested does not meet the visual requirements; if not, it is considered that the image to be tested meets the visual requirements.
  • the image comparison method includes the following steps.
  • S202 Calculate the pixel difference between the pixel point in the image to be tested and the pixel point in the corresponding standard image.
  • step S203 determine whether the pixel difference value is greater than a preset difference value threshold; if so, execute step S204.
  • S206 Calculate the ratio between the number of error pixels and the total number of pixels in the image to be measured.
  • step S207 determine whether the ratio is greater than a preset ratio threshold; if yes, go to step S208; if not, go to step S209.
  • step S209 determine whether the number of error pixels is greater than the preset error number threshold; if yes, go to step S210; if not, go to step S211.
  • S210 Calculate an average pixel difference value according to the pixel difference values between all error pixels and their corresponding pixels in the standard image.
  • step S212 determine whether the average pixel difference value is greater than the preset error mean value threshold; if yes, go to step S208; if not, go to step S211.
  • the image to be tested and the standard image are acquired, wherein the pixels in the image to be tested and the pixels in the standard image are in a one-to-one correspondence Then, calculate the pixel difference between the pixel in the image to be measured and its corresponding standard image, and judge whether the pixel difference is greater than the preset difference threshold, and when the judgment result is yes, this
  • the pixels in the image to be tested are used as error pixels; then, the number of the error pixels is counted, and according to the number of the error pixels, it is judged whether the image to be tested meets the visual requirements; so as to realize from the perspective of visual verification Start, make the image comparison result more in line with the visual verification requirements.
  • the embodiments of the present invention provide a computer-readable storage medium on which an image comparison program is stored, and when the image comparison program is executed by a processor, implements the above-mentioned image comparison method.
  • the processor by storing the image comparison program, the processor implements the above-mentioned image comparison method when executing the image comparison program; thus, it is realized from the perspective of visual verification. , making the image comparison result more in line with the visual verification requirements.
  • the embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that the processor executes the program , the above-mentioned image comparison method is implemented.
  • the image comparison program is stored in the memory, so that the processor implements the above-mentioned image comparison method when executing the image comparison program; thus, it is realized from the perspective of visual verification , making the image comparison result more in line with the visual verification requirements.
  • the embodiment of the present invention proposes an image comparison apparatus, as shown in FIG.
  • the acquisition module 10 is used for acquiring the image to be tested and the standard image, wherein the pixel points in the image to be tested and the pixel points in the standard image are in a one-to-one correspondence.
  • the calculation module 20 is used to calculate the pixel difference value between the pixel point in the image to be tested and the pixel point in the corresponding standard image, and judge whether the pixel difference value is greater than the preset difference value threshold, and when the judgment result is yes.
  • the pixels in the image to be tested are used as error pixels.
  • the statistics module 30 is used to count the number of error pixels.
  • the judgment module 40 is used for judging whether the image to be tested meets the visual requirement according to the number of error pixels.
  • the image to be tested is considered to meet the visual requirements.
  • the image to be tested is considered to meet the visual requirements.
  • an acquisition module is set to acquire the image to be measured and the standard image, wherein the pixels in the image to be measured and the pixels in the standard image are one-to-one Corresponding relationship; the calculation module is used to calculate the pixel difference value between the pixel point in the image to be tested and the pixel point in the corresponding standard image, and determine whether the pixel difference value is greater than the preset difference value threshold, and in the judgment result If yes, the pixels in the image to be tested are used as error pixels; the statistics module is used to count the number of the error pixels; the judgment module is used to judge whether the image to be tested conforms to the visual quality according to the number of the error pixels requirements; thus, from the perspective of visual verification, the image comparison results are more in line with the requirements of visual verification.
  • embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • An apparatus implements the functions specified in a flow or flows of the flowcharts and/or a block or blocks of the block diagrams.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
  • any reference signs placed between parentheses shall not be construed as limiting the claim.
  • the word “comprising” does not exclude the presence of elements or steps not listed in a claim.
  • the word “a” or “an” preceding an element does not preclude the presence of a plurality of such elements.
  • the invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware.
  • the use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
  • first and second are only used for description purposes, and cannot be interpreted as indicating or implying relative importance or the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • “plurality” means two or more, unless otherwise expressly and specifically defined.
  • the terms “installed”, “connected”, “connected”, “fixed” and other terms should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection , or integrated; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of the two elements or the interaction relationship between the two elements.
  • installed may be a fixed connection or a detachable connection , or integrated; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of the two elements or the interaction relationship between the two elements.
  • a first feature "on” or “under” a second feature may be in direct contact between the first and second features, or the first and second features indirectly through an intermediary touch.
  • the first feature being “above”, “over” and “above” the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is level higher than the second feature.
  • the first feature being “below”, “below” and “below” the second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature has a lower level than the second feature.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

一种图像比对方法、介质、设备及装置,其中方法包括:获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系(S101);计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点(S102);统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求(S103)。能够从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。

Description

图像比对方法及装置 技术领域
本发明涉及图像处理技术领域,特别涉及一种图像比对方法、一种计算机可读存储介质、一种计算机设备以及一种图像比对装置。
背景技术
相关技术中,在对两张图像进行比对时,多采用特征量比较的方式,以通过特征量的比较来判断两张图像是否一致;然而,这种方式仅仅是通过特征量来判断两张图像之间的相似度,在视觉校验过程中,这种方式得出的结果往往不准确(即言,特征量判断结果为一致,而肉眼却能明显地观察出两张图像的差别)。
技术问题
本发明旨在至少在一定程度上解决上述技术中的技术问题之一。为此,本发明的一个目的在于提出一种图像比对方法,能够从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
本发明的第二个目的在于提出一种计算机可读存储介质。
本发明的第三个目的在于提出一种计算机设备。
本发明的第四个目的在于提出一种图像比对装置。
为达到上述目的,本发明第一方面实施例提出了一种图像比对方法,包括以下步骤:获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求。
根据本发明实施例的图像比对方法,首先,获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;接着,计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;然后,统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
另外,根据本发明上述实施例提出的图像比对方法还可以具有如下附加的技术特征。
可选地,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:计算所述误差像素点个数与所述待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值;如果否,则认为该待测图像符合视觉要求。
可选地,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:判断误差像素点的个数是否大于预设误差个数阈值;如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值;判断所述平均像素差值是否大于预设误差均值阈值;如果否,则认为该待测图像符合视觉要求。
为达到上述目的,本发明第二方面实施例提出了一种计算机可读存储介质,其上存储有图像比对程序,该图像比对程序被处理器执行时实现如上述的图像比对方法。
根据本发明实施例的计算机可读存储介质,通过存储图像比对程序,以使得处理器在执行该图像比对程序时,实现如上述的图像比对方法;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为达到上述目的,本发明第三方面实施例提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,实现如上述的图像比对方法。
根据本发明实施例的计算机设备,通过存储器对图像比对程序进行存储,以使得处理器在执行该图像比对程序时,实现如上述的图像比对方法;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为达到上述目的,本发明第四方面实施例提出了一种图像比对装置,包括:获取模块,所述获取模块用于获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;计算模块,所述计算模块用于计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;统计模块,所述统计模块用于统计所述误差像素点的个数;判断模块,所述判断模块用于根据所述误差像素点的个数判断待测图像是否符合视觉要求。
根据本发明实施例的图像比对装置,通过设置获取模块用于获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;计算模块用于计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;统计模块用于统计所述误差像素点的个数;判断模块用于根据所述误差像素点的个数判断待测图像是否符合视觉要求;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
另外,根据本发明上述实施例提出的图像比对装置还可以具有如下附加的技术特征。
可选地,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:计算所述误差像素点个数与所述待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值;如果否,则认为该待测图像符合视觉要求。
可选地,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:判断误差像素点的个数是否大于预设误差个数阈值;如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值;判断所述平均像素差值是否大于预设误差均值阈值;如果否,则认为该待测图像符合视觉要求。
附图说明
图1为根据本发明实施例的图像比对方法的流程示意图。
图2为根据本发明另一实施例的图像比对方法的流程示意图。
图3为根据本发明实施例的图像比对装置的方框示意图。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。
相关技术中,对图像进行比对时,采用特征量度量的方式,结果往往不符合视觉校验要求;根据本发明实施例的图像比对方法,首先,获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;接着,计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;然后,统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为了更好的理解上述技术方案,下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。
为了更好的理解上述技术方案,下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的说明。
图1为根据本发明实施例的图像比对方法的流程示意图,如图1所示,该图像比对方法包括以下步骤。
S101,获取待测图像和标准图像,其中,待测图像中像素点与标准图像中像素点为一一对应的关系。
也就是说,对待测图像及其对应的标准图像进行获取,该待测图像和对应的标准图像具有相同的规格;而根据待测图像中像素点的坐标和标准图像中像素点的坐标;任意一个待测图像中像素点均有一个与其对应的标准图像中像素点。
S102,计算待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点。
即言,计算待测图像中像素点的像素与对应的标准图像中像素点的像素之间的像素差值;然后,判断该像素差值是否大于预设的差值阈值,以判断该待测图像中像素点是否为误差像素点。
S103,统计误差像素点的个数,并根据误差像素点的个数判断待测图像是否符合视觉要求。
在一些实施例中,根据误差像素点的个数判断待测图像是否符合视觉要求,包括。
计算误差像素点个数与待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值。
如果否,则认为该待测图像符合视觉要求。
即言,根据误差像素点在待测图像中的占比来判断该待测图像是否符合视觉要求;例如,假设误差像素点的个数为50个,待测图像像素点总数为500,则两者之间的比值为1:10;假设预设的比值阈值为1:5,则该待测图像符合视觉要求。
在一些实施例中,根据误差像素点的个数判断待测图像是否符合视觉要求,包括。
判断误差像素点的个数是否大于预设误差个数阈值。
如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值。
判断平均像素差值是否大于预设误差均值阈值。
如果否,则认为该待测图像符合视觉要求。
作为一种示例,假设误差像素点的个数为50,预设误差个数阈值为30;则误差像素点的个数大于预设误差个数阈值;进而,获取这个50个误差像素点中每个误差像素点的像素值与对应的标准图像中像素点的像素值之间的像素差值;然后,计算50个像素差值的平均像素差值;接着,判断该平均像素差值是否大于预设误差均值阈值;如果是,则认为该待测图像不符合视觉要求;如果否,则认为该待测图像符合视觉要求。
在本发明的一个具体实施例中,如图2所示,图像比对方法包括以下步骤。
S201,获取待测图像和标准图像。
S202,计算待测图像中像素点与其对应的标准图像中像素点之间的像素差值。
S203,判断该像素差值是否大于预设差值阈值;如果是,则执行步骤S204。
S204,将该待测图像中像素点作为误差像素点。
S205,统计误差像素点的个数。
S206,计算误差像素点个数与待测图像像素点总数之间的比值。
S207,判断该比值是否大于预设的比值阈值;如果是,则执行步骤S208;如果否,则执行步骤S209。
S208,认为该待测图像不符合视觉要求。
S209,判断误差像素点的个数是否大于预设误差个数阈值;如果是,则执行步骤S210;如果否,则执行步骤S211。
S210,根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值。
S211,认为该待测图像符合视觉要求。
S212,判断平均像素差值是否大于预设误差均值阈值;如果是,则执行步骤S208;如果否,则执行步骤S211。
综上所述,根据本发明实施例的图像比对方法,首先,获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;接着,计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;然后,统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为了实现上述实施例,本发明实施例提出了一种计算机可读存储介质,其上存储有图像比对程序,该图像比对程序被处理器执行时实现如上述的图像比对方法。
根据本发明实施例的计算机可读存储介质,通过存储图像比对程序,以使得处理器在执行该图像比对程序时,实现如上述的图像比对方法;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为了实现上述实施例,本发明实施例提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,实现如上述的图像比对方法。
根据本发明实施例的计算机设备,通过存储器对图像比对程序进行存储,以使得处理器在执行该图像比对程序时,实现如上述的图像比对方法;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
为了实现上述实施例,本发明实施例提出了一种图像比对装置,如图3所示,该图像比对装置包括:获取模块10、计算模块20、统计模块30和判断模块40。
其中,获取模块10用于获取待测图像和标准图像,其中,待测图像中像素点与标准图像中像素点为一一对应的关系。
计算模块20用于计算待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点。
统计模块30用于统计误差像素点的个数。
判断模块40用于根据误差像素点的个数判断待测图像是否符合视觉要求。
在一些实施例中,根据误差像素点的个数判断待测图像是否符合视觉要求,包括。
计算误差像素点个数与待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值。
如果否,则认为该待测图像符合视觉要求。
在一些实施例中,根据误差像素点的个数判断待测图像是否符合视觉要求,包括。
判断误差像素点的个数是否大于预设误差个数阈值。
如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值。
判断平均像素差值是否大于预设误差均值阈值。
如果否,则认为该待测图像符合视觉要求。
需要说明的是,上述关于图1中图像比对方法的描述同样适用于该图像比对装置,在此不做赘述。
综合所述,根据本发明实施例的图像比对装置,通过设置获取模块用于获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;计算模块用于计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;统计模块用于统计所述误差像素点的个数;判断模块用于根据所述误差像素点的个数判断待测图像是否符合视觉要求;从而实现从视觉校验的角度出发,使得图像比对结果更符合视觉校验要求。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
应当注意的是,在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的部件或步骤。位于部件之前的单词“一”或“一个”不排除存在多个这样的部件。本发明可以借助于包括有若干不同部件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
在本发明中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”、“固定”等术语应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或成一体;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。
在本发明中,除非另有明确的规定和限定,第一特征在第二特征 “上”或“下”可以是第一和第二特征直接接触,或第一和第二特征通过中间媒介间接接触。而且,第一特征在第二特征“之上”、“上方”和“上面”可是第一特征在第二特征正上方或斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”可以是第一特征在第二特征正下方或斜下方,或仅仅表示第一特征水平高度小于第二特征。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、 “示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不应理解为必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (8)

  1. 一种图像比对方法,其特征在于,包括以下步骤:
    获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;
    计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;
    统计所述误差像素点的个数,并根据所述误差像素点的个数判断待测图像是否符合视觉要求。
  2. 如权利要求1所述的图像比对方法,其特征在于,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:
    计算所述误差像素点个数与所述待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值;
    如果否,则认为该待测图像符合视觉要求。
  3. 如权利要求1所述的图像比对方法,其特征在于,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:
    判断误差像素点的个数是否大于预设误差个数阈值;
    如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值;
    判断所述平均像素差值是否大于预设误差均值阈值;
    如果否,则认为该待测图像符合视觉要求。
  4. 一种计算机可读存储介质,其特征在于,其上存储有图像比对程序,该图像比对程序被处理器执行时实现如权利要求1-3中任一项所述的图像比对方法。
  5. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,实现如权利要求1-3中任一项所述的图像比对方法。
  6. 一种图像比对装置,其特征在于,包括:
    获取模块,所述获取模块用于获取待测图像和标准图像,其中,所述待测图像中像素点与所述标准图像中像素点为一一对应的关系;
    计算模块,所述计算模块用于计算所述待测图像中像素点与其对应的标准图像中像素点之间的像素差值,并判断该像素差值是否大于预设差值阈值,以及在判断结果为是时将该待测图像中像素点作为误差像素点;
    统计模块,所述统计模块用于统计所述误差像素点的个数;
    判断模块,所述判断模块用于根据所述误差像素点的个数判断待测图像是否符合视觉要求。
  7. 如权利要求6所述的图像比对装置,其特征在于,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:
    计算所述误差像素点个数与所述待测图像像素点总数之间的比值,并判断该比值是否大于预设的比值阈值;
    如果否,则认为该待测图像符合视觉要求。
  8. 如权利要求6所述的图像比对装置,其特征在于,根据所述误差像素点的个数判断待测图像是否符合视觉要求,包括:
    判断误差像素点的个数是否大于预设误差个数阈值;
    如果是,则根据所有误差像素点与其对应的标准图像中像素点之间的像素差值计算平均像素差值;
    判断所述平均像素差值是否大于预设误差均值阈值;
    如果否,则认为该待测图像符合视觉要求。
PCT/CN2021/094857 2020-12-30 2021-05-20 图像比对方法及装置 WO2022142080A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011617307.8 2020-12-30
CN202011617307.8A CN112669290A (zh) 2020-12-30 2020-12-30 图像比对方法及装置

Publications (1)

Publication Number Publication Date
WO2022142080A1 true WO2022142080A1 (zh) 2022-07-07

Family

ID=75411372

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094857 WO2022142080A1 (zh) 2020-12-30 2021-05-20 图像比对方法及装置

Country Status (2)

Country Link
CN (1) CN112669290A (zh)
WO (1) WO2022142080A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911698A (zh) * 2023-09-14 2023-10-20 通渭县食品药品检验检测中心 一种食品药品检测系统
CN117128888A (zh) * 2023-10-26 2023-11-28 天津华夏联盛汽车部件有限公司 一种用于不规则保险杠面形的误差识别方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669290A (zh) * 2020-12-30 2021-04-16 稿定(厦门)科技有限公司 图像比对方法及装置
CN115330657B (zh) * 2022-10-14 2023-01-31 威海凯思信息科技有限公司 一种海洋探测图像的处理方法、装置和服务器
CN116229123B (zh) * 2023-02-21 2024-04-30 深圳市爱培科技术股份有限公司 基于多通道分组互相关代价卷的双目立体匹配方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0677820A2 (en) * 1994-04-14 1995-10-18 Hewlett-Packard Company Magnifying digital image using edge mapping
CN104239909A (zh) * 2014-08-11 2014-12-24 北京捷通华声语音技术有限公司 一种图像的识别方法和装置
CN106502891A (zh) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 用户界面的自动检测方法和装置
CN112669290A (zh) * 2020-12-30 2021-04-16 稿定(厦门)科技有限公司 图像比对方法及装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479321B (zh) * 2010-11-26 2016-10-26 罗普特(厦门)科技集团有限公司 差异影像自动识别系统及方法
CN103544716B (zh) * 2013-10-30 2016-04-27 京北方信息技术股份有限公司 一种对图像的像素进行颜色分类的方法及装置
CN104008377A (zh) * 2014-06-07 2014-08-27 北京联合大学 基于时空关联的地面交通标志实时检测识别方法
CN106898082B (zh) * 2017-03-15 2019-08-27 深圳怡化电脑股份有限公司 一种图像污损判定的方法及装置
CN108319908A (zh) * 2018-01-26 2018-07-24 华中科技大学 一种基于像素级差分特征的非受限环境人脸检测方法
CN109711238B (zh) * 2018-07-24 2020-11-20 台州市怡开包装有限公司 防鼠式智能化橱柜
CN109345600B (zh) * 2018-09-04 2021-11-23 海信视像科技股份有限公司 一种基于色调的局部降噪方法、装置及终端
CN109242035B (zh) * 2018-09-25 2019-12-24 北京华开领航科技有限责任公司 车底故障检测装置及方法
CN109741377B (zh) * 2018-11-30 2021-07-06 四川译讯信息科技有限公司 一种图像差异检测方法
CN109740499B (zh) * 2018-12-28 2021-06-11 北京旷视科技有限公司 视频分割方法、视频动作识别方法、装置、设备及介质
CN110909791B (zh) * 2019-11-20 2023-02-28 车智互联(北京)科技有限公司 一种相似图像识别方法及计算设备
CN111028213B (zh) * 2019-12-04 2023-05-26 北大方正集团有限公司 图像缺陷检测方法、装置、电子设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0677820A2 (en) * 1994-04-14 1995-10-18 Hewlett-Packard Company Magnifying digital image using edge mapping
CN104239909A (zh) * 2014-08-11 2014-12-24 北京捷通华声语音技术有限公司 一种图像的识别方法和装置
CN106502891A (zh) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 用户界面的自动检测方法和装置
CN112669290A (zh) * 2020-12-30 2021-04-16 稿定(厦门)科技有限公司 图像比对方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911698A (zh) * 2023-09-14 2023-10-20 通渭县食品药品检验检测中心 一种食品药品检测系统
CN116911698B (zh) * 2023-09-14 2023-12-12 通渭县食品药品检验检测中心 一种食品药品检测系统
CN117128888A (zh) * 2023-10-26 2023-11-28 天津华夏联盛汽车部件有限公司 一种用于不规则保险杠面形的误差识别方法
CN117128888B (zh) * 2023-10-26 2024-01-09 天津华夏联盛汽车部件有限公司 一种用于不规则保险杠面形的误差识别方法

Also Published As

Publication number Publication date
CN112669290A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2022142080A1 (zh) 图像比对方法及装置
EA021550B1 (ru) Способ и система для оценки целостности трубопровода и машиночитаемый носитель
CN113588488B (zh) 电缆的缺陷检测方法、装置、终端设备及存储介质
JP2011182397A (ja) ずれ量算出方法およびずれ量算出装置
CN115048613B (zh) 一种指标同质化换算方法、装置、电子设备及存储介质
CN110827245A (zh) 一种检测屏幕显示断线的方法及设备
JP2019066265A (ja) ひび割れ検出装置、ひび割れ検出方法、および、コンピュータプログラム
CN109903245A (zh) 红外图像的非均匀校正方法
CN113808132B (zh) 三维网络模型质量检测方法、装置和计算机设备
TW202027091A (zh) 個人化大腦影像評估之方法、非暫時性電腦可讀媒體及設備
CN112802080A (zh) 基于深度学习的单目绝对深度估计方法和装置
CN115269389A (zh) 一种项目质量确定方法、装置、电子设备及存储介质
CN115452101A (zh) 一种仪表检定方法、装置、设备及介质
JP2019162254A5 (zh)
US11255705B2 (en) Method for setting quality thresholds of products for testing purposes and device employing method
TWI748184B (zh) 瑕疵檢測方法、電子裝置及電腦可讀存儲介質
JP2019066263A (ja) ひび割れ検出装置、ひび割れ検出方法、および、コンピュータプログラム
JP2019066267A (ja) ひび割れ検出装置、ひび割れ検出方法、および、コンピュータプログラム
CN113342676A (zh) 一种软件测试的评估方法、装置、计算设备及存储介质
JP2022013433A5 (zh)
CN112801523A (zh) 烟支质量的检测方法、装置、系统和存储介质
CN110060103A (zh) 一种线性定价的方法、装置、存储介质及电子设备
WO2019227415A1 (zh) 一种评分卡模型的调整方法、装置、服务器及存储介质
CN117216454B (zh) 基于模糊非概率的可靠性评估方法、装置、终端及存储介质
CN116384168B (zh) 一种运砂船的运砂量计算方法、系统、计算机及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912841

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912841

Country of ref document: EP

Kind code of ref document: A1