Image extraction method and device, computer equipment and computer readable storage medium

By generating the imaginary first calibration plate image and the second calibration plate image in the real environment, and extracting the target image using a homography matrix, the problem that the image acquisition device is difficult to identify and calibrate preset calibration plates in complex environments is solved, and the accuracy and adaptability of calibration are improved.

CN119850748APending Publication Date: 2025-04-18ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411726866.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In complex image acquisition environments, it is difficult for the image acquisition device to accurately identify and calibrate preset calibration plates when the light is dark or the calibration plate is blocked, resulting in deviations in calibration results.

Method used

By generating a fictitious first calibration plate image, a homography matrix is ​​determined using the feature image in the image and the feature image in the second calibration plate image in the real environment, thereby extracting the target image corresponding to the preset calibration plate.

Benefits of technology

The recognition accuracy and clarity of preset calibration plate images in complex environments are improved, the calibration result error caused by unclear images is reduced, and the calibration result is adapted to a more complex calibration environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850748A_ABST
    Figure CN119850748A_ABST
Patent Text Reader

Abstract

The invention provides an image extraction method and device, computer equipment and a computer readable storage medium, and the method comprises the steps: generating a first calibration board image according to the parameter information of a preset calibration board, the first calibration board image comprising a plurality of first feature images, and the first feature images being used for indicating feature patterns on the preset calibration board; a second calibration plate image corresponding to the preset calibration plate is obtained, and the second calibration plate image is obtained and comprises at least two second feature images; determining a homography matrix according to the first feature image and a second feature image corresponding to the first feature image; and extracting a target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image. According to the invention, the recognition accuracy of the preset calibration board can be improved in the acquired image, so that the image acquisition device can adapt to a relatively complex calibration environment in a calibration process through the preset calibration board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image extraction method, device, computer equipment and computer-readable storage medium. Background Art

[0002] Among the related technologies for calibrating image acquisition devices, there are methods of calibrating through an external calibration system, but this method has high requirements on the calibration system; other methods are to acquire images containing preset calibration plates through image acquisition devices, so as to realize calibration through the preset calibration plates in the acquired images, but in some complex image acquisition environments, there may be situations such as dim light or partial obstruction of the preset calibration plates, resulting in low clarity or incomplete images of the preset calibration plates acquired by the image acquisition device, which leads to large deviations in the calibration results. Summary of the invention

[0003] The present application provides an image extraction method, device, computer equipment and computer-readable storage medium, which aim to improve the recognition accuracy of a preset calibration plate in a captured image, so that the image acquisition device can adapt to a more complex calibration environment during the calibration process using the preset calibration plate.

[0004] In a first aspect, the present application provides an image extraction method, the image extraction method comprising the following steps:

[0005] Generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate;

[0006] Acquire a second calibration plate image corresponding to a preset calibration plate, wherein the second calibration plate image includes at least two second feature images;

[0007] Determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image;

[0008] A target image corresponding to the preset calibration plate is extracted from the second calibration plate image according to the homography matrix and the first calibration plate image.

[0009] In a second aspect, the present application further provides an image extraction device, comprising:

[0010] A first image generation module, used to generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate;

[0011] A second image generation module, used to obtain a second calibration plate image corresponding to the preset calibration plate, wherein the second calibration plate image includes at least two second feature images;

[0012] a homography matrix determination module, configured to determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image;

[0013] An image extraction module is used to extract a target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image.

[0014] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the image extraction method as described above are implemented.

[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the image extraction method as described above are implemented.

[0016] The present application provides an image extraction method, an apparatus, a computer device and a computer-readable storage medium. The present application creates a first calibration plate image corresponding to a preset calibration plate, and determines a homography matrix through a first feature image in the first calibration plate image and at least two second feature images in a second calibration plate image acquired from a real environment, so that the position of a target image corresponding to the preset calibration plate in the second calibration plate image can be determined through the homography matrix and the first calibration plate image, and then the image at the position is extracted to obtain the target image corresponding to the preset calibration plate, and then the image acquisition device can be calibrated according to the target image, so there is no need to calibrate the image acquisition device through a specific calibration system, and the position area of ​​the preset calibration plate in the image can be more accurately determined in the image acquired from some more complex image acquisition environments, so that the image of the position area is processed, so as to improve the recognition accuracy and clarity of the image corresponding to the preset calibration plate, reduce the risk of large calibration result errors caused by unclear calibration plate images, and enable the calibration process through the preset calibration plate to adapt to more complex calibration environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A schematic diagram of a flow chart of an image extraction method provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a first calibration plate image provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a scene of a second calibration plate image acquisition environment provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of a second calibration plate image provided by another embodiment of the present application;

[0022] Figure 5 A schematic diagram of an image capture device provided in an embodiment of the present application;

[0023] Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0024] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0027] The present application provides an image extraction method, apparatus, computer device and computer readable storage medium. The image extraction method can be applied to a computer device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, etc.

[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] Please refer to Figure 1 , Figure 1 A flowchart of an image extraction method provided in an embodiment of the present application.

[0030] like Figure 1 As shown, the image extraction method includes steps S101 to S104.

[0031] Step S101: generating a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate.

[0032] Exemplarily, the parameter information of the preset calibration plate includes but is not limited to the length and width of the preset calibration plate, the characteristic pattern on the preset calibration plate, the number of columns of the characteristic pattern, the number of rows of the characteristic pattern, the side length of the characteristic pattern, the distance between adjacent characteristic patterns, etc. The length data and width data of the first calibration plate image are obtained by the preset ratio and the length and width of the preset calibration plate. For example, if the preset ratio is 1, the length of the preset calibration plate is 20 cm and the width is 10 cm, then the length data of the generated first calibration plate image is 20 cm and the width data is 10 cm, and according to the characteristic pattern on the preset calibration plate, the number of columns of the characteristic pattern, the number of rows of the characteristic pattern, the side length of the characteristic pattern, the distance between adjacent characteristic patterns, etc., a corresponding first characteristic image is generated on the first calibration plate image. For example, if the preset calibration plate contains 2×2 characteristic patterns, then the arrangement of the first characteristic image generated on the first calibration plate image is also 2×2, and the first characteristic image corresponds to the characteristic pattern one by one, that is, the parameters of the generated first calibration plate image are the same as the parameter information of the preset calibration plate, or are in a preset ratio, which is not limited here.

[0033] See also Figure 2 , Figure 2 A schematic diagram of a first calibration plate image provided in an embodiment of the present application.

[0034] In a specific embodiment, the preset calibration plate includes an April Tag calibration plate, wherein the April Tag calibration plate includes a plurality of characteristic patterns, and the plurality of characteristic patterns are arranged according to a preset rule, such as 6 characteristic patterns arranged in 2 rows and 3 columns, or arranged according to other rules, which are not limited here; and each characteristic pattern is different from each other, that is, each characteristic pattern is uniquely coded, so the April Tag calibration plate can still be used for calibration in the case of non-ideal imaging or partial obstruction. Specifically, the first calibration plate image generated according to the parameter information of the preset calibration plate can be as follows Figure 2 As shown, the first calibration plate image includes a first characteristic image that corresponds one-to-one to all characteristic patterns on the preset calibration plate.

[0035] In a specific implementation process, the parameter information of a preset calibration plate is input to generate a first calibration plate image. In other implementation processes, when the image acquisition environment is good, image acquisition processing is performed on the preset calibration plate to obtain the first calibration plate image, wherein the obtained first calibration plate image is clear and complete. A good image acquisition environment includes but is not limited to sufficient and appropriate light, and no obstructions appear during the image acquisition process.

[0036] Step S102: acquiring a second calibration plate image corresponding to the preset calibration plate, wherein the second calibration plate image includes at least two second feature images.

[0037] Exemplarily, an image acquisition device is used to acquire an image of a preset calibration plate in a real environment to obtain a second calibration plate image. It should be understood that the second calibration plate image includes not only an actual image corresponding to the preset calibration plate, but also an environmental image. Therefore, if calibration is performed directly using the acquired second calibration plate image, it will be affected by the environmental image, resulting in errors in the recognition and analysis of the preset calibration plate in the second calibration plate image. Therefore, by identifying and determining the location of the target image corresponding to the preset calibration plate in the second calibration plate image and using the extracted target image for calibration, the influence of the environment can be effectively avoided, thereby improving the calibration effect.

[0038] In a specific implementation process, the image acquisition device includes an industrial camera.

[0039] See also Figure 3 , Figure 3 A schematic diagram of a scene of a second calibration plate image acquisition environment provided in an embodiment of the present application.

[0040] For example, since it is necessary to obtain the corresponding calibration plate image in different environments, in some cases, the image acquisition environment may have the following conditions: Figure 3 The light condition shown is dim, and in some other image acquisition environments, there may be a situation where the calibration plate is partially blocked.

[0041] In the specific implementation process, although the image corresponding to the preset calibration plate in the second calibration plate image captured by the image acquisition device may be dim, difficult to identify, or partially blocked, it is still necessary to obtain at least two second feature images in the second calibration plate image. It should be understood that the second feature image is the image corresponding to the feature pattern on the preset calibration plate. If at least two second feature images cannot be obtained in the second calibration plate image, the image acquisition process is re-performed to obtain at least two second feature images in the re-obtained second calibration plate image.

[0042] Step S103: determining a homography matrix according to the first feature image and the second feature image corresponding to the first feature image.

[0043] Exemplarily, the homography matrix is ​​determined by the first feature image and the second feature image corresponding to the first image. It should be understood that the homography of a plane is a projection mapping from one plane to another plane. The homography matrix can link the point set positions on the image plane of the first calibration plate image with the point set positions on the image plane of the second calibration plate image. Therefore, the area where the target image corresponding to the preset calibration plate is located can be determined on the second calibration plate image through the first calibration image.

[0044] It should be noted that, on a certain image plane, there are image points at certain positions but no image points at certain positions, and the corresponding image is constructed by the existing image points. For example, on the image plane of the first calibration plate image, image points at multiple different positions are included to construct the first calibration plate image, and the point set position is used to indicate the set of positions of all image points in the first calibration image.

[0045] In some embodiments, a homography matrix is ​​determined based on the first feature image and the second feature image corresponding to the first feature pattern, including: determining the first position information of each of the first feature images in the first calibration plate image to obtain a first feature image position point set; determining the second position information of each of the second feature images in the second calibration plate image to obtain a second feature image position point set; based on a preset position transformation calculation function, determining the homography matrix according to the correspondence between the first feature image position point set, the second feature image position point set and the first feature pattern and the second feature pattern.

[0046] In a specific implementation process, the first position information of each first feature image in the first calibration plate image is determined. Specifically, the determined first position information can be used Characterization, where P is used to indicate the position, j is used to indicate the jth first feature image, and virtual is used to indicate that the information is the position information corresponding to the first feature image in the first calibration plate image; similarly, the second position information of each second feature image on the second calibration plate image is determined. Specifically, the determined information can be used Representation, where P is used to indicate the position, i is used to indicate the i-th second feature image, and real is used to indicate that the information is the position information corresponding to the second feature image in the second calibration plate image. It should be understood that after determining the position of each feature image, the information including The first feature image position point set, and contains and a second feature image position point set; and based on a preset position transformation calculation function, determining a homography matrix through the correspondence between the first feature image position point set, the second feature image position point set, and the first feature image and the second feature image, wherein the homography matrix is ​​used to indicate the relationship between the first image plane and the second image plane, the first image plane is the image plane where the first feature image is located, and the second image plane is the image plane where the second feature image is located.

[0047] In the specific implementation process, the preset position transformation calculation function is findHomography in OpenCV. It should be understood that the position point set of the first feature image and the position point set of the second feature image are input into findHomography, and findHomography can determine the corresponding image based on the corresponding first feature image and the second feature image, and use the position points of the corresponding image as mapping points to obtain the homography matrix.

[0048] In some embodiments, the image similarity between the first feature image and the second feature image is calculated; if the image similarity is greater than or equal to a preset image similarity threshold, the second feature image is used as the second feature image corresponding to the current first feature image.

[0049] Exemplarily, since each characteristic pattern on the preset calibration plate is different, each first characteristic image is different, but since the first calibration plate image and the second calibration plate image are images generated based on the same preset calibration plate, there is a corresponding relationship between the first characteristic image and the second characteristic image, and the image similarity between the first characteristic image and the second characteristic image is calculated to determine the first characteristic image corresponding to each second characteristic image in the second characteristic images that can be collected. In a specific implementation process, if it is calculated that the image similarity between at least two second characteristic images and one first characteristic image is greater than the preset image similarity threshold, the image similarity threshold is increased so that the image similarity between only one second characteristic image and one first characteristic image is greater than the preset image similarity threshold.

[0050] Therefore, a second feature image position point set is generated according to the second position information of the second feature image with a corresponding relationship, and then the interference image that is similar to the feature pattern but is not actually the feature pattern is excluded from the second calibration plate image, so as to improve the calculation accuracy of the homography matrix, thereby improving the accuracy of target image extraction.

[0051] Step S104: extracting a target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image.

[0052] Exemplarily, after obtaining the homography matrix, corresponding image processing is performed on the first calibration plate image through the homography matrix, for example, each image point in the first calibration plate image is mapped through the homography matrix to obtain a processed image, and the processed image can include all image information such as the size, number, and arrangement of characteristic patterns in the first calibration plate image, and the image plane where the processed image is located is the same plane as the image plane where the second calibration plate image is located, thereby realizing the mapping of the first calibration plate image to the second calibration plate image, so that the target image corresponding to the preset calibration plate can be determined according to the second calibration plate image and the mapping of the first calibration plate image in the second calibration plate image.

[0053] In some embodiments, extracting the target image corresponding to the preset calibration plate from the second calibration plate image based on the homography matrix and the first calibration plate image includes: determining a target image extraction area in the second calibration plate image based on the homography matrix and the first calibration plate image; and extracting the target image corresponding to the preset calibration plate in the second calibration plate image based on the target image extraction area.

[0054] Exemplarily, the first calibration plate image is mapped to the second calibration plate image through the homography matrix to determine the target image extraction area in the second calibration plate image. It should be noted that before mapping, the image size of the first calibration plate image is the same as the image size of the second calibration plate image to improve the accuracy of determining the target image extraction area, and then determine the image in the target image extraction area as the target image corresponding to the preset calibration plate.

[0055] See also Figure 4 , Figure 4 A schematic diagram of a second calibration plate image provided in another embodiment of the present application.

[0056] like Figure 4 As shown, Figure 4The area within the red box is the target image extraction area, so that after the target image extraction area is determined, the image in the target image extraction area can be extracted to determine the image in the target image extraction area as the target image corresponding to the preset calibration plate.

[0057] In some embodiments, determining the target image extraction area according to the homography matrix and the first calibration plate image includes: based on the homography matrix, performing perspective transformation processing on the first feature image in the first calibration plate image to obtain a third feature image; and determining the target image extraction area in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image.

[0058] Exemplarily, since the homography matrix is ​​determined by the image information of the first calibration plate image and the image information of the second calibration plate image, the homography matrix contains the mapping relationship between the first calibration plate image and the second calibration plate image. Therefore, all the first feature images in the first calibration plate are perspective transformed by the homography matrix to obtain a third feature image corresponding to each first feature image, and the image plane of the third feature image and the image plane of the second calibration plate image are a unified image plane. Since the target image extraction area can be determined according to the position of the third feature image on the second calibration plate image, specifically, the position of the third feature image on the second calibration plate image is the target image extraction area.

[0059] In some embodiments, determining the target image extraction area in the second calibration plate image based on the third feature image, the second feature image and the second calibration plate image includes: determining the third feature image corresponding to each of the second feature images; determining the target image extraction area based on the third feature image corresponding to the second feature image, and the position of the second feature image in the second calibration plate image.

[0060] Exemplarily, after mapping the first feature image to the third feature image, it is necessary to determine a reference point so that the mapped third feature image is aligned with the second feature image. Specifically, the reference point is determined by determining the third feature image corresponding to the second feature image, so as to determine the position of each third feature image in the second calibration plate image according to the corresponding second feature image, thereby obtaining the target image extraction area. In some embodiments, determining the target image extraction area according to the second feature image, the third feature image corresponding to the second feature image, and the position of the second feature image in the second calibration plate image includes: determining the position of the third feature image in the second calibration plate image according to the correspondence between the second feature image and the third feature image and the position of the second feature image in the second calibration plate image; and determining the position of the third feature image in the second calibration plate image as the target image extraction area.

[0061] In a specific implementation process, since the positional relationship between the multiple first feature images is determined based on the positional relationship between the feature patterns on the preset calibration plate, that is, the positional relationship is fixed, the positional relationship between the multiple third feature images obtained is the same as the positional relationship between the multiple first feature images. Therefore, after determining at least one second feature image corresponding to the third feature image, the position of the corresponding third feature image on the second calibration plate can be determined based on the position of the second feature image in the second calibration plate image. Furthermore, the positions of all third feature images on the second calibration plate image can be determined through the positional relationship between each third feature image. The position area where the third feature image is located in the second calibration plate image is the target image extraction area. Area; It should be noted that, since each feature image on the preset calibration plate is different, the images obtained between each first feature image, each second feature image and each third feature image are different, but since the third feature image is obtained by perspective transformation of the first feature image, the first feature image and the third feature image are one-to-one corresponding, and the first feature image and the second feature image are determined by the same preset calibration plate. Therefore, in all the first feature images, there is an image with the same pattern as the second feature image, and then in all the third feature images, a third feature image with the same pattern as a second feature image can be found, thereby determining the positions of all the third feature images in the second calibration plate image and obtaining the target image extraction area.

[0062] In some embodiments, extracting the target image corresponding to the preset calibration plate in the second calibration plate image based on the target image extraction area includes: performing image enhancement processing on the image extracted from the second calibration plate image according to the target image extraction area to obtain the target image.

[0063] In the specific implementation process, since the acquisition environment of the second calibration plate image may have problems such as dim light and the preset calibration plate being blocked, even if the target extraction area is determined, the image extracted in the target extraction area has dim brightness and incomplete feature images in the image, which can easily lead to large errors in the calibration results of the camera performed using the extracted image; based on this, after determining the target image extraction area, image enhancement processing is performed on the image extracted in the target image extraction area, wherein the image enhancement processing includes but is not limited to adjusting the image brightness, adjusting the image contrast, and completing the feature image of the extracted image according to the third feature image, so that the obtained target image is closer to the actual preset calibration plate, and in the process of camera calibration, the target image is easier to be identified, thereby improving the accuracy and efficiency of camera calibration.

[0064] The image extraction method provided in the above embodiment determines the homography matrix by fictitiously creating a first calibration plate image corresponding to the preset calibration plate, through the first feature image in the first calibration plate image, and at least two second feature images in the second calibration plate image acquired by the image acquisition device from the real environment, so that the position of the target image corresponding to the preset calibration plate in the second calibration plate image can be determined through the homography matrix and the first calibration plate image, and then the image at the position is extracted to obtain the target image corresponding to the preset calibration plate, and then the image acquisition device can be calibrated according to the target image, so there is no need to calibrate the image acquisition device through a specific calibration system, and the position area of ​​the preset calibration plate in the image can be more accurately determined in the image acquired from some more complex image acquisition environments, so as to process the image of the position area, so as to improve the recognition accuracy and clarity of the image corresponding to the preset calibration plate, reduce the risk of large calibration result errors caused by unclear calibration plate images, so that the calibration process through the preset calibration plate can adapt to more complex calibration environments.

[0065] See also Figure 5 , Figure 5 A schematic diagram of an image capture device provided in an embodiment of the present application.

[0066] like Figure 5 As shown, the image extraction device includes a first image generation module 110 , a second image generation module 120 , a homography matrix determination module 130 and an image extraction module 140 .

[0067] The first image generating module 110 is used to generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate.

[0068] The second image generating module 120 is configured to obtain a second calibration plate image corresponding to the preset calibration plate, wherein the second calibration plate image includes at least two second feature images.

[0069] The homography matrix determination module 130 is configured to determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image.

[0070] The image extraction module 140 is configured to extract a target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image.

[0071] In one embodiment, the homography matrix determination module 130 includes a first position point set determination submodule and a second position point set determination submodule.

[0072] The first position point set determination submodule is used to determine the first position information of each of the first feature images in the first calibration plate image to obtain a first feature image position point set.

[0073] The second position point set determination submodule is used to determine the second position information of each second feature image in the second calibration plate image to obtain a second feature image position point set.

[0074] The homography matrix determination module 130 is further used to determine the homography matrix based on a preset position transformation calculation function and according to the correspondence between the first feature image position point set, the second feature image position point set, and the first feature pattern and the second feature pattern.

[0075] In one embodiment, the homography matrix determination module 130 further includes an image similarity calculation submodule and a first image relationship determination submodule.

[0076] The image similarity calculation submodule is used to calculate the image similarity between the first feature image and the second feature image.

[0077] The first image relationship determination submodule is configured to use the second feature image as the second feature image corresponding to the current first feature image if the image similarity is greater than or equal to a preset image similarity threshold.

[0078] In one embodiment, the image extraction module 140 includes an image region determination submodule.

[0079] An image region determination submodule is used to determine a target image extraction region in the second calibration plate image according to the homography matrix and the first calibration plate image.

[0080] The image extraction module 140 is further configured to extract a target image corresponding to the preset calibration plate from the second calibration plate image based on the target image extraction area.

[0081] In one embodiment, the image region determination submodule includes a third image generation submodule.

[0082] The third image generation submodule is used to perform perspective transformation processing on the first feature image in the first calibration plate image based on the homography matrix to obtain a third feature image.

[0083] The image region determination submodule is further used to determine the target image extraction region in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image.

[0084] In one embodiment, the image region determination submodule further includes a second image relationship determination submodule.

[0085] The second image relationship determination submodule is used to determine a third feature image corresponding to each of the second feature images.

[0086] The image area determination submodule is further used to determine the target image extraction area according to the third feature image corresponding to the second feature image and the position of the second feature image in the second calibration plate image.

[0087] In one embodiment, the image region determination submodule further includes an image position determination submodule.

[0088] The image position determination submodule is used to determine the position of the third feature image in the second calibration plate image according to the corresponding relationship between the second feature image and the third feature image and the position of the second feature image in the second calibration plate image.

[0089] The image region determination submodule is further used to determine the position of the third feature image in the second calibration plate image as the target image extraction region.

[0090] See also Figure 6 , Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0091] like Figure 6 As shown, the computer is communicatively connected with the image acquisition device to obtain the second calibration plate image acquired from the image acquisition device; the computer device includes a processor and a memory connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0092] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any image extraction method.

[0093] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0094] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any image extraction method.

[0095] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0096] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0097] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0098] Generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate;

[0099] Performing image acquisition processing on the preset calibration plate by an image acquisition device to obtain a second calibration plate image, wherein the second calibration plate image includes at least two second feature images;

[0100] Determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image;

[0101] A target image corresponding to the preset calibration plate is extracted from the second calibration plate image according to the homography matrix and the first calibration plate image.

[0102] In one embodiment, when the processor determines the homography matrix according to the first feature image and the second feature image corresponding to the first feature pattern, it is configured to implement:

[0103] Performing numbering processing on each of the first feature images, and determining first position information of each of the first feature images in the first calibration plate image, to obtain a first feature image position point set;

[0104] Performing numbering processing on each of the second characteristic images, and determining second position information of each of the second characteristic images in the second calibration plate image, to obtain a second characteristic image position point set;

[0105] Based on a preset position transformation calculation function, the homography matrix is ​​determined according to the first feature image position point set and the second feature image position point set.

[0106] In one embodiment, when implementing the image extraction method, the processor is used to implement:

[0107] Calculating image similarity between the first feature image and the second feature image;

[0108] If the image similarity is greater than or equal to a preset image similarity threshold, the second feature image is used as the second feature image corresponding to the current first feature image.

[0109] In one embodiment, when the processor extracts the target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image, it is used to implement:

[0110] Determine a target image extraction area in the second calibration plate image according to the homography matrix and the first calibration plate image;

[0111] A target image corresponding to the preset calibration plate is extracted from the second calibration plate image based on the target image extraction area.

[0112] In one embodiment, when extracting the target image corresponding to the preset calibration plate from the second calibration plate image based on the target image extraction area, the processor is used to implement:

[0113] An image enhancement process is performed on the image extracted from the second calibration plate image according to the target image extraction area to obtain the target image.

[0114] In one embodiment, when determining the target image extraction area according to the homography matrix and the first calibration plate image, the processor is used to implement:

[0115] Based on the homography matrix, performing perspective transformation processing on the first feature image in the first calibration plate image to obtain a third feature image;

[0116] The target image extraction area is determined in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image.

[0117] In one embodiment, when the processor determines the target image extraction area in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image, it is configured to implement:

[0118] determining a third characteristic image corresponding to each of the second characteristic images;

[0119] The target image extraction area is determined according to a third feature image corresponding to the second feature image and a position of the second feature image in the second calibration plate image.

[0120] In one embodiment, when the processor determines the target image extraction area according to the second feature image, the third feature image corresponding to the second feature image, and the position of the second feature image in the second calibration plate image, it is used to implement:

[0121] Determining the position of the third characteristic image in the second calibration plate image according to the corresponding relationship between the second characteristic image and the third characteristic image and the position of the second characteristic image in the second calibration plate image;

[0122] The area where the third feature image is located is determined as the target image extraction area.

[0123] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned image extraction method embodiment, and will not be repeated here.

[0124] It should be noted that, in some other embodiments, the image acquisition device is arranged inside the computer device, that is, the computer device includes a processor, a memory and an image acquisition device connected through a system bus. It should be understood that the specific working processes of the processor, the memory and the image acquisition device can refer to the corresponding working processes of the aforementioned image acquisition device, the processor and the memory in the computer device, and will not be repeated here.

[0125] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the image extraction method of the present application.

[0126] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0127] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0128] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0129] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An image extraction method, characterized in that: include: Generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate; Acquire a second calibration plate image corresponding to the preset calibration plate, where the second calibration plate image includes at least two second feature images; Determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image; A target image corresponding to the preset calibration plate is extracted from the second calibration plate image according to the homography matrix and the first calibration plate image.

2. The image extraction method according to claim 1, characterized in that: Determining a homography matrix according to the first characteristic image and the second characteristic image corresponding to the first characteristic pattern includes: Determine first position information of each of the first feature images in the first calibration plate image to obtain a first feature image position point set; Determine second position information of each second feature image in the second calibration plate image to obtain a second feature image position point set; Based on a preset position transformation calculation function, the homography matrix is ​​determined according to the correspondence between the first feature image position point set, the second feature image position point set, and the first feature pattern and the second feature pattern.

3. The image extraction method according to claim 2, characterized in that: The method further comprises: Calculating image similarity between the first feature image and the second feature image; If the image similarity is greater than or equal to a preset image similarity threshold, the second feature image is used as the second feature image corresponding to the current first feature image.

4. The image extraction method according to any one of claims 1 to 3, characterized in that: The step of extracting the target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image includes: Determine a target image extraction area in the second calibration plate image according to the homography matrix and the first calibration plate image; A target image corresponding to the preset calibration plate is extracted from the second calibration plate image based on the target image extraction area.

5. The image extraction method according to claim 4, characterized in that: The step of determining a target image extraction area according to the homography matrix and the first calibration plate image includes: Based on the homography matrix, performing perspective transformation processing on the first feature image in the first calibration plate image to obtain a third feature image; The target image extraction area is determined in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image.

6. The image extraction method according to claim 5, characterized in that: The step of determining the target image extraction area in the second calibration plate image according to the third feature image, the second feature image and the second calibration plate image comprises: determining a third characteristic image corresponding to each of the second characteristic images; The target image extraction area is determined according to a third feature image corresponding to the second feature image and a position of the second feature image in the second calibration plate image.

7. The image extraction method according to claim 6, characterized in that: The step of determining the target image extraction area according to the second feature image, a third feature image corresponding to the second feature image, and a position of the second feature image in the second calibration plate image includes: Determining the position of the third characteristic image in the second calibration plate image according to the corresponding relationship between the second characteristic image and the third characteristic image and the position of the second characteristic image in the second calibration plate image; The position of the third feature image in the second calibration plate image is determined as the target image extraction area.

8. An image extraction device, characterized in that: The image capturing device comprises: A first image generation module, used to generate a first calibration plate image according to parameter information of a preset calibration plate, wherein the first calibration plate image includes a plurality of first characteristic images, and the first characteristic images are used to indicate characteristic patterns on the preset calibration plate; A second image generation module, used to obtain a second calibration plate image corresponding to the preset calibration plate, wherein the second calibration plate image includes at least two second feature images; a homography matrix determination module, configured to determine a homography matrix according to the first feature image and the second feature image corresponding to the first feature image; An image extraction module is used to extract a target image corresponding to the preset calibration plate from the second calibration plate image according to the homography matrix and the first calibration plate image.

9. A computer device, characterized in that: The computer device is communicatively connected to the image acquisition device, and includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the image extraction method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the image extraction method according to any one of claims 1 to 7 are implemented.