CN114862965A - Method, device and equipment for calculating width of stripe in stripe mark plate and medium - Google Patents

Method, device and equipment for calculating width of stripe in stripe mark plate and medium Download PDF

Info

Publication number
CN114862965A
CN114862965A CN202210470646.0A CN202210470646A CN114862965A CN 114862965 A CN114862965 A CN 114862965A CN 202210470646 A CN202210470646 A CN 202210470646A CN 114862965 A CN114862965 A CN 114862965A
Authority
CN
China
Prior art keywords
stripe
width
target
image
average
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210470646.0A
Other languages
Chinese (zh)
Inventor
王杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunshan Q Technology Co Ltd
Original Assignee
Zhuhai Qiuti Microelectronics Technology Co ltd
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 Zhuhai Qiuti Microelectronics Technology Co ltd filed Critical Zhuhai Qiuti Microelectronics Technology Co ltd
Priority to CN202210470646.0A priority Critical patent/CN114862965A/en
Publication of CN114862965A publication Critical patent/CN114862965A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/671Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Geometry (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for calculating the width of stripes in a stripe mark plate, wherein the method comprises the following steps: photographing a preselected stripe mark plate by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals; calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe; and determining the real stripe width of the stripe target according to the average stripe width. By adopting the invention, the real stripe width of the stripe mark plate can be rapidly and accurately calculated.

Description

Method, device and equipment for calculating width of stripe in stripe mark plate and medium
Technical Field
The invention relates to the technical field of terminals, in particular to a method, a device, equipment and a medium for calculating the width of stripes in a stripe target.
Background
With the maturity of the Phase Detection Auto Focus (PDAF) technology, most camera modules perform PDAF calibration. In particular, in recent years, the high-pass PDAF technology is widely applied to smart phones. At present, when PDAF calibration is performed before shipping of an imaging module, the PDAF calibration is generally performed using a striped plate (e.g., chart) recommended by a manufacturer. Specifically, the images shot by the camera module comprise masked pixels which appear in pairs and have a certain rule, and the paired masked pixels with the certain rule are detected by adopting a chart so as to finish PDAF calibration.
However, in practice, it is found that the width of the stripe in the stripe target is different according to the hardware collocation (i.e. module model) of different camera modules, and the required width is also different. This can lead to selecting the stripe mark board with wrong width to calibrate in the production calibration of the module of making a video recording to lead to making a video recording the module calibration mistake, influence the precision and the quality of the module of making a video recording. It is very important to select suitable stripe mark board to calibrate to the module of making a video recording of different models, but the stripe width can't directly obtain in the stripe mark board, consequently, before the module of making a video recording calibrates, how to calculate the stripe width in the stripe mark board is the important problem that needs to solve at present urgently.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for calculating the stripe width of a stripe mark plate, which can quickly and accurately calculate the real stripe width of the stripe mark plate and are beneficial to improving the convenience, rapidness and accuracy of stripe width calculation.
In one aspect, the present invention provides a method for calculating a width of a stripe in a stripe target, according to an embodiment of the present invention, where the method includes:
photographing a preselected stripe mark plate by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals;
calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe;
and determining the real stripe width of the stripe target according to the average stripe width.
Optionally, the calculating the width of the imaging area of the target stripe in the stripe image to obtain the average stripe width includes:
extracting the central coordinates of the imaging areas of the target stripes in the stripe images to obtain the central coordinates of a plurality of target stripes;
and calculating the average width of the central coordinates of the target stripes to obtain the average stripe width.
Optionally, the extracting of the central coordinates of the imaging area of the target stripe in the stripe image to obtain the central coordinates of the target stripes includes:
and removing two target stripes positioned at the head and the tail in the stripe image, and extracting the central coordinates of the imaging areas of the remaining target stripes in the stripe image to obtain the central coordinates of the target stripes.
Optionally, before determining the real stripe width of the stripe target according to the average stripe width, the method further includes:
calculating the image distance of the camera module according to the module parameters of the camera module;
the determining the real stripe width of the stripe target according to the average stripe width comprises:
and calculating to obtain the real stripe width of the stripe mark plate according to the image distance of the camera module and the average stripe width.
Optionally, the calculating the real stripe width of the stripe target according to the image distance of the camera module and the average stripe width includes:
and performing similar triangle calculation on the image distance of the camera module, the average stripe width and the target object distance to obtain the real stripe width of the stripe mark plate, wherein the target object distance is the distance between the stripe mark plate and the camera module.
Optionally, the method further comprises:
calculating to obtain the theoretical stripe width of the stripe target according to the target object distance and the effective focal length of the camera module, wherein the target object distance is the distance between the stripe target and the camera module;
and determining whether the stripe target is correctly selected according to the theoretical stripe width and the real stripe width.
Optionally, the determining whether the stripe target is selected correctly according to the theoretical stripe width and the real stripe width includes:
when the theoretical stripe width is the same as the real stripe width, determining that the stripe target is correctly selected; alternatively, the first and second electrodes may be,
and when the theoretical stripe width is different from the real stripe width, determining that the stripe target is incorrectly selected.
In another aspect, the present invention provides an apparatus for calculating a width of a stripe in a stripe target, which includes a photographing module, a calculating module, and a determining module, wherein:
the photographing module is used for photographing a preselected stripe mark plate by using the photographing module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals;
the calculation module is configured to perform width calculation on an imaging area of a target stripe in the stripe image to obtain the average stripe width, where the target stripe is the bright stripe or the dark stripe;
and the determining module is used for determining the real stripe width of the stripe target according to the average stripe width.
For the content that is not introduced or not described in the embodiments of the present invention, reference may be made to the related descriptions in the foregoing method embodiments, and details are not repeated here.
In another aspect, the present invention provides a terminal device according to an embodiment of the present invention, where the terminal device includes: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the calculation method of the stripe width in the stripe target as described above.
In another aspect, the present invention provides a computer-readable storage medium storing a program for executing the method for calculating the stripe width in a stripe target as described above when the program runs on a terminal device, by an embodiment of the present invention.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: the method comprises the steps that a preselected stripe mark plate is photographed by a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals; calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe; and determining the real stripe width of the stripe target according to the average stripe width. In the scheme, the method and the device can calculate the real stripe width of the stripe mark plate according to the imaging area of the bright/dark stripes in the stripe image, so that the real stripe width of the stripe mark plate can be quickly, conveniently and accurately calculated, and the problems that in the prior art, the calibration is wrong, the precision and the quality of a camera module are influenced and the like caused by selecting the stripe mark plate with the wrong width for calibration in the calibration of the camera module are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for calculating a stripe width in a stripe target according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a striped target according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a stripe image according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of removing target stripes located at the head and tail positions in a stripe image according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a device for calculating a stripe width in a stripe target according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a medium for calculating the width of the stripe in the stripe mark plate, which can quickly and accurately calculate the real width of the stripe mark plate, thereby being beneficial to improving the convenience, the rapidity and the accuracy of the calculation of the width of the stripe.
In order to solve the technical problems, the embodiment of the invention has the following general idea: photographing a preselected stripe mark plate by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals; calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe; and determining the real stripe width of the stripe target according to the average stripe width.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a schematic flow chart illustrating a method for calculating a stripe width in a stripe target according to an embodiment of the present invention. The method as shown in fig. 1 comprises the following implementation steps:
s101, a preselected stripe mark plate is photographed by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals.
The stripe target of the invention is a target selected by system self-definition, is used for performing PDAF calibration and the like on a camera module, and can comprise, but is not limited to, a chart (chart) image, a black and white stripe image or other stripe pattern targets and the like. Optionally, the striped target comprises a series of light stripes and dark stripes, and the light stripes and the dark stripes are arranged on the striped target at equal intervals.
For example, please refer to fig. 2, which schematically illustrates a striped target. The striped plate shown in FIG. 2 includes a series of light stripes and dark stripes arranged at equal intervals, wherein the light stripes may be gray stripes in the figure, and the dark stripes may be black stripes in the figure.
In an optional embodiment, the invention utilizes the camera module to photograph the preselected stripe mark plate, and the stripe image can be directly obtained. In step S102, the present invention can directly perform a width calculation on the stripe image obtained by photographing, which is specifically implemented in the following detailed description of the present invention.
In another optional embodiment, the invention utilizes the camera module to take a picture of the preselected stripe target, and then obtains a corresponding taken picture. Further, the invention can perform preprocessing operations such as gray scale conversion, filtering processing and binarization on the photographed image, and the execution sequence of the preprocessing operations is not limited by the invention.
Wherein the fringe image comprises respective imaging areas of light and dark fringes in the fringe target. The respective numbers of the bright stripes and the dark stripes are not limited in the present invention, and they may be the same or different, and the present invention is not limited. In general, the number of the light stripes and the number of the dark stripes included in the stripe image are each plural.
For example, please refer to fig. 3, which shows a schematic diagram of a possible stripe image. The fringe image shown in fig. 3 includes an imaging area between black and white fringes, i.e., a fringe area between black and white fringes.
S102, calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe comprises the bright stripe and/or the dark stripe.
In a specific embodiment, the present invention may extract a central coordinate of an imaging area of a target stripe in the stripe image, so as to obtain a central coordinate of each target stripe, where the target stripe may specifically be a bright stripe or a dark stripe in the stripe image, and the number of the target stripes is not limited in the present invention, and generally, the number of the target stripes is multiple. The central coordinate refers to a coordinate located at a central point in the target stripe (specifically, visible as a rectangular region).
Optionally, in order to ensure the accuracy of calculating the stripe width and eliminate the influence of the edge area of the image, the method and the device can eliminate the target stripes located at the head and the tail in the stripe image, and further extract the central coordinates of the imaging areas of all the remaining target stripes in the stripe image, so as to obtain the central coordinates of each remaining target stripe.
For example, referring to the example shown in fig. 3, please refer to fig. 4, which shows a schematic diagram of a possible target stripe at the head-to-tail position in the eliminated stripe image. As shown in fig. 4, the present invention is described with reference to the target stripe as a bright stripe (white rectangle in the figure) as an example, but the present invention is not limited thereto. In order to eliminate the influence of image edge stripes, the invention eliminates one bright stripe at each of the head position and the tail position of the edge in the stripe image, namely two white rectangles which are not selected in a frame in a diagram do not participate in calculation (namely do not participate in the extraction of central coordinates); and then all the remaining bright stripes after the elimination participate in the calculation, specifically, the bright stripes framed by the black line frame shown in fig. 4 are all the remaining bright stripes after the elimination.
Further, after the central coordinates of the target stripes are extracted, the average width of the central coordinates of the target stripes can be calculated to obtain the average stripe width. The specific implementation of the average width calculation is not limiting. Specifically, for example, the present invention may first calculate a total distance width between two adjacent central coordinates in the central coordinates of a plurality of target stripes, where the total distance width is specifically a sum of respective widths of a light stripe and a dark stripe. A single said average fringe width is then calculated based on said total distance width.
In a specific implementation, the total distance width W can be calculated by the following formula (1) sum(n-2)
W sum(n-2) =(X 2 -X 1 )+(X 3 -X 2 )+...+(X n -X n-1 ) Formula (1)
Wherein, X i The horizontal coordinate in the central coordinate of the ith target stripe, n is the total number of the target stripes in the stripe image, and i is a positive integer less than or equal to n.
Further, the present invention may calculate the distance width W between the center coordinates of two adjacent target stripes by using the following formula (2) 1
Figure BDA0003621787910000081
Since the widths of the bright stripes and the dark stripes in the stripe target are the same, the average stripe width W of the target stripe (specifically, the bright stripe or the dark stripe) can be calculated by the following formula (3) according to the present invention Avg
Figure BDA0003621787910000082
In another embodiment, the present invention may perform center coordinate extraction on the imaging areas of any two adjacent stripes (specifically, one dark stripe and one light stripe) in the stripe image, so as to obtain the center coordinates of the two adjacent stripes. And then calculating to obtain the average stripe width according to the center coordinates of the two adjacent stripes, specifically, calculating the total distance width between the two adjacent stripes according to the center coordinates of the two adjacent stripes, where the total distance width is specifically the width of a bright stripe or a dark stripe. Finally, the present application determines the total distance width as the average fringe width.
S103, determining the real stripe width of the stripe target according to the average stripe width.
In one embodiment, before step S103, the present invention can calculate the image distance of the camera module according to the module parameters of the camera module. The module parameters of the camera module are parameters for describing the camera module, and may include, but are not limited to, an Effective Focal Length (EFL) of the camera module, a target object distance of the camera module, or other parameters. The target object distance can specifically refer to the distance between the stripe target and the camera module during photographing.
In the specific implementation, the module parameters of the camera module can be calculated according to the imaging formula of the camera module, so as to obtain the image distance v of the camera module, wherein the specific calculation formula is shown as the following formula (4):
Figure BDA0003621787910000091
and v is the image distance of the camera module, f is the effective focal length of the camera module, and mu is the target object distance of the camera module.
Correspondingly, in step S103, the present invention may calculate the real stripe width of the target stripe according to the image distance of the camera module and the average stripe width. In a specific implementation, the invention can adopt a similar triangle principle to perform similar triangle calculation on the image distance of the camera module, the target object distance and the average stripe width, so as to obtain the true stripe width calibrated by the stripe, and a related specific calculation formula is as shown in the following formula (5):
Figure BDA0003621787910000092
wherein v is the image distance of the camera module, mu is the target object distance of the camera module, W Avg Is the average fringe width, W 2 The true stripe width of the stripe target.
In an optional embodiment, the theoretical stripe width of the stripe target can be calculated according to the target object distance and the effective focal length of the camera module. The embodiment of calculating the theoretical stripe width is not limited in the present invention, and the theoretical stripe width W can be calculated by the following formula (6), for example 3
Figure BDA0003621787910000101
Wherein, W 3 And the theoretical stripe width of the stripe target is mu, the target object distance of the camera module is mu, and the effective focal length of the camera module is f.
Further, the invention can determine whether the stripe target is selected correctly according to the theoretical stripe width and the real stripe width. Specifically, the present invention may determine whether the theoretical stripe width and the real stripe width are the same. When the theoretical stripe width is the same as the real stripe width, the current stripe target can be determined to be correctly selected, and the stripe target can be used for carrying out testing operations such as PDAF calibration on the camera module. On the contrary, when the theoretical stripe width is different from the real stripe width, it may be determined that the current stripe target is incorrectly selected (i.e., incorrectly selected), and the stripe target cannot be used to perform a test operation, such as PDAF calibration, on the camera module.
By implementing the invention, a pre-selected stripe mark plate is photographed by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals; calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe; and determining the real stripe width of the stripe target according to the average stripe width. In the scheme, the method and the device can calculate the real stripe width of the stripe mark plate according to the imaging area of the bright/dark stripes in the stripe image, so that the real stripe width of the stripe mark plate can be quickly, conveniently and accurately calculated, and the problems that in the prior art, the calibration is wrong, the precision and the quality of a camera module are influenced and the like caused by selecting the stripe mark plate with the wrong width for calibration in the calibration of the camera module are solved.
Based on the same inventive concept, another embodiment of the present invention provides a device and a terminal device corresponding to the method for calculating the width of the stripe in the stripe target in the embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a device for calculating a stripe width in a stripe target according to an embodiment of the present invention. The apparatus 50 shown in fig. 5 comprises a photographing module 501, a calculating module 502 and a determining module 503, wherein:
the photographing module 501 is configured to photograph a preselected stripe target by using a camera module to obtain a corresponding stripe image, where the stripe image includes respective imaging areas of a bright stripe and a dark stripe in the stripe target, and the bright stripe and the dark stripe in the stripe target are arranged at equal intervals;
the calculating module 502 is configured to perform width calculation on an imaging area of a target stripe in the stripe image to obtain the average stripe width, where the target stripe is the bright stripe or the dark stripe;
the determining module 503 is configured to determine a real stripe width of the stripe target according to the average stripe width.
Optionally, the calculating module 502 is specifically configured to:
extracting the central coordinates of the imaging areas of the target stripes in the stripe images to obtain the central coordinates of a plurality of target stripes;
and calculating the average width of the central coordinates of the target stripes to obtain the average stripe width.
Optionally, the calculating module 502 is specifically configured to:
and removing two target stripes positioned at the head and the tail in the stripe image, and extracting the central coordinates of the imaging areas of the remaining target stripes in the stripe image to obtain the central coordinates of the target stripes.
Optionally, before determining the real stripe width of the stripe target according to the average stripe width, the calculating module 502 is further configured to:
calculating the image distance of the camera module according to the module parameters of the camera module;
the determining module 503 is specifically configured to:
and calculating to obtain the real stripe width of the stripe mark plate according to the image distance of the camera module and the average stripe width.
Optionally, the determining module 503 is specifically configured to:
and performing similar triangle calculation on the image distance of the camera module, the average stripe width and the target object distance to obtain the real stripe width of the stripe mark plate, wherein the target object distance is the distance between the stripe mark plate and the camera module.
Optionally, the calculating module 502 is further configured to calculate a theoretical stripe width of the stripe target according to a target object distance and an effective focal length of the camera module, where the target object distance is a distance between the stripe target and the camera module;
the determining module 503 is further configured to determine whether the stripe target is correctly selected according to the theoretical stripe width and the real stripe width.
Optionally, the determining module 503 is specifically configured to:
when the theoretical stripe width is the same as the real stripe width, determining that the stripe target is correctly selected; alternatively, the first and second electrodes may be,
and when the theoretical stripe width is different from the real stripe width, determining that the stripe target is incorrectly selected.
For the content that is not introduced or not described in the embodiments of the present invention, reference may be made to the related descriptions in the foregoing method embodiments, and details are not repeated here.
Please refer to fig. 6, which is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 60 includes a camera module (not shown), and may further include: at least one processor 601, a communication interface 602, a user interface 603 and a memory 604, wherein the processor 601, the communication interface 602, the user interface 603 and the memory 604 can be connected by a bus or other means, and the embodiment of the present invention is exemplified by being connected by the bus 605. Wherein the content of the first and second substances,
processor 601 may be a general-purpose processor, such as a Central Processing Unit (CPU).
The communication interface 602 may be a wired interface (e.g., an ethernet interface) or a wireless interface (e.g., a cellular network interface or using a wireless local area network interface) for communicating with other terminals or websites. In the embodiment of the present invention, the communication interface 602 is specifically configured to obtain information such as a stripe image and a module parameter of the camera module.
The user interface 603 may specifically be a touch panel, including a touch screen and a touch screen, for detecting an operation instruction on the touch panel, and the user interface 603 may also be a physical button or a mouse. The user interface 603 may also be a display screen for outputting, displaying images or data.
Memory 604 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 604 may also comprise a combination of the above types of memory. The memory 604 is used for storing a set of program codes, and the processor 601 is used for calling the program codes stored in the memory 604 and executing the following operations:
photographing a preselected stripe mark plate by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals;
calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe;
and determining the real stripe width of the stripe target according to the average stripe width.
Optionally, the calculating the width of the imaging area of the target stripe in the stripe image to obtain the average stripe width includes:
extracting the central coordinates of the imaging areas of the target stripes in the stripe images to obtain the central coordinates of a plurality of target stripes;
and calculating the average width of the central coordinates of the target stripes to obtain the average stripe width.
Optionally, the extracting of the central coordinates of the imaging area of the target stripe in the stripe image to obtain the central coordinates of the target stripes includes:
and removing two target stripes positioned at the head and the tail in the stripe image, and extracting the central coordinates of the imaging areas of the remaining target stripes in the stripe image to obtain the central coordinates of the target stripes.
Optionally, before determining the real stripe width of the stripe target according to the average stripe width, the processor 601 is further configured to:
calculating the image distance of the camera module according to the module parameters of the camera module;
the determining the real stripe width of the stripe target according to the average stripe width comprises:
and calculating to obtain the real stripe width of the stripe mark plate according to the image distance of the camera module and the average stripe width.
Optionally, the calculating the real stripe width of the stripe target according to the image distance of the camera module and the average stripe width includes:
and performing similar triangle calculation on the image distance of the camera module, the average stripe width and the target object distance to obtain the real stripe width of the stripe mark plate, wherein the target object distance is the distance between the stripe mark plate and the camera module.
Optionally, the processor 601 is further configured to:
calculating to obtain the theoretical stripe width of the stripe target according to the target object distance and the effective focal length of the camera module, wherein the target object distance is the distance between the stripe target and the camera module;
and determining whether the stripe target is correctly selected according to the theoretical stripe width and the real stripe width.
Optionally, the determining whether the stripe target is selected correctly according to the theoretical stripe width and the real stripe width includes:
when the theoretical stripe width is the same as the real stripe width, determining that the stripe target is correctly selected; alternatively, the first and second liquid crystal display panels may be,
and when the theoretical stripe width is different from the real stripe width, determining that the stripe target is incorrectly selected.
Since the terminal device described in this embodiment is a terminal device used for implementing the method in this embodiment of the present invention, based on the method described in this embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the terminal device in this embodiment and various variations thereof, so that a detailed description of how the terminal device implements the method in this embodiment of the present invention is not provided here. The terminal device adopted by the method in the embodiment of the present invention is within the scope of the protection of the present invention as long as the terminal device is implemented by those skilled in the art.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: the method comprises the steps that a preselected stripe mark plate is photographed by a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals; calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe is the bright stripe or the dark stripe; and determining the real stripe width of the stripe target according to the average stripe width. In the scheme, the method and the device can calculate the real stripe width of the stripe mark plate according to the imaging area of the bright/dark stripes in the stripe image, so that the real stripe width of the stripe mark plate can be quickly, conveniently and accurately calculated, and the problems that in the prior art, the calibration is wrong, the precision and the quality of a camera module are influenced and the like caused by selecting the stripe mark plate with the wrong width for calibration in the calibration of the camera module are solved.
As will be appreciated by one skilled in the art, 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, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for calculating the width of a stripe in a stripe target, which is characterized by comprising the following steps:
photographing a preselected stripe mark plate by using a camera module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals;
calculating the width of an imaging area of a target stripe in the stripe image to obtain the average stripe width, wherein the target stripe comprises the bright stripe and/or the dark stripe;
and determining the real stripe width of the stripe target according to the average stripe width.
2. The method of claim 1, wherein the calculating the width of the imaging area of the target stripe in the stripe image to obtain an average stripe width comprises:
extracting the central coordinates of the imaging areas of the target stripes in the stripe images to obtain the central coordinates of a plurality of target stripes;
and calculating the average width of the central coordinates of the target stripes to obtain the average stripe width.
3. The method of claim 2, wherein the extracting the central coordinates of the imaging area of the target stripe in the stripe image to obtain the central coordinates of a plurality of target stripes comprises:
and removing target stripes positioned at the head and the tail in the stripe image, and extracting the central coordinates of imaging areas of the remaining target stripes in the stripe image to obtain the central coordinates of the target stripes.
4. The method of claim 1, wherein prior to determining the true stripe width of the striped target from the average stripe width, the method further comprises:
calculating the image distance of the camera module according to the module parameters of the camera module;
the determining the real stripe width of the stripe target according to the average stripe width comprises:
and calculating to obtain the real stripe width of the stripe mark plate according to the image distance of the camera module and the average stripe width.
5. The method of claim 4, wherein the calculating the true stripe width of the stripe target according to the image distance of the camera module and the average stripe width comprises:
and performing similar triangle calculation on the image distance of the camera module, the average stripe width and the target object distance to obtain the real stripe width of the stripe mark plate, wherein the target object distance is the distance between the stripe mark plate and the camera module.
6. The method according to any one of claims 1-5, further comprising:
calculating to obtain the theoretical stripe width of the stripe target according to the target object distance and the effective focal length of the camera module, wherein the target object distance is the distance between the stripe target and the camera module;
and determining whether the stripe target is correctly selected according to the theoretical stripe width and the real stripe width.
7. The method of claim 6, wherein said determining whether the stripe target is selected correctly based on the theoretical stripe width and the true stripe width comprises:
when the theoretical stripe width is the same as the real stripe width, determining that the stripe target is correctly selected; alternatively, the first and second electrodes may be,
and when the theoretical stripe width is different from the real stripe width, determining that the stripe target is incorrectly selected.
8. The device for calculating the width of the stripes in the stripe target is characterized by comprising a photographing module, a calculating module and a determining module, wherein:
the photographing module is used for photographing a preselected stripe mark plate by using the photographing module to obtain a corresponding stripe image, wherein the stripe image comprises respective imaging areas of a bright stripe and a dark stripe in the stripe mark plate, and the bright stripe and the dark stripe in the stripe mark plate are arranged at equal intervals;
the calculation module is configured to perform width calculation on an imaging area of a target stripe in the stripe image to obtain the average stripe width, where the target stripe is the bright stripe or the dark stripe;
and the determining module is used for determining the real stripe width of the stripe target according to the average stripe width.
9. A terminal device, characterized in that the terminal device comprises: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the calculation method of the stripe width in the stripe target according to any one of claims 1 to 7.
10. A computer-readable storage medium characterized by storing a program which, when run on a terminal device, executes the method of calculating the width of a stripe in a stripe reticle according to any one of claims 1 to 7.
CN202210470646.0A 2022-04-28 2022-04-28 Method, device and equipment for calculating width of stripe in stripe mark plate and medium Pending CN114862965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210470646.0A CN114862965A (en) 2022-04-28 2022-04-28 Method, device and equipment for calculating width of stripe in stripe mark plate and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210470646.0A CN114862965A (en) 2022-04-28 2022-04-28 Method, device and equipment for calculating width of stripe in stripe mark plate and medium

Publications (1)

Publication Number Publication Date
CN114862965A true CN114862965A (en) 2022-08-05

Family

ID=82635093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210470646.0A Pending CN114862965A (en) 2022-04-28 2022-04-28 Method, device and equipment for calculating width of stripe in stripe mark plate and medium

Country Status (1)

Country Link
CN (1) CN114862965A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017003364A (en) * 2015-06-08 2017-01-05 オリンパス株式会社 Imaging apparatus, image processing apparatus, control method of imaging apparatus, and image processing program
CN106556960A (en) * 2015-09-29 2017-04-05 宁波舜宇光电信息有限公司 Out of focus conversion coefficient verification method
CN106796102A (en) * 2015-02-11 2017-05-31 华为技术有限公司 A kind of method and device for measuring dimension of object
CN108151657A (en) * 2017-12-28 2018-06-12 上海传英信息技术有限公司 A kind of dimension of object measuring method and measuring device based on intelligent terminal
CN111879258A (en) * 2020-09-28 2020-11-03 南京理工大学 Dynamic high-precision three-dimensional measurement method based on fringe image conversion network FPTNet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796102A (en) * 2015-02-11 2017-05-31 华为技术有限公司 A kind of method and device for measuring dimension of object
JP2017003364A (en) * 2015-06-08 2017-01-05 オリンパス株式会社 Imaging apparatus, image processing apparatus, control method of imaging apparatus, and image processing program
CN106556960A (en) * 2015-09-29 2017-04-05 宁波舜宇光电信息有限公司 Out of focus conversion coefficient verification method
CN108151657A (en) * 2017-12-28 2018-06-12 上海传英信息技术有限公司 A kind of dimension of object measuring method and measuring device based on intelligent terminal
CN111879258A (en) * 2020-09-28 2020-11-03 南京理工大学 Dynamic high-precision three-dimensional measurement method based on fringe image conversion network FPTNet

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
全厚德;闫守成;张洪才;: "计算机视觉中摄像机标定精度评估方法", 测绘科学技术学报, no. 03, 30 September 2006 (2006-09-30), pages 222 - 224 *
全厚德;闫守成;张洪才;: "计算机视觉中摄像机标定精度评估方法", 测绘科学技术学报, vol. 23, no. 03, 30 June 2006 (2006-06-30), pages 222 - 224 *

Similar Documents

Publication Publication Date Title
CN108470334B (en) Method and device for collecting screen brightness and chromaticity
CN111598074B (en) Edge detection method and device, electronic equipment and storage medium
CN108074237B (en) Image definition detection method and device, storage medium and electronic equipment
CN105069453A (en) Image correction method and apparatus
CN111738045A (en) Image detection method and device, electronic equipment and storage medium
US20220398716A1 (en) Method of detecting product defects, electronic device, and storage medium
CN112556994B (en) Optical information detection method, device and equipment
CN114926385A (en) Panel defect detection method, storage medium and terminal equipment
CN108055486B (en) Brightness correction method and device
CN112634201A (en) Target detection method and device and electronic equipment
CN111798422A (en) Checkerboard angular point identification method, device, equipment and storage medium
TW201911230A (en) Surveillance method, computing device, and non-transitory storage medium
CN114612409A (en) Projection calibration method and device, storage medium and electronic equipment
CN114187363A (en) Method and device for obtaining radial distortion parameter value and mobile terminal
CN113781414A (en) Lens resolving power testing method and device and electronic equipment
CN114862965A (en) Method, device and equipment for calculating width of stripe in stripe mark plate and medium
CN115761270A (en) Color card detection method and device, electronic equipment and storage medium
CN110782463A (en) Method and device for determining division mode, display method and equipment and storage medium
CN108564571B (en) Image area selection method and terminal equipment
CN114170319A (en) Method and device for adjusting test target
CN116385567A (en) Method, device and medium for obtaining color card ROI coordinate information
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN114862870A (en) Speckle pattern partitioning method, device, equipment and medium
CN111142825B (en) Multi-screen visual field display method and system and electronic equipment
CN111145674B (en) Display panel detection method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230801

Address after: No.3, Taihong Road, Kunshan high tech Industrial Development Zone, Suzhou, Jiangsu Province, 215300

Applicant after: Kunshan Qiuti Microelectronics Technology Co.,Ltd.

Address before: 519031 room 105-65596, No. 6, Baohua Road, Hengqin new area, Zhuhai City, Guangdong Province (centralized office area)

Applicant before: Zhuhai Qiuti Microelectronics Technology Co.,Ltd.

TA01 Transfer of patent application right