CN116362965A - Image stitching method, device, equipment and storage medium based on linear array camera - Google Patents

Image stitching method, device, equipment and storage medium based on linear array camera Download PDF

Info

Publication number
CN116362965A
CN116362965A CN202111619153.0A CN202111619153A CN116362965A CN 116362965 A CN116362965 A CN 116362965A CN 202111619153 A CN202111619153 A CN 202111619153A CN 116362965 A CN116362965 A CN 116362965A
Authority
CN
China
Prior art keywords
image
type
images
initial
image sequence
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
CN202111619153.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.)
Chengdu Guimu Robot Co ltd
Original Assignee
Chengdu Guimu Robot 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 Chengdu Guimu Robot Co ltd filed Critical Chengdu Guimu Robot Co ltd
Priority to CN202111619153.0A priority Critical patent/CN116362965A/en
Publication of CN116362965A publication Critical patent/CN116362965A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/60Rotation of a whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

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

Abstract

The invention discloses an image stitching method, device, equipment and storage medium based on a linear array camera, wherein the method comprises the following steps: acquiring initial geographic coordinates and termination geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence; splicing the first type images in the initial image sequence to obtain second type images corresponding to the initial image sequence; acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence; according to the initial geographic coordinates and the final geographic coordinates in the initial image sequence, the geographic distance corresponding to the initial image sequence is determined, and the second type images obtained by splicing the first type images in the initial image sequence are adjusted according to the geographic distance, so that the pictures with the same resolution represent the same length information, and the images with the same resolution can be spliced.

Description

Image stitching method, device, equipment and storage medium based on linear array camera
Technical Field
The invention relates to the technical field of image acquisition, in particular to an image stitching method, an image stitching device, image stitching equipment and a storage medium based on a linear array camera.
Background
With the large scale popularity of machine vision, linear cameras are becoming increasingly accepted by vision engineers and end users. Because the linear array camera has the characteristic of high spatial resolution, high-precision measurement can be realized, and the non-contact one-dimensional measurement by using the linear array camera has been widely used. With the need of scanning imaging cost control, the requirement of clear imaging of complex target surfaces and the improvement of the moving positioning precision of a fine moving platform, linear array cameras are widely used for scanning shooting of specified target surfaces.
In the application of road surface detection, a linear array camera is arranged in a road surface detection device, a plurality of bar images are obtained along with the movement of the road surface detection device, the bar images are spliced, and a complete image is output after the required number of spliced images or the length of the spliced images is reached.
The existing linear array camera is triggered by the pulse number of an encoder, the moving distance of the road surface detection device is recorded through the pulse of the encoder, and the road surface detection device cannot move at a constant speed due to the influence of the road environment and the moving speed of the road surface detection device, so that the pulse number of the encoder of the linear array camera is inconsistent with the actual moving distance of the road surface detection device, namely, the lengths of the road surfaces of the image records with the same resolution are different, and the subsequent images with the same resolution cannot be spliced correctly.
Disclosure of Invention
The embodiment of the invention provides an image splicing method, device, equipment and storage medium for a linear array camera, which are used for solving the problem that the length of an image is different from the length of a recorded geography due to the fact that the linear array camera cannot move at a constant speed in the conventional road surface detection device.
In one aspect, an embodiment of the present invention provides an image stitching method based on a line camera, which is applied to a road surface detection robot, and the method includes:
acquiring initial geographic coordinates and final geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are strip images;
splicing the first type images in the initial image sequence to obtain second type images corresponding to the initial image sequence;
and acquiring the image length of the second type of images, and adjusting the second type of images according to the geographic distance and the image length to obtain target images corresponding to the initial image sequence.
In some embodiments of the present invention,
the image length of the second type of image is obtained, the second type of image is adjusted according to the geographic distance and the image length, and the initial image sequence comprises the following steps:
Acquiring the image length of the second type of images;
acquiring an image standard length corresponding to the geographic distance;
determining an adjustment ratio according to the difference between the image length and the image standard length;
and stretching or compressing the second type of images according to the adjustment proportion, and taking the stretched or compressed second type of images as target images corresponding to the initial image sequence.
In some embodiments of the present invention, the stitching each of the first type images in the initial image sequence to obtain a second type image corresponding to the initial image sequence includes:
determining a target course angle according to the statistical characteristics of the course angle of each first type of image, wherein the statistical characteristics comprise at least one of the median, mode, mean and expected value of each course angle;
calculating the difference between the target course angle and each course angle to obtain the rotation angle corresponding to each first type image;
and splicing the first type images according to the rotation angles corresponding to the first type images to obtain second type images.
In some embodiments of the present invention, the obtaining the initial geographic coordinate and the final geographic coordinate corresponding to the initial image sequence, and determining the geographic distance corresponding to the initial image sequence includes:
Acquiring first acquisition time and last acquisition time corresponding to a first type image in an initial image sequence;
acquiring a starting geographic coordinate corresponding to the first acquisition time and acquiring a terminating geographic coordinate corresponding to the last acquisition time according to a preset address list;
and calculating the distance between the initial geographic coordinate and the final geographic coordinate to obtain the geographic distance corresponding to the initial image sequence.
In some embodiments of the present invention, the acquiring a first acquisition time and a last acquisition time corresponding to a first type of image in the initial image sequence includes:
acquiring a global coding range corresponding to an initial image sequence, and acquiring a start code and a stop code corresponding to the global coding range;
acquiring first acquisition time corresponding to the initial code in a preset image list, and acquiring last acquisition time corresponding to the final code in the preset image list.
In some embodiments of the present invention, before the step of obtaining the start geographic coordinate and the end geographic coordinate corresponding to the initial image sequence and determining the geographic distance corresponding to the initial image sequence, the method includes:
acquiring the moving speed of a road surface detection robot, acquiring a first type of image according to the moving speed, distributing codes corresponding to the first type of image, and storing the acquisition time of the first type of image and the codes corresponding to the acquisition time into a preset image list;
If the number of the first type images in the preset image list reaches a preset threshold, acquiring each first type image and acquiring a target code corresponding to each first type image;
and associating each first type of image with the corresponding target code to obtain an initial image sequence.
In some embodiments of the present invention, before the step of obtaining the start geographic coordinate and the end geographic coordinate corresponding to the initial image sequence and determining the geographic distance corresponding to the initial image sequence, the method includes:
acquiring a global coding range corresponding to an initial image sequence;
dividing the global coding range into a plurality of local coding ranges according to a preset coding interval;
obtaining local geographic distances corresponding to the local coding ranges, splicing the first type images in the local coding ranges to obtain local second type images, and obtaining local image lengths corresponding to the local second type images;
according to the local geographic distance and the local image length, adjusting each local second type image to obtain an adjustment image corresponding to each local second type image;
and splicing the adjustment images to obtain a target image.
In another aspect, an embodiment of the present invention provides an image stitching apparatus based on a line camera, where the apparatus includes:
the address module is used for acquiring initial geographic coordinates and final geographic coordinates corresponding to an initial image sequence, determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are bar images;
the splicing module is used for splicing the first type images in the initial image sequence to obtain a second type image corresponding to the initial image sequence;
the adjustment module is used for acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
On the other hand, the embodiment of the invention provides an image splicing device based on a linear array camera, which comprises a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to perform the operations in the linear camera-based image stitching method.
In another aspect, an embodiment of the present invention provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the image stitching method based on a line camera.
The method comprises the steps of obtaining initial geographic coordinates and final geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are strip images; splicing the first type images in the initial image sequence to obtain second type images corresponding to the initial image sequence; acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence; according to the initial geographic coordinates and the final geographic coordinates in the initial image sequence, the geographic distance corresponding to the initial image sequence is determined, and the second type images obtained by splicing the first type images in the initial image sequence are adjusted according to the geographic distance, so that the pictures with the same resolution represent the same length information, and the images with the same resolution can be spliced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an embodiment of an image stitching method based on a line camera according to an embodiment of the present invention;
FIG. 2 is a schematic representation of an initial image sequence provided by an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an embodiment of image stitching in a linear camera-based image stitching method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an embodiment of adjusting an initial image according to the image stitching method based on a line camera according to the present invention;
FIG. 5 is a schematic flow chart of an embodiment of adjusting images in a linear camera based image stitching method according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of an embodiment of initial image acquisition in a linear camera based image stitching method according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating an embodiment of determining a geographic distance in a linear camera based image stitching method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an embodiment of an image stitching device based on a line camera according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an embodiment of an image stitching device based on a line camera according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides an image stitching method, device, equipment and storage medium based on a linear array camera. According to the embodiment of the image stitching method based on the line camera provided by the embodiment of the present invention, it should be noted that, the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer executable instructions, and although a logic sequence is shown in the flowchart shown, in some cases, the steps described or shown may be executed in an execution sequence different from that herein.
In some embodiments of the present invention, the image stitching method based on the line camera may be applied to at least one of a computer device and a terminal device, where the computer device may be an independent server, or may be a server network or a server cluster formed by servers, for example, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server formed by a plurality of servers. Wherein the Cloud server is composed of a large number of computers or web servers based on Cloud Computing (Cloud Computing). The terminal equipment comprises, but is not limited to, a smart phone, a tablet personal computer and a PC (personal computer) terminal. In some embodiments of the present invention, when the image stitching method based on the line camera is applied to the computer device and the terminal device, the communication between the terminal device and the computer device may be implemented by any communication method, where the communication method includes, but is not limited to, mobile communication based on the third generation partnership project (3rd Generation Partnership Project,3GPP), long term evolution (Long Term Evolution, LTE), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wiMAX), or computer network communication based on the TCP/IP protocol family (TCP/IP Protocol Suite, TCP/IP), user datagram protocol (User Datagram Protocol, UDP), and the like. In some embodiments of the present invention, the image stitching method based on the line camera may also be applied to a detection device, such as a road surface detection robot, a tunnel detection robot, or the like. The embodiment of the invention is illustrated by taking an example that the image stitching method based on the linear array camera is also applied to a road surface detection robot, as shown in fig. 1, fig. 1 is a schematic flow diagram of one embodiment of the image stitching method based on the linear array camera, and the image stitching method based on the linear array camera comprises steps 101 to 103:
Step 101, acquiring a start geographic coordinate and a stop geographic coordinate corresponding to an initial image sequence, and determining a geographic distance corresponding to the initial image sequence.
The initial image sequence includes a plurality of first type images, which in some embodiments of the invention refer to images in one-dimensional space, i.e., bar images. As shown in fig. 2, fig. 2 (a) is a schematic diagram of an initial image sequence provided by an embodiment of the present invention, where the initial image sequence is a group of ordered first type images arranged according to an acquisition time sequence, where N is the number of images of the first type in the initial image sequence, for example, N may be 500, and in some embodiments of the present invention, the number of images N in the initial image sequence may be set according to an actual application scenario of an image stitching method based on a line camera.
In some embodiments of the present invention, the initial image sequence may be a set of all the images acquired by the road surface detection robot during one road surface detection, as shown in fig. 2 (a), which is understood to be compression or stretching of all the acquired images; in some embodiments of the present invention, the initial image sequence may be a subset of all the images acquired by the road surface detection robot during one road surface detection, as shown in fig. 2 (b), and dividing all the acquired images into 2 subsets to obtain 2 initial image sequences is understood as performing segmented compression or stretching on all the acquired images.
The initial geographic coordinates refer to geographic coordinates corresponding to the first type of image in the initial image sequence, and the final geographic coordinates refer to geographic coordinates corresponding to the last first type of image in the initial image sequence. In some embodiments of the invention, the geographic coordinates may be acquired from positioning sensors in the road surface detection robot.
The geographic distance is the true distance represented by the initial image sequence, and the true distance refers to the actual moving distance of the road surface detection robot.
In some embodiments of the present invention, when the road surface detection robot travels at a constant speed, the real distance represented by the initial image sequence is consistent with the real length represented by the total image length of the initial image sequence, however, because the road surface detection device is affected by the road environment and the moving speed of the road surface detection device, the real length of the initial image sequence acquired by the line camera is inconsistent with the geographic distance corresponding to the initial image sequence, and therefore, each initial image in the initial image sequence can be stretched or compressed according to the difference between the real length and the geographic distance, so that the real length of the initial image sequence is identical to the geographic distance.
Step 102, stitching the first type of images in the initial image sequence to obtain the second type of images corresponding to the initial image sequence.
The second type image refers to any one of a two-dimensional space plane image, a three-dimensional space three-dimensional image and a depth image which are obtained by splicing a plurality of first type images. In some embodiments of the present invention, all of the first type images in the initial image sequence may be stitched to obtain the second type image.
In some embodiments of the present invention, when the first type of images are stitched, a target heading angle of the first type of images is obtained as a rotation direction of the first type of images, and the first type of images are stitched. The course angle refers to an included angle between a projection of a longitudinal axis of the road surface detection robot on a horizontal plane and a geographic meridian, and in some embodiments of the invention, the angle range of the course angle is (-180 degrees, 180 degrees). Specifically, as shown in fig. 3, fig. 3 is a schematic flow chart of an embodiment of image stitching in the image stitching method based on a line camera according to the embodiment of the present invention, where the image stitching method includes steps 301 to 303:
step 301, determining a target course angle according to the statistical characteristics of the course angles of the first type images.
The statistical features include at least one of a median, a mode, a mean, and an expected value of each heading angle.
In some embodiments of the present invention, a heading angle corresponding to a first type of image at a center position in the initial image sequence may also be used as a heading angle, where the center position refers to a sequence number or an acquisition time corresponding to the first type of image being a median of all sequence numbers or all acquisition times in the initial image sequence.
And 302, calculating the difference between the target course angle and each course angle to obtain the rotation angle corresponding to each first type image.
Wherein the rotation angle may be either a clockwise rotation angle or a counterclockwise rotation angle.
In some embodiments of the present invention, the difference between the target heading angle and each heading angle may be used as the offset corresponding to each adjustment image.
And step 303, splicing the images of the first type according to the rotation angles corresponding to the images of the first type to obtain the images of the second type.
In some embodiments of the present invention, step 303 comprises: and rotating the first type images according to the corresponding rotation angles of the first type images, performing image processing such as image enhancement and image denoising on the rotated first type images, and splicing the processed first type images to obtain second type images. In some embodiments of the present invention, the image enhancement may be contrast enhancement, brightness enhancement, sharpness enhancement, gray scale equalization, etc., and the image denoising may be image denoising, image defogging, etc.
And 103, acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
Wherein the target image is a second type of image after the image length is adjusted.
In some embodiments of the invention, the adjustment includes compressing the length of the image or stretching the length of the image.
In some embodiments of the invention, the target image may be a second type of image after compressing the length of the image or stretching the length of the image.
According to the embodiment of the invention, the geographic distance corresponding to the initial image sequence is determined according to the initial geographic coordinate and the final geographic coordinate in the initial image sequence, and the second type images obtained by splicing the first type images in the initial image sequence are adjusted through the geographic distance, so that the pictures with the same resolution represent the same length information, the second type images with the same resolution can be spliced, and the real width of the road surface disease can be accurately determined according to the output images.
In some embodiments of the present invention, an image standard length may be determined according to a geographic distance, a difference between a target length and an image length of a second type image may be calculated, and the second type image obtained by stitching each first type image in an initial image sequence is stretched or compressed according to the difference, as shown in fig. 4, specifically, fig. 4 is a schematic flow diagram of an embodiment of adjusting the second type image according to the image stitching method based on a line camera provided by the embodiment of the present invention, where the method for adjusting the second type image includes steps 401 to 404:
Step 401, acquiring an image length of the second type of image.
In some embodiments of the invention, an image width value or an image length value of the second type of image may be obtained as the image length of the initial image sequence.
Step 402, obtaining an image standard length corresponding to the geographic distance.
In some embodiments of the present invention, a preset mapping parameter may be obtained, and an image standard length corresponding to the geographic distance may be calculated according to the geographic distance and the preset mapping parameter, for example, the image standard length corresponding to the geographic distance may be obtained by calculating a product between the geographic distance and the preset mapping parameter.
In some embodiments of the present invention, setting parameters of the line camera may also be obtained, and the standard image length may be obtained according to the setting parameters and the geographic distance. For example, the standard length of the image is obtained by calculating the product of the geographical distance and the imaging magnification in the line camera.
Step 403, determining the adjustment ratio according to the difference between the image length and the image standard length.
The adjustment ratio may be a compression ratio of the image length or a tension ratio of the image length.
In some embodiments of the present invention, step 403 includes: the adjustment ratio may be determined by subtracting the image standard length from the image length to obtain a difference between the image length and the image standard length, and calculating the difference/total image length by 100%.
And step 404, stretching or compressing the second type of image according to the adjustment proportion, and taking the stretched or compressed second type of image as a target image corresponding to the initial image sequence.
In some embodiments of the present invention, when the adjustment ratio is smaller than 0, the image length is smaller than the image standard length, and the second type of image is stretched to obtain a target image corresponding to the initial image sequence; and if the adjustment ratio is greater than 0, compressing the second type of image to obtain a target image corresponding to the initial image sequence.
In some embodiments of the present invention, a theoretical distance corresponding to the image length may also be obtained, a distance difference between the theoretical distance and the geographic distance may be calculated, an adjustment ratio corresponding to the distance difference may be obtained, and the second type image may be stretched or compressed according to the adjustment ratio, to obtain a target image corresponding to the initial image sequence. The method for obtaining the theoretical distance corresponding to the image length is similar to the method for calculating the real distance of the initial image sequence in step 102, and will not be described herein.
According to the embodiment of the invention, the standard length of the image is determined according to the geographic distance, the difference between the target length and the image length of the second type of image is calculated, the second type of image is stretched or compressed according to the difference, a convenient adjustment proportion determination method is provided, and the second type of image is stretched or compressed by adjusting the proportion, so that the images with the same resolution represent the same length information.
In some embodiments of the present invention, in order to improve the accuracy of a target image, the image length is adjusted in a segmented manner, as shown in fig. 5, and fig. 5 is a schematic flow chart of an embodiment of an image segmentation method based on a line camera according to the embodiment of the present invention, where the method for adjusting an image in a segmented manner includes steps 501 to 505:
step 501, a global coding range corresponding to the initial image sequence is obtained.
The code is used to record the acquisition sequence of each initial image, and in some embodiments of the present invention the code may be a serial number, for example, the code corresponding to the first type of image acquired is set to 01. In some embodiments of the present invention, in the initial image sequence acquisition, each time a first type of image is acquired, the current maximum code in the preset image list is acquired, the current maximum code +1 is used as the code of the first type of image, and the code is written into the preset image list after being correlated with the acquisition time of the first type of image. The preset image list is used for storing the acquisition time of each first type image and the codes of each first type image in the image acquisition process of the road surface detection robot.
In some embodiments of the present invention, the coding range refers to a coding range formed by a minimum coding and a maximum coding in a preset image list.
In some embodiments of the present invention, whether the initial image sequence is acquired is determined according to the acquisition times, and if the initial image sequence is acquired, a global encoding range corresponding to the initial image sequence is acquired. In some embodiments of the present invention, the number of acquisitions may be determined according to a minimum code and a maximum code in a preset image list, for example, a difference between the minimum code and the maximum code is calculated, and the difference +1 is taken as the number of acquisitions.
In some embodiments of the present invention, the recorded acquisition times may also be read, specifically, when the road surface detection robot invokes the line-array camera to perform road surface shooting, the acquisition times are set to 1 each time the line-array camera starts shooting the first type of image, and thereafter, each time the line-array camera shoots a first type of image, the acquisition times are +1, the recorded acquisition times are compared with the preset acquisition times, if the recorded acquisition times reach the preset acquisition times, the global coding range corresponding to the initial image sequence is obtained, and the recorded acquisition times are set to 0; if the recorded acquisition times do not reach the preset acquisition times, continuing to acquire the image through the linear array camera, and continuing to record the acquisition times.
Step 502, dividing the global coding range into a plurality of local coding ranges according to the preset coding interval.
The preset coding interval is used for indicating the corresponding number of each segment of images in the segmented adjustment image, for example, when the preset coding interval is 10 and the global coding range is 1-500, the global coding range is divided into 50 local coding ranges according to the sequence from big to small or from small to big, and the number of the first type of images in each local coding range is 10; when the preset coding interval is 10, geographic coordinates corresponding to the minimum coding and geographic coordinates corresponding to the maximum coding in each 10 codes in the global coding range are obtained, local geographic distances corresponding to the 10 codes are obtained, the 10 first type images are spliced to obtain local second type images, the image length of the local second type images is obtained, and the image length of each local second type image is stretched or compressed according to the local geographic distances to obtain an adjustment image corresponding to each local second type image. It should be noted that, the preset encoding interval is not limited in the embodiment of the present invention, and may be adjusted according to the actual application scenario of the image stitching method based on the line camera.
Step 503, obtaining local geographic distances corresponding to each local coding range, splicing each first type image in each local coding range to obtain a local second type image, and obtaining local image lengths corresponding to each local second type image.
In some embodiments of the present invention, step 503 includes: acquiring the minimum code and the maximum code in each local code range, acquiring the acquisition time corresponding to the minimum code, acquiring the geographic coordinate corresponding to the acquisition time, acquiring the acquisition time corresponding to the maximum code in each local code range, acquiring the geographic coordinate corresponding to the acquisition time, and calculating the difference between the two geographic coordinates to be used as the local geographic distance corresponding to each local code range; and acquiring first-class images corresponding to the codes in each local coding range, splicing the first-class images according to the image splicing method described in the steps 301-303 to obtain local second-class images, and acquiring theoretical distances corresponding to the image lengths according to the image lengths of the local second-class images.
And step 504, adjusting each local second type image according to the local geographic distance and the local image length to obtain an adjustment image corresponding to each local second type image.
In some embodiments of the present invention, the method for obtaining the local adjustment image in step 503 is similar to the method for obtaining the target image described in steps 403 to 404, and will not be repeated here.
In some embodiments of the present invention, the local second-class images spliced by the first-class images corresponding to the local coding range may be stretched or compressed according to the local geographic distance and the local image length, so as to obtain the adjustment images corresponding to the local second-class images.
Step 505, stitching each adjustment image to obtain a target image.
In the embodiment of the invention, after the linear array camera finishes shooting once, a plurality of local coding ranges are divided, local second-class images obtained by splicing first-class images corresponding to codes in each local coding range are stretched or compressed to obtain adjustment images corresponding to each local second-class image, and each adjustment image is spliced to obtain a target image, so that the acquired initial image sequence is subjected to sectional adjustment, and the accuracy of the target image is improved.
In some embodiments of the present invention, in initial image acquisition, encoding and distributing are performed on each initial image according to the acquisition time of the initial image, as shown in fig. 6, fig. 6 is a schematic flow chart of an embodiment of initial image acquisition in the linear camera-based image stitching method provided in the embodiment of the present invention, where the method for acquiring the initial image includes steps 601 to 603:
Step 601, acquiring the moving speed of the road surface detection robot, acquiring a first type of image according to the moving speed, distributing codes corresponding to the first type of image, and storing the acquisition time of the first type of image and the codes corresponding to the acquisition time into a preset image list.
In some embodiments of the present invention, the movement speed of the road surface detection robot may be obtained according to a sensor disposed on the road surface detection robot, an encoder disposed on the road surface detection robot generates a pulse according to the movement speed, a line camera disposed on the road surface detection robot triggers according to the pulse, a first type image is collected, a code corresponding to the first type image is allocated, the collection time of the first type image and the code corresponding to the collection time are stored in a preset image list, and a serial number of the pulse corresponding to the line camera disposed on the road surface detection robot is triggered as the code corresponding to the collected first type image.
Step 602, if a first type of image in a preset image list reaches a preset threshold, acquiring each first type of image, and acquiring a target code corresponding to each first type of image.
And step 603, associating each first type of image with the corresponding target code to obtain an initial image sequence.
In some embodiments of the present invention, the number of the first type of images in the preset image list may be further obtained, and if the number of the first type of images does not reach the preset threshold, the initial images are spliced according to the splicing method shown in steps 301 to 303 to obtain a spliced image; continuing to acquire each new first type image according to the first type image acquisition steps of the steps 601-603, and splicing each new first type image according to the splicing method shown in the steps 301-303 to acquire a new spliced image; if an image acquisition end instruction is received, combining all spliced images to obtain an initial image sequence, and transmitting the initial image sequence, a preset image list and a preset address list corresponding to all spliced images to computer equipment.
In some embodiments of the present invention, a geographic distance corresponding to an initial image sequence may be obtained according to the initial image sequence, a preset image list and a preset address list, specifically as shown in fig. 7, fig. 7 is a flow intention of an embodiment of determining the geographic distance in the image stitching method based on a line camera provided in the embodiment of the present invention, where the method for determining the geographic distance includes steps 701 to 703:
Step 701, acquiring a first acquisition time and a last acquisition time corresponding to a first type image in an initial image sequence.
The first acquisition time is used for indicating the acquisition time of a first image of the first type in the initial image sequence, and the last acquisition time is used for indicating the acquisition time of a last image of the first type in the initial image sequence.
In some embodiments of the present invention, step 701 comprises: and acquiring a first acquisition time corresponding to the initial code and a last acquisition time corresponding to the end code according to the initial code and the end code corresponding to the initial image sequence. Specifically, the method comprises the steps a 1-a 2:
step a1, obtaining a global coding range corresponding to an initial image sequence, and obtaining a start code and a stop code corresponding to the global coding range.
Wherein, the start code refers to the minimum code of the global code range, and the end code refers to the maximum code of the global code range.
Step a2, acquiring first acquisition time corresponding to a start code in a preset image list, and acquiring last acquisition time corresponding to a stop code in the preset image list.
Step 702, obtaining a start geographic coordinate corresponding to a first acquisition time and a stop geographic coordinate corresponding to a last acquisition time according to a preset address list.
In step 703, the distance between the initial geographic coordinate and the final geographic coordinate is calculated, so as to obtain the geographic distance corresponding to the initial image sequence.
According to the embodiment of the invention, according to an initial image sequence, a preset image list and a preset address list, initial geographic coordinates corresponding to a first type image shot by a linear array camera are obtained, final geographic coordinates corresponding to a last type image shot are obtained, according to the difference between the initial geographic coordinates and the final geographic coordinates, geographic distances corresponding to the initial image sequence are obtained, and the real distances represented by spliced images corresponding to the initial image sequence output by the linear array camera are determined.
In order to better implement the image stitching method based on the line camera provided by the embodiment of the present invention, an image stitching device based on the line camera is provided on the basis of the image stitching method based on the line camera, as shown in fig. 8, fig. 8 is a schematic structural diagram of an embodiment of the image stitching device based on the line camera provided by the embodiment of the present invention, where the image stitching device based on the line camera includes:
the address module 801 is configured to obtain an initial geographic coordinate and a final geographic coordinate corresponding to an initial image sequence, determine a geographic distance corresponding to the initial image sequence, where the initial image sequence includes a plurality of first type images, and the first type images are strip images;
A stitching module 802, configured to stitch each first type of image in the initial image sequence to obtain a second type of image corresponding to the initial image sequence;
the adjusting module 803 is configured to obtain an image length of the second type of image, and adjust the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
In some embodiments of the present invention, the adjusting module 803 is further configured to obtain an image length of the second type of image; acquiring an image standard length corresponding to the geographic distance; determining an adjustment proportion according to the difference between the image length and the image standard length; and stretching or compressing the second type of images according to the adjustment proportion, and taking the stretched or compressed second type of images as target images corresponding to the initial image sequence.
In some embodiments of the present invention, the stitching module 802 is further configured to determine the target heading angle according to a statistical feature of the heading angle of each first-class image, where the statistical feature includes at least one of a median, a mode, a mean, and an expected value of each heading angle; calculating the difference between the target course angle and each course angle to obtain the corresponding rotation angle of each first type image; and splicing the first type images according to the rotation angles corresponding to the first type images to obtain second type images.
In some embodiments of the present invention, address module 801 includes:
the time unit is used for acquiring first acquisition time and last acquisition time corresponding to the first type of images in the initial image sequence;
the geographic coordinate unit is used for acquiring initial geographic coordinates corresponding to the first acquisition time and terminal geographic coordinates corresponding to the last acquisition time according to a preset address list;
and the distance calculation unit is used for calculating the distance between the initial geographic coordinate and the final geographic coordinate to obtain the geographic distance corresponding to the initial image sequence.
In some embodiments of the present invention, the time unit is further configured to obtain a global encoding range corresponding to the initial image sequence, and obtain a start encoding and a stop encoding corresponding to the global encoding range; acquiring first acquisition time corresponding to a start code in a preset image list, and acquiring last acquisition time corresponding to a stop code in the preset image list.
In some embodiments of the present invention, the image stitching device based on a line camera further includes:
the acquisition module 804 is configured to acquire a moving speed of the road surface detection robot, acquire a first type of image according to the moving speed, allocate a code corresponding to the first type of image, and store an acquisition time of the first type of image and the code corresponding to the acquisition time into a preset image list; if the number of the first type images in the preset image list reaches a preset threshold, acquiring each first type image and acquiring a target code corresponding to each first type image; and associating each first type of image with a corresponding target code to obtain an initial image sequence.
In some embodiments of the present invention, the image stitching device based on a line camera further includes:
the segment adjustment module 805 is configured to obtain a global encoding range corresponding to the initial image sequence; dividing the global coding range into a plurality of local coding ranges according to a preset coding interval; obtaining local geographic distances corresponding to the local coding ranges, splicing the first type images in the local coding ranges to obtain local second type images, and obtaining local image lengths corresponding to the local second type images; according to the local geographic distance and the local image length, adjusting each local second type image to obtain an adjustment image corresponding to each local second type image; and splicing the adjustment images to obtain a target image.
According to the embodiment of the invention, the geographic distance corresponding to the initial image sequence is determined according to the initial geographic coordinate and the final geographic coordinate in the initial image sequence, and the second type images obtained by splicing the first type images in the initial image sequence are adjusted according to the geographic distance, so that the images with the same resolution represent the same length information, and the images with the same resolution can be spliced.
The line camera based image stitching device may include one or more processing cores processor 901, one or more computer readable storage medium memories 902, a power supply 903, and an input unit 904. It will be appreciated by those skilled in the art that the line camera based image stitching device structure illustrated in fig. 9 does not constitute a limitation of the line camera based image stitching device, and may include more or fewer components than illustrated, or may combine certain components, or may be a different arrangement of components. Wherein:
The processor 901 is a control center of the line camera-based image stitching device, connects respective parts of the entire line camera-based image stitching device using various interfaces and lines, and performs various functions and processes data of the line camera-based image stitching device by running or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the line camera-based image stitching device. Optionally, processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 901.
The memory 902 may be used to store software programs and modules, and the processor 901 performs various functional applications and data processing by executing the software programs and modules stored in the memory 902. The memory 902 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the line camera-based image stitching device, etc. In addition, the memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 902 may also include a memory controller to provide access to the memory 902 by the processor 901.
The image stitching device based on the line camera further comprises a power supply 903 for supplying power to each component, preferably, the power supply 903 may be logically connected to the processor 901 through a power management system, so that functions of managing charging, discharging, power consumption management and the like are achieved through the power management system. The power supply 903 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The line camera based image stitching device may further comprise an input unit 904, which input unit 904 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the line camera-based image stitching device may further include a display unit or the like, and will not be described herein. In particular, in this embodiment, the processor 901 in the image stitching device based on the line camera loads executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 runs the application programs stored in the memory 902, so as to implement various functions as follows:
Acquiring initial geographic coordinates and termination geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are strip images;
splicing the first type of images in the initial image sequence to obtain a second type of images corresponding to the initial image sequence;
and acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a storage medium having stored therein a plurality of instructions that can be loaded by a processor to perform the steps in any of the line camera based image stitching methods provided in the embodiments of the present invention. For example, the instructions may perform the steps of:
acquiring initial geographic coordinates and termination geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are strip images;
Splicing the first type of images in the initial image sequence to obtain a second type of images corresponding to the initial image sequence;
and acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium can execute the steps in any image stitching method based on the linear array camera provided by the embodiment of the present invention, so that the beneficial effects that can be achieved by any image stitching method based on the linear array camera provided by the embodiment of the present invention can be achieved, which are detailed in the previous embodiments and are not described herein.
The image stitching method, device, equipment and storage medium based on the linear array camera provided by the embodiment of the invention are described in detail, and specific examples are applied to the description of the principle and implementation mode of the invention, and the description of the above embodiment is only used for helping to understand the method and core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (10)

1. An image stitching method based on a linear array camera is characterized by being applied to a road surface detection robot, and comprises the following steps:
acquiring initial geographic coordinates and final geographic coordinates corresponding to an initial image sequence, and determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are strip images;
splicing the first type images in the initial image sequence to obtain second type images corresponding to the initial image sequence;
and acquiring the image length of the second type of images, and adjusting the second type of images according to the geographic distance and the image length to obtain target images corresponding to the initial image sequence.
2. The method for stitching images based on a line camera according to claim 1, wherein the acquiring the image length of the second type of image, adjusting the second type of image according to the geographic distance and the image length, and obtaining the initial image sequence corresponds to the initial image sequence includes:
acquiring the image length of the second type of images;
acquiring an image standard length corresponding to the geographic distance;
determining an adjustment ratio according to the difference between the image length and the image standard length;
And stretching or compressing the second type of images according to the adjustment proportion, and taking the stretched or compressed second type of images as target images corresponding to the initial image sequence.
3. The method for stitching images based on a line camera according to claim 1, wherein the stitching each of the first type of images in the initial image sequence to obtain a second type of image corresponding to the initial image sequence comprises:
determining a target course angle according to the statistical characteristics of the course angle of each first type of image, wherein the statistical characteristics comprise at least one of the median, mode, mean and expected value of each course angle;
calculating the difference between the target course angle and each course angle to obtain the rotation angle corresponding to each first type image;
and splicing the first type images according to the rotation angles corresponding to the first type images to obtain second type images.
4. The method for stitching images based on a line camera according to claim 1, wherein the acquiring the start geographic coordinate and the end geographic coordinate corresponding to the initial image sequence, and determining the geographic distance corresponding to the initial image sequence comprises:
Acquiring first acquisition time and last acquisition time corresponding to a first type image in an initial image sequence;
acquiring a starting geographic coordinate corresponding to the first acquisition time and acquiring a terminating geographic coordinate corresponding to the last acquisition time according to a preset address list;
and calculating the distance between the initial geographic coordinate and the final geographic coordinate to obtain the geographic distance corresponding to the initial image sequence.
5. The method for stitching images based on a line camera as recited in claim 4, wherein the acquiring a first acquisition time and a last acquisition time corresponding to a first type of image in the initial image sequence includes:
acquiring a global coding range corresponding to an initial image sequence, and acquiring a start code and a stop code corresponding to the global coding range;
acquiring first acquisition time corresponding to the initial code in a preset image list, and acquiring last acquisition time corresponding to the final code in the preset image list.
6. The method for stitching images based on a line camera according to any one of claims 1 to 5, wherein before the step of obtaining a start geographic coordinate and a stop geographic coordinate corresponding to an initial image sequence and determining a geographic distance corresponding to the initial image sequence, the method comprises:
Acquiring the moving speed of a road surface detection robot, acquiring a first type of image according to the moving speed, distributing codes corresponding to the first type of image, and storing the acquisition time of the first type of image and the codes corresponding to the acquisition time into a preset image list;
if the number of the first type images in the preset image list reaches a preset threshold, acquiring each first type image and acquiring a target code corresponding to each first type image;
and associating each first type of image with the corresponding target code to obtain an initial image sequence.
7. The method for stitching images based on a line camera according to claim 1, wherein before the step of obtaining a start geographic coordinate and a stop geographic coordinate corresponding to an initial image sequence and determining a geographic distance corresponding to the initial image sequence, the method comprises:
acquiring a global coding range corresponding to an initial image sequence;
dividing the global coding range into a plurality of local coding ranges according to a preset coding interval;
obtaining local geographic distances corresponding to the local coding ranges, splicing the first type images in the local coding ranges to obtain local second type images, and obtaining local image lengths corresponding to the local second type images;
According to the local geographic distance and the local image length, adjusting each local second type image to obtain an adjustment image corresponding to each local second type image;
and splicing the adjustment images to obtain a target image.
8. An image stitching device based on a line camera, the device comprising:
the address module is used for acquiring initial geographic coordinates and final geographic coordinates corresponding to an initial image sequence, determining geographic distances corresponding to the initial image sequence, wherein the initial image sequence comprises a plurality of first type images, and the first type images are bar images;
the splicing module is used for splicing the first type images in the initial image sequence to obtain a second type image corresponding to the initial image sequence;
the adjustment module is used for acquiring the image length of the second type of image, and adjusting the second type of image according to the geographic distance and the image length to obtain a target image corresponding to the initial image sequence.
9. An image stitching device based on a linear array camera is characterized by comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operations in the line camera-based image stitching method according to any one of claims 1 to 7.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the line camera based image stitching method of any one of claims 1 to 7.
CN202111619153.0A 2021-12-27 2021-12-27 Image stitching method, device, equipment and storage medium based on linear array camera Pending CN116362965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111619153.0A CN116362965A (en) 2021-12-27 2021-12-27 Image stitching method, device, equipment and storage medium based on linear array camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111619153.0A CN116362965A (en) 2021-12-27 2021-12-27 Image stitching method, device, equipment and storage medium based on linear array camera

Publications (1)

Publication Number Publication Date
CN116362965A true CN116362965A (en) 2023-06-30

Family

ID=86922440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111619153.0A Pending CN116362965A (en) 2021-12-27 2021-12-27 Image stitching method, device, equipment and storage medium based on linear array camera

Country Status (1)

Country Link
CN (1) CN116362965A (en)

Similar Documents

Publication Publication Date Title
CN107705333B (en) Space positioning method and device based on binocular camera
CN109712193B (en) Method and device for determining field angle of dome camera
US11816810B2 (en) 3-D reconstruction using augmented reality frameworks
CN111815707A (en) Point cloud determining method, point cloud screening device and computer equipment
US20240046557A1 (en) Method, device, and non-transitory computer-readable storage medium for reconstructing a three-dimensional model
CN111325798B (en) Camera model correction method, device, AR implementation equipment and readable storage medium
CN110517209B (en) Data processing method, device, system and computer readable storage medium
CN110648363A (en) Camera posture determining method and device, storage medium and electronic equipment
CN109495733B (en) Three-dimensional image reconstruction method, device and non-transitory computer readable storage medium thereof
TW202103106A (en) Method and electronic device for image depth estimation and storage medium thereof
CN114640833A (en) Projection picture adjusting method and device, electronic equipment and storage medium
WO2021056501A1 (en) Feature point extraction method, movable platform and storage medium
CN115205450A (en) Three-dimensional scanning data processing method, device, system, equipment and medium
CN113034582A (en) Pose optimization device and method, electronic device and computer readable storage medium
CN109859313B (en) 3D point cloud data acquisition method and device, and 3D data generation method and system
CN111179408B (en) Three-dimensional modeling method and equipment
WO2017096859A1 (en) Photo processing method and apparatus
CN111833441A (en) Face three-dimensional reconstruction method and device based on multi-camera system
CN116362965A (en) Image stitching method, device, equipment and storage medium based on linear array camera
CN110691228A (en) Three-dimensional transformation-based depth image noise marking method and device and storage medium
KR102389916B1 (en) Method, apparatus, and device for identifying human body and computer readable storage
CN115861403A (en) Non-contact object volume measurement method and device, electronic equipment and medium
CN116704111A (en) Image processing method and apparatus
US11810282B2 (en) System and method for quantitative image quality assessment for photogrammetry
US9842402B1 (en) Detecting foreground regions in panoramic video frames

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