CN117036175B - Linear array image splicing method, device, medium and equipment - Google Patents

Linear array image splicing method, device, medium and equipment Download PDF

Info

Publication number
CN117036175B
CN117036175B CN202311293173.2A CN202311293173A CN117036175B CN 117036175 B CN117036175 B CN 117036175B CN 202311293173 A CN202311293173 A CN 202311293173A CN 117036175 B CN117036175 B CN 117036175B
Authority
CN
China
Prior art keywords
line
original
characteristic
sub
lines
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.)
Active
Application number
CN202311293173.2A
Other languages
Chinese (zh)
Other versions
CN117036175A (en
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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311293173.2A priority Critical patent/CN117036175B/en
Publication of CN117036175A publication Critical patent/CN117036175A/en
Application granted granted Critical
Publication of CN117036175B publication Critical patent/CN117036175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)

Abstract

In the linear array image splicing method, device, medium and equipment provided by the invention, the characteristic lines in the original linear array image are identified through the trained characteristic identification model, then the original linear array image is divided into a plurality of subgraphs according to the characteristic lines, each subgraph in the original linear array image adjacent to the reference line array image is adjusted by taking each subgraph in the original linear array image as a reference, the characteristic lines of the adjacent original linear array image are aligned with the characteristic lines of the reference line array image, and then the linear array image is spliced, so that the problem of characteristic dislocation of a special imaging mode of the linear array camera when the multi-linear array image is spliced is solved, and the display quality of the spliced image is ensured.

Description

Linear array image splicing method, device, medium and equipment
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method, an apparatus, a storage medium, and a device for splicing line images.
Background
With the development of camera technology, linear array cameras are widely applied to various fields, such as environmental mapping, apparent detection and the like, due to the characteristics of high-speed and high-precision imaging.
In the actual use process, in order to show the whole detection object, a plurality of pictures are often required to be spliced and combined into a larger composite picture, and at present, a common splicing method is to directly put each line array picture obtained by shooting together by taking a shooting position label as a reference. However, in the process of shooting the linear array image, the linear array camera can generate deformation distortion in the acquired image due to lens distortion, shaking of a moving carrier, uneven trigger pulse and the like, so that some important features in the image are misplaced after splicing. The feature misalignment may not only affect the visual quality of the picture, but may also interfere with subsequent feature recognition and analysis processes.
Therefore, how to handle the dislocation of important features in the process of splicing multiple line-array pictures is a problem to be solved. The specification provides a splicing method of linear array pictures.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a storage medium, and a device for splicing line-up images, so as to partially solve the foregoing problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a linear array image splicing method, which comprises the following steps:
determining at least two original line patterns to be spliced;
Inputting the original lineup into a trained feature recognition model, recognizing feature lines in the original lineup, and dividing the original lineup into a plurality of subgraphs according to the feature lines;
determining a datum line array diagram from the original line array diagrams, adjusting each sub-diagram in the original line array diagram adjacent to the datum line array diagram by taking each sub-diagram of the datum line array diagram as a reference, enabling characteristic lines of the adjacent original line array diagrams to be aligned with characteristic lines of the datum line array diagram, and determining the adjusted line array diagram;
and splicing the adjusted linear array diagram and the reference linear array diagram, and determining a spliced picture.
Optionally, inputting the original lineup into a feature recognition model after training, and recognizing feature lines in the original lineup, which specifically includes:
inputting the original lineup into a feature recognition model after training, and determining an image area corresponding to a feature line in the original lineup output by the feature recognition model;
the line segments of the left line and the right line of the original line array diagram in the image area determine the lower end point of the line segments;
and determining characteristic lines according to the connecting lines between the lower endpoints.
Optionally, dividing the original lineup into a plurality of subgraphs according to the feature line, including:
determining necessary characteristic lines from all characteristic lines of the original lineup through a preset filter;
and dividing the original lineup into a plurality of subgraphs according to the necessary characteristic lines.
Optionally, before dividing the original lineup into a plurality of subgraphs according to the feature line, the method further includes:
when the number of the characteristic lines of each original line pattern is inconsistent, counting the number of the characteristic lines of each original line pattern;
dividing the original line graphs with the same number of the characteristic lines into a group according to the number of the characteristic lines;
determining the group with the largest number of the original lineup graphs from each group, taking the original lineup graphs which are not the standard group as the standard group, and taking the original lineup graphs which are not the standard group as lineup graphs to be adjusted;
and adjusting characteristic lines in the line patterns to be adjusted according to each line pattern in the standard group, so that the number of the characteristic lines of the line patterns to be adjusted after adjustment is consistent with the number of the characteristic lines of the original line patterns in the standard group.
Optionally, according to each line pattern in the standard group, adjusting the characteristic lines of each line pattern to be adjusted so that the number of the characteristic lines of all line patterns to be adjusted is consistent with that of the characteristic lines of the line patterns in the standard group, including:
Determining the coordinates of the left end point of each characteristic line end point in each original line diagram according to each original line diagram in the standard group;
for each original lineup, marking each characteristic line in the original lineup from bottom to top;
determining the characteristic lines with the same reference numbers as the same group of characteristic lines, and determining the average coordinate value of the left end points of the same group of characteristic lines according to the coordinates of the left end points of the same group of characteristic lines in the standard group;
from bottom to top, according to the number from small to large, for each characteristic line of the line graph to be adjusted, judging whether the left end point of the characteristic line is within a preset range of the average coordinate value of the left end points of the same group of characteristic lines in sequence, and if not, adjusting the characteristic line; if the characteristic line is within the preset range, reserving the characteristic line;
and sequentially adjusting each characteristic line to enable the quantity of the characteristic lines of each line pattern to be adjusted to be the same as that of the characteristic lines of the line patterns in the standard group.
Optionally, the adjusting the characteristic line specifically includes:
if the difference between the left end point coordinate of the characteristic line and the average coordinate value of the corresponding left end point is larger than a threshold value, determining that the characteristic line of the line drawing to be adjusted is lost, supplementing the characteristic line at the corresponding position, and adjusting all subsequent characteristic line marks which are not judged according to the newly added characteristic line;
If the difference between the coordinate values of the left end points of the characteristic line and the last characteristic line is smaller than a threshold value, determining that the characteristic line is redundant, deleting the characteristic line, and adjusting all subsequent characteristic line marks which are not judged according to the deleted characteristic line;
optionally, determining a reference line pattern from the original line patterns, adjusting each sub-pattern in the original line patterns adjacent to the reference line pattern based on each sub-pattern of the reference line pattern, so that characteristic lines of the adjacent original line patterns are aligned with characteristic lines of the reference line patterns, and determining the adjusted line pattern specifically includes:
determining a reference line pattern from the original line pattern, taking a sub-pattern in the reference line pattern as a reference sub-pattern, and determining a sub-pattern to be processed adjacent to the reference sub-pattern in the original line pattern adjacent to the reference line pattern according to the position of the reference sub-pattern in the reference line pattern;
adjusting the sub-graph to be processed according to the reference sub-graph to align the characteristic lines of the adjacent original line graphs with the characteristic lines of the reference line graphs;
and adjusting the original line patterns adjacent to the reference line patterns by taking the adjacent original line patterns as the reference line patterns, aligning the characteristic lines of all the original line patterns, and determining the adjusted line patterns.
The specification provides a linear array picture splicing apparatus, the apparatus is applied to linear array picture splicing, includes: the receiving module is used for determining at least two original line graphs to be spliced;
the subgraph segmentation module inputs the original lineup into a trained feature recognition model, recognizes feature lines in the original lineup, and segments the original lineup into a plurality of subgraphs according to the feature lines;
the adjustment module is used for determining a datum line array chart from the original line array charts, adjusting each sub chart in the original line array charts adjacent to the datum line array chart by taking each sub chart of the datum line array chart as a reference, enabling characteristic lines of the adjacent original line array charts to be aligned with characteristic lines of the datum line array charts, and determining the adjusted line array charts;
and the splicing module splices the adjusted linear array diagram and the reference linear array diagram and determines spliced pictures.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the above-described line-up image stitching method.
The present disclosure provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the above-mentioned linear array image stitching method when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the linear array image splicing method provided by the specification, the characteristic lines in the original linear array image are identified through the trained characteristic identification model, the original linear array image is divided into a plurality of sub-images according to the characteristic lines, each sub-image in the original linear array image adjacent to the reference linear array image is adjusted by taking each sub-image in the original linear array image as a reference, the characteristic lines of the adjacent original linear array image are aligned with the characteristic lines of the reference linear array image, and the linear array image is spliced.
According to the method, the linear array image splicing method is characterized in that characteristic lines in the linear array images are identified, the linear array images are divided into sub-images, each sub-image in the linear array image adjacent to the reference line array image is adjusted by taking each sub-image in the linear array image as a reference, the characteristic lines of the adjacent linear array images are aligned with the characteristic lines of the reference line array image, and then the linear array images are spliced, so that the problem of characteristic dislocation when the linear array images are spliced in a special imaging mode of the linear array camera is solved, and the quality of spliced images is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
Fig. 1 is a schematic flow chart of a linear array image splicing method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a process of shooting by a line camera according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a covering and dividing process before multi-line array image stitching provided in the embodiment of the present disclosure;
FIG. 4 is a schematic illustration of a feature misalignment provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a feature line determination result according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a sub-graph segmentation and labeling result provided in an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a linear array image splicing process according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of each adjusted lineup according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a process of capturing a line camera according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of a feature line recognition process by a feature recognition model according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of a linear array image splicing device according to an embodiment of the present disclosure;
fig. 12 is a schematic view of the unmanned device corresponding to fig. 1 provided in the present specification.
Detailed Description
In the actual shooting process of the linear array camera, the linear array camera scans a target through a sensor of the linear array camera, the scanning result of each time is a line, and when the linear array camera scans a preset number of lines, the lines are sequentially combined into a small linear array chart according to the shooting sequence. As shown in fig. 2, fig. 2 is a process of photographing a line camera according to the embodiment of the present disclosure, in which the line camera 200 sequentially photographs a target, outputs one line every time a sensor scans the target, and then the line camera 200 photographs the next line in a direction perpendicular to the line (i.e., a direction indicated by c in fig. 2), and when a predetermined number of lines are photographed in the c direction, the lines are sequentially spliced to obtain a line map.
Because the internal cache of the linear array camera is limited, the preset line number is limited, and therefore, when a large target is actually shot, a proper preset scanning number is set for the linear array camera, and a plurality of continuous non-overlapping small linear array images are output in the longitudinal direction. And sequentially combining a plurality of continuous small pictures in the longitudinal direction to form an original line pattern to be spliced.
The result output by the linear array camera in the actual shooting process is a transversely overlapped original linear array diagram, wherein each original linear array diagram is formed by small linear array diagrams with continuous non-overlapped areas in the longitudinal direction.
However, in the process of shooting the linear array image, the linear array camera can generate deformation distortion on the acquired image due to lens distortion, jitter of a moving carrier, uneven trigger pulse and the like, so that some important features in the original linear array image are misplaced after being spliced. In order to solve the above problems, in the prior art, each small linear array image in the original linear array image is spliced by an area array image splicing method, that is, the small linear array image is longitudinally translated according to the characteristics. However, since the small linear array image has no overlapping part in the longitudinal direction, a blank gap can appear in the spliced image in the longitudinal direction. Therefore, how to handle the dislocation of important features in the process of splicing multiple line-array pictures is a problem to be solved. The specification provides a splicing method of the following linear array pictures.
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present application based on the embodiments herein.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a linear array image splicing method provided in the present specification, which includes the following steps:
s100: and determining at least two original line maps to be spliced.
In one or more embodiments of the present disclosure, the specific apparatus is not limited to performing the linear array image stitching process, for example, a personal computer, a mobile terminal, a server, and the like. However, since the subsequent steps involve operations such as feature recognition and image processing, which are generally performed by the server, the present description will be described later by taking the server to perform the linear array image stitching process as an example. The server may be a single device or may be composed of multiple devices, for example, a distributed server, which is not limited in this specification.
Specifically, in one or more embodiments of the present disclosure, a server obtains each line image output by a line camera to determine a plurality of original line images to be spliced. It should be noted that, when the line-array camera performs full coverage acquisition on a larger target, in order to facilitate shooting of the target, the line-array camera may be mounted on the AGV moving platform, after the shooting is completed, the platform translates and turns to return to the shooting, and the specific moving mode is as shown in fig. 2, so when the acquired original line-array images are spliced into a line-array image, the image is required to be spliced after being processed before being spliced.
Specifically, after shooting n preset lines in the longitudinal direction, the line camera 200 splices the lines in the order of 1-n, and determines a line map. The line camera 200 then translates in a lateral direction and, when translated to the appropriate position, turns around and begins scanning again, determining a second line map. However, as can be seen from fig. 2, if the second line drawing is spliced in the line capturing order, the direction of the obtained line drawing is different from that of the obtained first line drawing. Therefore, when the line camera 200 shoots the line pattern in the moving manner as shown in fig. 2, the acquired original line pattern of the odd-numbered tracks (even-numbered tracks) should be rotated 180 degrees before the line pattern is spliced, and then the subsequent splicing is performed.
For convenience of description, a direction (a direction indicated by d) of a line scanned by the sensor of the line camera 200 is hereinafter referred to as a transverse direction, and a direction (a direction indicated by c) perpendicular to the sensor is hereinafter referred to as a longitudinal direction.
It should be noted that, in the actual shooting process, in order to ensure full coverage acquisition of the detected object, the translation distance of the line camera 200 may be smaller than the field width of the camera, so as to ensure that a part of overlapping area remains between adjacent original line maps.
Therefore, in one or more embodiments of the present disclosure, when performing the stitching of the line images, the server may position a plurality of line images that are stitched vertically on a sufficiently large canvas, and the overlapping area of the next image covers the overlapping area of the previous image and divides the overlapping area into the next image. And obtaining a plurality of original lineup graphs to be spliced, wherein each original lineup graph may have different widths.
As shown in fig. 3, fig. 3 is a cover segmentation process before multi-line array image stitching provided in the embodiment of the present disclosure. The area indicated by g in fig. 3 is an overlapping area between each line image, the overlapping area of the previous line image covers the overlapping area of the next image, and the overlapping area is divided into the previous image (the overlapping area may also have various processing manners, such as respectively taking a weighted average of gray values of corresponding coordinate positions of the adjacent images, etc.). The specific coverage mode is not limited in the present specification, and selection can be made according to the actual shooting content of the line image.
S102: inputting the original lineup into a trained feature recognition model, recognizing feature lines in the original lineup, and dividing the original lineup into a plurality of subgraphs according to the feature lines.
In the process of shooting the linear array image, the linear array camera can generate deformation distortion on the acquired image due to lens distortion, shaking of a moving carrier, uneven trigger pulse and the like, so that some important characteristics in the image are misplaced after splicing. As shown in fig. 4, fig. 4 is an example of feature misalignment provided by an embodiment of the present description. When the linear array camera shoots a crosswalk, the zebra stripes between the linear array pictures are misplaced due to uneven pulse triggering of the encoder or shaking of the linear array camera. In fig. 4, the left image is a top view of an actual road surface, wherein a shadow part is asphalt on the road surface, a white area is a mark line drawn on the road surface, a zebra stripes and a stop line are visible on the road surface, and a dotted line part in the left image represents an area where a linear array camera acquires a linear array image. The intermediate image in fig. 3 is an ideal image of the region of the acquired line image. The right image in fig. 4 is a splicing result of the line images actually acquired by the 6 line cameras, and it can be seen that the zebra stripes between the line images are misplaced due to various reasons.
S102: inputting the original lineup into a trained feature recognition model, recognizing feature lines in the original lineup, and dividing the original lineup into a plurality of subgraphs according to the feature lines.
In order to facilitate the adjustment of the features in the linear array pictures, in one or more embodiments of the present disclosure, the server inputs the original linear array pictures to be spliced into the feature recognition model after training, respectively, to obtain feature lines in the original linear array pictures. The feature recognition model is used for recognizing positions of pixel value jumps in the line image and outputting the recognized positions as feature lines.
The feature line is a virtual line identified by the feature recognition model, and is used for dividing the line graph into a plurality of sub-graphs according to the feature line so as to adjust the line graph to realize alignment. As shown in fig. 5, fig. 5 is a schematic diagram of a feature line provided in an embodiment of the present disclosure. The line graph in fig. 5 is a line graph including zebra stripes, and the pixel values of the asphalt pavement are different from those of the zebra stripes, so that the pixel values at the edges of the zebra stripes in the line graph jump, so that the edges of each zebra stripe are identified as a characteristic line, namely a line segment denoted by r in fig. 5. In the actual line image capturing process, the camera direction cannot be exactly parallel to the reticle, so that the feature line is not necessarily horizontal as shown in fig. 5, and may be oblique.
Because the original line array diagram comprises a plurality of characteristic lines, in order to realize that each characteristic line does not generate dislocation, the server divides the original line array diagram into a plurality of subgraphs according to the characteristic line strokes, and the subgraphs in the original line array diagram are adjusted to realize the splicing of each original line array diagram without the characteristic dislocation. Based on this, in one or more embodiments of the present disclosure, the server divides each original line graph into a plurality of sub-graphs according to the feature lines identified by the model, and for convenience of description of adjustment of each sub-graph in detail later, each divided sub-graph is labeled according to the position of the sub-graph. As shown in fig. 6, fig. 6 is a graph of sub-graph segmentation and labeling results provided in the embodiments of the present disclosure.
Wherein, P1~ Pn represent the marks arranged in the horizontal sequence for each original line graph, then, for each original line graph, according to the vertical mark 1~m, finally, the mark of each sub-graph is determined, that is, the y sub-graph of the sub-graph in the x-th original line graph is represented. Wherein x is more than or equal to 1 and less than or equal to n, y is more than or equal to 1 and less than or equal to m, and x, y, m and n are positive integers.
S104: and determining a datum line array diagram from the original line array diagrams, adjusting each sub-diagram in the original line array diagram by taking each sub-diagram of the datum line array diagram as a reference, aligning characteristic lines among the original line array diagrams, and determining the adjusted line array diagram.
In order to achieve feature-free misalignment stitching of the original lineup graphs, in one or more embodiments of the present disclosure, the server may select one original lineup graph from the original lineup graphs as a baseline lineup graph, and use one subgraph from the baseline lineup graph as a baseline subgraph. And starting with the reference subgraph, sequentially adjusting each subgraph in the original linear charts adjacent to the reference subgraph, and then adjusting subgraphs in other original linear charts according to the adjacent relation. For convenience of description, in this embodiment, a specific splicing method is described by taking a first original horizontal line pattern as a reference line pattern, and determining reference subgraphs according to the longitudinal sequence of the reference line pattern as an example.
Specifically, firstly, the server can determine the labels of all the subgraphs according to the sequence of the subgraphs in the original lineup in the longitudinal direction, and determine the subgraphs with consistent longitudinal labels in different original lineup as the mutually-related subgraphs.
Then, the server can determine an original line pattern adjacent to the reference line pattern, and determine a sub-pattern in the adjacent original line pattern, which is correlated with the reference sub-pattern, as a sub-pattern to be adjusted. For example, when the adjustment is performed for the first time, the first longitudinal sub-graph of the reference line pattern is the reference sub-graph, and then the first longitudinal sub-graph of the original line pattern adjacent to the reference line pattern is the sub-graph to be adjusted.
And then, judging whether the upper characteristic line of the subgraph to be adjusted is aligned according to the position of the upper characteristic line of the reference subgraph.
If the characteristic lines are not aligned, longitudinally moving the adjacent original line patterns to align the upper characteristic line of the sub-graph to be adjusted with the upper characteristic line of the reference sub-graph.
If the upper characteristic lines are aligned, it is necessary to determine whether stretching or compressing is required for the sub-graph to be adjusted. Specifically, the server can determine the position relationship between the lower end characteristic line of the sub-graph to be adjusted and the lower end characteristic line of the reference sub-graph, when the lower end characteristic line of the sub-graph to be adjusted is above the lower end characteristic line of the reference sub-graph, the sub-graph to be adjusted is stretched under the condition that the slope of the characteristic line is unchanged, and other sub-graphs below the sub-graph to be adjusted are translated downwards simultaneously, so that the upper end characteristic line of the next sub-graph of the sub-graph to be adjusted coincides with the lower end characteristic line of the sub-graph to be adjusted.
And for adjusting the subgraph under the condition of ensuring that the slope of the characteristic line is unchanged, specifically, firstly translating the subgraph to be adjusted to enable the endpoint of the characteristic line at the lower end of the subgraph to be adjusted to coincide with the adjacent endpoint of the characteristic line at the lower end of the reference subgraph, and then calculating the new position coordinate of each endpoint on the characteristic line at the lower end of the subgraph to be adjusted from the coincident endpoint according to the slope of the characteristic line at the lower end of the subgraph to be adjusted. And then, calculating the expansion ratio of each column according to the distance change of the intersection point of the column and the upper and lower characteristic lines of each column of pixels of the subgraph to be adjusted, finally calculating the new coordinate of each original pixel of the column according to the expansion ratio, interpolating according to the shifted original pixel value, and calculating the new pixel value of the original pixel position of the column.
The method for adjusting the subgraph under the condition of ensuring the constant slope of the characteristic line is a feasible method provided by the embodiment of the specification, and actually, the subgraph can be adjusted under the condition of ensuring the constant slope of the characteristic line by using convolution and other methods, and the specification does not limit the method, so that the characteristic line slope of the adjusted subgraph is ensured to be constant.
When the lower end characteristic line of the sub-graph to be adjusted is below the upper end characteristic line of the reference sub-graph, the sub-graph to be adjusted is compressed under the condition that the slope of the characteristic line is unchanged, and other sub-graphs below the sub-graph to be adjusted are translated upwards at the same time, so that the upper end characteristic line of the next sub-graph of the sub-graph to be adjusted is overlapped with the lower end characteristic line of the sub-graph to be adjusted.
When the lower end characteristic line of the sub-graph to be adjusted is aligned with the lower end characteristic line of the reference sub-graph, determining the next sub-graph of the reference sub-graph according to the label sequence as the reference sub-graph, re-determining the sub-graph to be adjusted, and repeating the adjustment process until all the characteristic lines of the original line graph adjacent to the reference sub-graph are aligned with all the characteristic lines of the reference sub-graph.
And obtaining an adjusted original linear array diagram, taking the adjusted original linear array diagram as a reference linear array diagram, and adjusting the original linear array diagram adjacent to the adjusted original linear array diagram according to the sequence of the marks until all the original linear array diagrams are adjusted.
It should be noted that, since each original line pattern (including the selected reference line pattern) includes only one feature line in the first-to-last sub-pattern (i.e., the lower (upper) feature line of the sub-pattern). Therefore, when the sub-graph to be adjusted is the first sub-graph in the longitudinal direction of the original line graph, the lower end characteristic line of the sub-graph is aligned with the lower end characteristic line of the reference sub-graph, and the sub-graph can be considered to be adjusted, namely, the alignment of the characteristic lines can be realized by moving the original line graph without stretching or compressing the sub-graph to be adjusted.
More specifically, as shown in fig. 7, fig. 7 is a flow of splicing the line-up image provided in the embodiment of the present disclosure. The reference line pattern is P1, the reference sub-pattern is sub-pattern P (1, 1), the original line pattern P2 is moved upwards according to the lower end characteristic line in the sub-pattern P (1, 1), the lower end characteristic line in the sub-pattern P (2, 1) is aligned with the lower end characteristic line in the sub-pattern P (1, 1), the sub-pattern P (2, 2) is adjusted again, the left end point of the lower end characteristic line in the sub-pattern P (2, 2) is aligned with the right end point of the lower end characteristic line in the sub-pattern P (1, 2), and other sub-patterns in the original line pattern P2 are translated upwards or downwards along with the stretching or compressing of the sub-pattern P (2, 2). And then the subgraphs P (1, 3) are taken as reference to adjust the subgraphs P (2, 3), and each subgraph of the original linear array map P2 is sequentially adjusted to obtain an adjusted linear array map P2. And then, the adjusted linear array map P2 is used as a reference linear array map to adjust the original linear array map P3, and the like, so as to finish the adjustment of each original linear array map and determine each adjusted linear array map.
Fig. 8 is a schematic diagram of each adjusted line graph according to the embodiment of the present disclosure, and each sub-graph is adjusted based on each adjustment method, where the adjustment result is that, as shown in fig. 7, the feature lines of each adjusted line graph are aligned, and there is no feature misalignment.
In one or more embodiments of the present disclosure, the compression or stretching of the sub-graph is performed without affecting the slope of the feature line in the sub-graph. The image stitching method is a method provided by the specification. The stitching method is different according to different selected reference line patterns, different selected reference subgraphs, different stitching methods and other methods are specifically described later in the specification.
S106: and splicing the adjusted linear array diagram and the reference linear array diagram, and determining a spliced picture.
In one or more embodiments of the present disclosure, a server splices the adjusted line maps together to determine a spliced picture. If the spliced picture is irregular in shape, the edges of the spliced picture can be cut to obtain a rectangular spliced picture.
Based on the linear array image splicing method shown in fig. 1, feature lines in an original linear array image are identified through a trained feature identification model, the original linear array image is divided into a plurality of sub-images according to the feature lines, each sub-image in an original linear array image adjacent to the reference linear array image is adjusted by taking each sub-image in the original linear array image as a reference, and the feature lines of the adjacent original linear array image are aligned with the feature lines of the reference linear array image, so that the linear array image is spliced.
According to the method, the linear array image splicing method is characterized in that characteristic lines in the linear array images are identified, the linear array images are divided into sub-images, each sub-image in the linear array image adjacent to the reference line array image is adjusted by taking each sub-image in the linear array image as a reference, the characteristic lines of the adjacent linear array images are aligned with the characteristic lines of the reference line array image, and then the linear array images are spliced, so that the problem of characteristic dislocation when the linear array images are spliced in a special imaging mode of the linear array camera is solved, and the quality of spliced images is ensured.
It should be noted that, when the number of line cameras is enough, that is, the plurality of line cameras shoot in parallel along the longitudinal direction, and the target can be completely shot in the transverse direction, the obtained original line image may not be subjected to rotation processing. As shown in fig. 9, fig. 9 is a view of a line camera according to an embodiment of the present disclosure. I.e. a plurality of line cameras shoot the target in parallel.
Or after a line-array camera shoots an original line-array image, the line-array camera is restored to an initial position, the line-array camera is translated along the line direction, and the shooting process is repeated again to obtain a second original line-array image. And analogically, until the target is completely shot. At this time, the acquired original line drawing does not need to be flipped, but this movement method is not suitable for photographing a large object (photographing area is large).
In step S102, the feature recognition model may obtain a labeling image by manually labeling feature lines in the linear array image according to the captured linear array image, and train the feature recognition model with the goal of reducing the difference between the feature line positions in the model output image and the feature line positions of the labeling image, to obtain a trained feature recognition model.
When the feature recognition model performs feature recognition on the original line drawing, features are recognized according to the pixel value condition in the original line drawing, so that part of the recognized feature lines are misrecognized or useless feature lines.
For example, when the shooting target is a crosswalk as shown in fig. 3, the feature recognition model may recognize a shadow of a red-green lamp post or other object projected on the crosswalk, and output the shadow edge as a feature line. At this time, a filter may be provided to filter out characteristic lines other than the characteristic line representing the edge of the zebra stripes on the crosswalk.
Further, as shown in fig. 10, fig. 10 is a process of identifying feature lines by using a feature identification model according to an embodiment of the present disclosure. When the feature recognition model performs feature recognition on the original lineup, the recognition result may represent an image area where the features in the original lineup are located, that is, a dashed frame in fig. 10. Determining a certain point of the two line segments according to the line segments of the left line and the right line of the original line array diagram in the image area; and determining a characteristic line, namely a line segment denoted by r, according to the connecting line between the two points. The lower end point of the line segment may be the point determined in the line segment, or may be any point on the line segment, or may be determined according to the pixel change of the area of the actual line map, which is not specifically limited in the present specification.
It should be noted that, although the filter is set during feature line recognition, in the actual splicing process, there is a certain probability that the number of feature lines in the original line patterns to be spliced is different, and at this time, the method in step S104 may still cause a large number of misplacement of the spliced image feature lines, so before sub-dividing each original line pattern, if the number of feature lines of each original line pattern is inconsistent, the number of feature lines of each original line pattern is counted. The original line patterns containing the same number of feature lines are divided into a group according to the number of feature lines contained. And determining the group with the largest number of the original lineup from the groups, wherein the group is used as a standard group, and the original lineup which is not the standard group is used as the lineup to be adjusted.
And determining the coordinates of the left end point of each characteristic line end point in each original line diagram according to each original line diagram in the standard group. And referring to each original lineup, marking each characteristic line in the original lineup from bottom to top. Determining the characteristic lines with the same reference numbers as the characteristic lines of the same group, and determining the average coordinate value of the left end points of the characteristic lines of the same group according to the coordinates of the left end points of the characteristic lines of the same group in the standard group;
and judging whether the left end point of each characteristic line of the line graph to be adjusted is within a preset range of the average coordinate value of the left end points of the same group of characteristic lines, and if so, reserving the characteristic line.
If not, when the difference between the left end point coordinate of the characteristic line and the average coordinate value of the corresponding left end point is larger than a threshold value, determining that the characteristic line of the line graph to be adjusted is lost, and supplementing the characteristic line at the corresponding position. According to the newly added characteristic line, adjusting all subsequent characteristic line marks which are not judged;
if the difference between the coordinate values of the left end points of the feature line and the previous feature line is smaller than the threshold value, determining that the feature line is redundant, deleting the feature line, and adjusting all the subsequent feature line labels which are not judged according to the deleted feature line.
And sequentially adjusting each characteristic line to enable the quantity of the characteristic lines of each line pattern to be adjusted to be the same as that of the characteristic lines of the line patterns in the standard group.
In the above method, the average coordinate of the left end point of each feature line is used as a reference for determining whether the feature line is missing or redundant. The average coordinate of the right end point of each feature line may be used as a reference for determining whether the feature line is missing or excessive, that is, the average coordinate of points at any position on each feature line may be used as a reference for determining whether the feature line is missing or excessive, which is not limited in the present specification.
In addition, when the feature line is supplemented, a line segment can be determined as the supplemented feature line according to the average coordinate value of the left end point and the average coordinate value of the right end point of each feature line. Alternatively, the missing feature line at the position can be determined according to the line drawing of the line drawing to be adjusted before the line drawing to be adjusted is input into the filter, and if the missing feature line at the position can not be determined according to the line drawing of the line drawing to be adjusted before the line drawing to be adjusted is input into the filter, the line drawing to be adjusted can be input into the feature recognition model again to determine the missing feature line at the position.
When the number of the feature lines in each original line graph is determined to be the same, step S104 and step S106 are executed again.
In the line pattern stitching method in step S104, the first last sub-image in the longitudinal direction of the line pattern may also be used as the reference sub-image. And then, judging whether the lower characteristic line of the subgraph to be adjusted is aligned according to the position of the lower characteristic line of the reference subgraph.
If the characteristic lines are not aligned, longitudinally moving the adjacent original line patterns to align the lower characteristic line of the sub-graph to be adjusted with the lower characteristic line of the reference sub-graph.
If the lower characteristic lines are aligned, it is necessary to determine whether stretching or compressing the sub-graph to be adjusted is required. Specifically, the server can determine the position relationship between the upper end characteristic line of the sub-graph to be adjusted and the upper end characteristic line of the reference sub-graph, when the upper end characteristic line of the sub-graph to be adjusted is below the upper end characteristic line of the reference sub-graph, the sub-graph to be adjusted is stretched under the condition that the slope of the characteristic line is unchanged, and other sub-graphs above the sub-graph to be adjusted are translated upwards simultaneously, so that the lower end characteristic line of the last sub-graph of the sub-graph to be adjusted coincides with the upper end characteristic line of the sub-graph to be adjusted.
When the upper end characteristic line of the sub-graph to be adjusted is above the upper end characteristic line of the reference sub-graph, the sub-graph to be adjusted is compressed under the condition that the slope of the characteristic line is unchanged, and other sub-graphs above the sub-graph to be adjusted are translated downwards simultaneously, so that the lower end characteristic line of the last sub-graph of the sub-graph to be adjusted coincides with the upper end characteristic line of the sub-graph to be adjusted.
When the upper characteristic line of the sub-graph to be adjusted is aligned with the upper characteristic line of the reference sub-graph, determining the last sub-graph of the reference sub-graph according to the sequence of the marks as the reference sub-graph, re-determining the sub-graph to be adjusted, and repeating the adjustment process until the characteristic lines of all the sub-graphs to be adjusted are aligned with the characteristics of the corresponding reference sub-graph.
And obtaining an adjusted original linear array diagram, taking the adjusted original linear array diagram as a reference linear array diagram, and adjusting the original linear array diagram adjacent to the adjusted original linear array diagram according to the sequence of the marks until all the original linear array diagrams are adjusted.
Further, an original line pattern is randomly selected as a reference line pattern, and a sub-pattern in the reference line pattern is randomly selected as a reference sub-pattern. And then, judging whether the characteristic lines are aligned or not in the two-day characteristic lines of the subgraph to be adjusted according to the positions of the two characteristic lines of the reference subgraph.
If the characteristic lines are not aligned, longitudinally moving the adjacent original line patterns to align the upper characteristic lines of the sub-graph to be adjusted with the upper characteristic lines of the reference sub-graph.
If the upper characteristic lines are aligned, it is necessary to determine whether stretching or compressing is required for the sub-graph to be adjusted. Specifically, the server can determine the position relationship between the lower end characteristic line of the sub-graph to be adjusted and the lower end characteristic line of the reference sub-graph, when the lower end characteristic line of the sub-graph to be adjusted is above the upper end characteristic line of the reference sub-graph, the sub-graph to be adjusted is stretched under the condition that the slope of the characteristic line is unchanged, and other sub-graphs below the sub-graph to be adjusted are translated downwards simultaneously, so that the upper end characteristic line of the next sub-graph of the sub-graph to be adjusted coincides with the lower end characteristic line of the sub-graph to be adjusted.
When the lower end characteristic line of the sub-graph to be adjusted is below the upper end characteristic line of the reference sub-graph, the sub-graph to be adjusted is compressed under the condition that the slope of the characteristic line is unchanged, and other sub-graphs below the sub-graph to be adjusted are translated upwards at the same time, so that the upper end characteristic line of the next sub-graph of the sub-graph to be adjusted is overlapped with the lower end characteristic line of the sub-graph to be adjusted.
If the lower characteristic lines are aligned, it is necessary to determine whether stretching or compressing the sub-graph to be adjusted is required. Specifically, the server may determine a positional relationship between the upper characteristic line of the sub-graph to be adjusted and the upper characteristic line of the reference sub-graph. When the upper characteristic line of the sub-graph to be adjusted is below the upper characteristic line of the reference sub-graph, the sub-graph to be adjusted is stretched under the condition that the slope of the characteristic line is unchanged, and other sub-graphs above the sub-graph to be adjusted are translated upwards simultaneously, so that the upper characteristic line of the last sub-graph of the sub-graph to be adjusted coincides with the upper characteristic line of the sub-graph to be adjusted.
When the upper characteristic line of the sub-graph to be adjusted is above the upper characteristic line of the reference sub-graph, the sub-graph to be adjusted is compressed under the condition that the slope of the characteristic line is unchanged, and other sub-graphs above the sub-graph to be adjusted are translated downwards at the same time, so that the upper characteristic line of the last sub-graph of the sub-graph to be adjusted coincides with the upper characteristic line of the sub-graph to be adjusted.
If the two characteristic lines are aligned, determining the next sub-graph of the reference sub-graph according to the sequence of the reference sub-graph as the reference sub-graph, re-determining the sub-graph to be adjusted, and repeating the adjustment process until the characteristic lines of all the sub-graphs to be adjusted are aligned with the characteristics of the corresponding reference sub-graph.
And obtaining an adjusted original linear array diagram, taking the adjusted original linear array diagram as a reference linear array diagram, and adjusting the original linear array diagram adjacent to the adjusted original linear array diagram according to the sequence of the marks until all the original linear array diagrams are adjusted.
In one or more embodiments of the present disclosure, the selection of the baseline pattern is not limited, so long as the feature lines of other original patterns can be aligned according to the baseline pattern.
Still further, in one or more embodiments of the present disclosure, the server may further determine at most two adjacent original line patterns from the reference line patterns, and determine a plurality of reference subgraphs from each subgraph in the reference line patterns. And determining the subgraphs in the adjacent original linear array graphs corresponding to the reference subgraphs according to the reference subgraphs, and simultaneously adjusting the subgraphs in the original linear array graphs adjacent to the reference subgraphs. In other words, for each reference subgraph in the reference subgraph, determining the subgraph adjacent to the reference subgraph in the original subgraph adjacent to the reference subgraph, translating the subgraph to align the lower characteristic line of the subgraph with the lower characteristic line of the reference subgraph, and judging whether the subgraph needs to be compressed or stretched. At least two adjusted subgraphs are obtained for each adjustment. And (3) in the adjusted linear array diagram, a linear array diagram is re-determined as a reference linear array diagram, and the original linear array diagram adjacent to the linear array diagram is adjusted until all the original linear array diagrams are adjusted.
The above-mentioned method for splicing the linear array image provided by one or more embodiments of the present disclosure is based on the same concept, and the present disclosure further provides a corresponding device for splicing the linear array image, as shown in fig. 11.
Fig. 11 is a schematic diagram of a linear array image splicing device provided in the present specification.
The receiving module 800 determines at least two original lineup graphs to be spliced.
The subgraph segmentation module 801 inputs the original lineup into a feature recognition model after training, recognizes feature lines in the original lineup, and segments the original lineup into a plurality of subgraphs according to the feature lines.
And an adjustment module 802, configured to determine a reference line pattern from the original line patterns, adjust each sub-pattern in the original line patterns adjacent to the reference line pattern based on each sub-pattern of the reference line pattern, align the feature line of the adjacent original line pattern with the feature line of the reference line pattern, and determine the adjusted line pattern.
And a splicing module 803 for splicing the adjusted linear array diagram and the reference linear array diagram to determine a spliced picture.
Optionally, the subgraph segmentation module 801 is specifically configured to input the original lineup into a trained feature recognition model, and recognize feature lines in the original lineup, and specifically includes: and inputting the original lineup into a feature recognition model after training, and determining an image area corresponding to a feature line in the original lineup output by the feature recognition model. And determining the lower endpoint of the line segment according to the line segments of the left line and the right line of the original line array diagram in the image area. And determining characteristic lines according to the connecting lines between the lower endpoints.
Optionally, the sub-graph dividing module 801 is specifically configured to divide the original line graph into a plurality of sub-graphs according to the feature line, and specifically includes: and determining necessary characteristic lines from the characteristic lines of the original lineup through a preset filter. And dividing the original lineup into a plurality of subgraphs according to the necessary characteristic lines.
Optionally, the sub-graph dividing module 801 further includes a feature line adjusting module, which is specifically configured to count the number of feature lines of each original line graph when the number of feature lines of each original line graph is inconsistent. The original line patterns containing the same number of feature lines are divided into a group according to the number of feature lines contained. And determining the group with the largest number of the original lineup from the groups, wherein the group is used as a standard group, and the original lineup which is not the standard group is used as the lineup to be adjusted. And determining the coordinates of the left end point of each characteristic line end point in each original line diagram according to each original line diagram in the standard group.
And referring to each original lineup, marking each characteristic line in the original lineup from bottom to top. And determining the characteristic lines with the same reference numbers as the characteristic lines of the same group, and determining the average coordinate value of the left end points of the characteristic lines of the same group according to the coordinates of the left end points of the characteristic lines of the same group in the standard group. And judging whether the left end point of each characteristic line of the line graph to be adjusted is within a preset range of the average coordinate value of the left end points of the same group of characteristic lines, and if so, reserving the characteristic line.
If not, when the difference between the left end point coordinate of the characteristic line and the average coordinate value of the corresponding left end point is larger than a threshold value, determining that the characteristic line of the line graph to be adjusted is lost, and supplementing the characteristic line at the corresponding position. According to the newly added characteristic line, adjusting all subsequent characteristic line marks which are not judged;
if the difference between the coordinate values of the left end points of the feature line and the previous feature line is smaller than the threshold value, determining that the feature line is redundant, deleting the feature line, and adjusting all the subsequent feature line labels which are not judged according to the deleted feature line.
And sequentially adjusting each characteristic line to enable the quantity of the characteristic lines of each line pattern to be adjusted to be the same as that of the characteristic lines of the line patterns in the standard group.
Optionally, the adjusting module 802 is specifically configured to determine a reference line pattern from the original line patterns, determine, with a sub-pattern in the reference line pattern as a reference sub-pattern, a sub-pattern to be processed adjacent to the reference sub-pattern in the original line patterns adjacent to the reference line pattern according to a position of the reference sub-pattern in the reference line pattern. And adjusting the sub-graph to be processed according to the reference sub-graph to align the characteristic lines of the adjacent original linear array graphs with the characteristic lines of the reference linear array graph. And adjusting the original line patterns adjacent to the reference line patterns by taking the adjacent original line patterns as the reference line patterns, aligning the characteristic lines of all the original line patterns, and determining the adjusted line patterns.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the above-described line-up image stitching method provided in fig. 1.
The present specification also provides a schematic structural diagram of the unmanned device shown in fig. 12. As shown in fig. 12, the unmanned device includes a processor, an internal bus, a network interface, a memory, and a nonvolatile memory, and may include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the linear array image splicing method shown in the figure 1. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present invention.

Claims (9)

1. The linear array picture splicing method is characterized by comprising the following steps of:
determining at least two original line patterns to be spliced;
inputting the original lineup into a trained feature recognition model, recognizing feature lines in the original lineup, and dividing the original lineup into a plurality of subgraphs according to the feature lines;
determining a reference line pattern from the original line pattern, and determining a sub-pattern to be processed adjacent to the reference sub-pattern in the original line pattern adjacent to the reference line pattern according to the position of the reference sub-pattern in the reference line pattern by taking each sub-pattern of the reference line pattern as a reference; adjusting the sub-graph to be processed according to the reference sub-graph to align the characteristic lines of the adjacent original line graphs with the characteristic lines of the reference line graphs; taking the adjacent original line patterns as reference line patterns, adjusting the original line patterns adjacent to the reference line patterns to align characteristic lines of all the original line patterns, and determining the adjusted line patterns;
and splicing the adjusted linear array diagram and the reference linear array diagram, and determining a spliced picture.
2. The method of claim 1, wherein inputting the original lineup into a trained feature recognition model, and recognizing feature lines in the original lineup comprises:
Inputting the original lineup into a feature recognition model after training, and determining an image area corresponding to a feature line in the original lineup output by the feature recognition model;
determining a lower endpoint of a line segment according to the line segments of the left line and the right line of the original line array diagram in the image area;
and determining characteristic lines according to the connecting lines between the lower endpoints.
3. The method of claim 1, wherein dividing the original lineup into a plurality of subgraphs based on the feature lines, specifically comprises:
determining necessary characteristic lines from all characteristic lines of the original lineup through a preset filter;
and dividing the original lineup into a plurality of subgraphs according to the necessary characteristic lines.
4. The method of claim 1, further comprising, prior to dividing the original lineup into a plurality of subgraphs based on the feature lines:
when the number of the characteristic lines of each original line pattern is inconsistent, counting the number of the characteristic lines of each original line pattern;
dividing the original line graphs with the same number of the characteristic lines into a group according to the number of the characteristic lines;
determining the group with the largest number of the original lineup graphs from each group, taking the original lineup graphs which are not the standard group as the standard group, and taking the original lineup graphs which are not the standard group as lineup graphs to be adjusted;
And adjusting characteristic lines in the line patterns to be adjusted according to each line pattern in the standard group, so that the number of the characteristic lines of the line patterns to be adjusted after adjustment is consistent with the number of the characteristic lines of the original line patterns in the standard group.
5. The method of claim 4, wherein adjusting the characteristic lines of the line patterns to be adjusted according to each line pattern in the standard group to make the characteristic lines of all line patterns to be adjusted consistent with the characteristic lines of the line patterns in the standard group, specifically comprises:
determining the coordinates of the left end point of each characteristic line end point in each original line diagram according to each original line diagram in the standard group;
for each original lineup, marking each characteristic line in the original lineup from bottom to top;
determining the characteristic lines with the same reference numbers as the same group of characteristic lines, and determining the average coordinate value of the left end points of the same group of characteristic lines according to the coordinates of the left end points of the same group of characteristic lines in the standard group;
from bottom to top, according to the number from small to large, for each characteristic line of the line graph to be adjusted, judging whether the left end point of the characteristic line is within a preset range of the average coordinate value of the left end points of the same group of characteristic lines in sequence, and if not, adjusting the characteristic line; if the characteristic line is within the preset range, reserving the characteristic line;
And sequentially adjusting each characteristic line to enable the quantity of the characteristic lines of each line pattern to be adjusted to be the same as that of the characteristic lines of the line patterns in the standard group.
6. The method of claim 5, wherein adjusting the feature line comprises:
if the difference between the left end point coordinate of the characteristic line and the average coordinate value of the corresponding left end point is larger than a threshold value, determining that the characteristic line of the line drawing to be adjusted is lost, supplementing the characteristic line at the position of the average coordinate value, and adjusting all subsequent characteristic line marks which are not judged according to the newly added characteristic line;
if the difference between the coordinate values of the left end points of the feature line and the previous feature line is smaller than the threshold value, determining that the feature line is redundant, deleting the feature line, and adjusting all the subsequent feature line labels which are not judged according to the deleted feature line.
7. A linear array picture stitching device, wherein the device is adapted to perform linear array picture stitching, comprising:
the receiving module is used for determining at least two original line graphs to be spliced;
the subgraph segmentation module inputs the original lineup into a trained feature recognition model, recognizes feature lines in the original lineup, and segments the original lineup into a plurality of subgraphs according to the feature lines;
The adjustment module is used for determining a datum line diagram from the original line diagram, taking each sub-diagram of the datum line diagram as a reference, and determining a sub-diagram to be processed adjacent to the reference sub-diagram in the original line diagram adjacent to the datum line diagram according to the position of the reference sub-diagram in the datum line diagram; adjusting the sub-graph to be processed according to the reference sub-graph to align the characteristic lines of the adjacent original line graphs with the characteristic lines of the reference line graphs; taking the adjacent original line patterns as reference line patterns, adjusting the original line patterns adjacent to the reference line patterns to align characteristic lines of all the original line patterns, and determining the adjusted line patterns;
and the splicing module splices the adjusted linear array diagram and the reference linear array diagram and determines spliced pictures.
8. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-6.
9. An unmanned device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of the preceding claims 1-6 when executing the program.
CN202311293173.2A 2023-10-08 2023-10-08 Linear array image splicing method, device, medium and equipment Active CN117036175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311293173.2A CN117036175B (en) 2023-10-08 2023-10-08 Linear array image splicing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311293173.2A CN117036175B (en) 2023-10-08 2023-10-08 Linear array image splicing method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN117036175A CN117036175A (en) 2023-11-10
CN117036175B true CN117036175B (en) 2024-01-09

Family

ID=88645213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311293173.2A Active CN117036175B (en) 2023-10-08 2023-10-08 Linear array image splicing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN117036175B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646381A (en) * 2013-11-22 2014-03-19 西安理工大学 Method for correcting proceeding distortion of linear array CCD
WO2019196542A1 (en) * 2018-04-10 2019-10-17 阿里巴巴集团控股有限公司 Image processing method and apparatus
CN110360947A (en) * 2019-06-24 2019-10-22 广州市奥特创通测控技术有限公司 A kind of vehicle's contour measurement method based on vector image measurement
WO2021254110A1 (en) * 2020-06-19 2021-12-23 京东方科技集团股份有限公司 Image processing method, apparatus and device, and storage medium
CN114299066A (en) * 2022-03-03 2022-04-08 清华大学 Defect detection method and device based on salient feature pre-extraction and image segmentation
CN114332794A (en) * 2021-12-14 2022-04-12 江苏集萃智能光电系统研究所有限公司 Target detection method, system, device and medium for train linear array image
CN114581307A (en) * 2022-03-18 2022-06-03 无锡范特智能科技有限公司 Multi-image stitching method, system, device and medium for target tracking identification
WO2022126870A1 (en) * 2020-12-15 2022-06-23 Vomma (Shanghai) Technology Co., Ltd. Three-dimensional imaging method and method based on light field camera and three-dimensional imaging measuring production line
CN115829843A (en) * 2023-01-09 2023-03-21 深圳思谋信息科技有限公司 Image splicing method and device, computer equipment and storage medium
CN116156342A (en) * 2023-04-04 2023-05-23 合肥埃科光电科技股份有限公司 Multi-linear array image sensor splicing method, linear array image acquisition system, device and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6781618B2 (en) * 2001-08-06 2004-08-24 Mitsubishi Electric Research Laboratories, Inc. Hand-held 3D vision system
US8019180B2 (en) * 2006-10-31 2011-09-13 Hewlett-Packard Development Company, L.P. Constructing arbitrary-plane and multi-arbitrary-plane mosaic composite images from a multi-imager
US7961936B2 (en) * 2007-03-30 2011-06-14 Intel Corporation Non-overlap region based automatic global alignment for ring camera image mosaic

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646381A (en) * 2013-11-22 2014-03-19 西安理工大学 Method for correcting proceeding distortion of linear array CCD
WO2019196542A1 (en) * 2018-04-10 2019-10-17 阿里巴巴集团控股有限公司 Image processing method and apparatus
CN110360947A (en) * 2019-06-24 2019-10-22 广州市奥特创通测控技术有限公司 A kind of vehicle's contour measurement method based on vector image measurement
WO2021254110A1 (en) * 2020-06-19 2021-12-23 京东方科技集团股份有限公司 Image processing method, apparatus and device, and storage medium
WO2022126870A1 (en) * 2020-12-15 2022-06-23 Vomma (Shanghai) Technology Co., Ltd. Three-dimensional imaging method and method based on light field camera and three-dimensional imaging measuring production line
CN114332794A (en) * 2021-12-14 2022-04-12 江苏集萃智能光电系统研究所有限公司 Target detection method, system, device and medium for train linear array image
CN114299066A (en) * 2022-03-03 2022-04-08 清华大学 Defect detection method and device based on salient feature pre-extraction and image segmentation
CN114581307A (en) * 2022-03-18 2022-06-03 无锡范特智能科技有限公司 Multi-image stitching method, system, device and medium for target tracking identification
CN115829843A (en) * 2023-01-09 2023-03-21 深圳思谋信息科技有限公司 Image splicing method and device, computer equipment and storage medium
CN116156342A (en) * 2023-04-04 2023-05-23 合肥埃科光电科技股份有限公司 Multi-linear array image sensor splicing method, linear array image acquisition system, device and equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
一种线阵CCD检测系统的调整和标定方法;李俊伟;邓文怡;刘力双;;现代电子技术(第11期);全文 *
基于FPGA的拼接式CMOS线阵相机系统设计;夏湖培;苏新彦;刘培珍;刘宾;;计算机测量与控制(第12期);全文 *
基于SIFT的岩石薄片图像拼接;庞战;滕奇志;何海波;;微型机与应用(第06期);全文 *
李俊伟 ; 邓文怡 ; 刘力双 ; .一种线阵CCD检测系统的调整和标定方法.现代电子技术.2009,(11),全文. *
硅通孔键合硅片预对准边缘信息采集与处理;黄春霞;伊锦旺;;计算机测量与控制(第09期);全文 *

Also Published As

Publication number Publication date
CN117036175A (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US11798130B2 (en) User feedback for real-time checking and improving quality of scanned image
CN107409166B (en) Automatic generation of panning shots
JP5363752B2 (en) Road marking map generation method
CN103209291A (en) Method, apparatus and device for controlling automatic image shooting
CN112001456B (en) Vehicle positioning method and device, storage medium and electronic equipment
KR20160051803A (en) Interactive image composition
CN105513083A (en) PTAM camera tracking method and device
CN106296574A (en) 3-d photographs generates method and apparatus
CN111798540B (en) Image fusion method and system
CN114143519A (en) Method and device for automatically matching projection image with curtain area and projector
CN114926514A (en) Registration method and device of event image and RGB image
CN113673474B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN113610865B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN117036175B (en) Linear array image splicing method, device, medium and equipment
CN110248147A (en) A kind of image display method and apparatus
CN110659343B (en) Geofence data extraction method, device and equipment
KR20210080334A (en) Method, apparatus, and device for identifying human body and computer readable storage
CN113610884A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN108717684B (en) High-speed horizontal moving object image sequence splicing method and system based on array camera
CN112184901A (en) Depth map determination method and device
JP4571115B2 (en) Rectangular tracking method and apparatus, program, and computer-readable recording medium
CN113888611B (en) Method and device for determining image depth and storage medium
CN114727074B (en) Projection correction method for projection device, projection correction device and projection device
CN111881959B (en) Method and device for identifying image difference
CN109600552B (en) Image refocusing control method and system

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
GR01 Patent grant
GR01 Patent grant