Image synthesis method, device, portable scanner and non-volatile storage medium
By determining the target lens position parameters and marking the target points, and combining the stitching parameters to synthesize the image, the problem of large calculation amount in the image synthesis process is solved and the efficiency of image synthesis is improved.
Patent Information
- Application Number
- CN202210779921.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-07-04
AI Technical Summary
The image synthesis process in the prior art requires a large amount of calculation, resulting in low picture synthesis efficiency.
By determining the position parameters of multiple target lenses, using multiple target lenses to shoot the target object, multiple first images are obtained, and target points are respectively marked on the multiple first images to obtain multiple second images. According to the target points The stitching parameters are determined by bits, including the pixel width of the overlapping portion between adjacent images, and then multiple second images are synthesized into the target image.
It reduces the amount of calculation in the image synthesis process, improves the efficiency of image synthesis, and solves the problem of low efficiency caused by the large amount of calculation.
Smart Images

Figure CN115131211B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to an image synthesis method, device, portable scanner and non-volatile storage medium. Background Art
[0002] In the era of intelligent manufacturing industry 4.0, which focuses on high-end equipment manufacturing, the development of industrial intelligence is showing explosive growth. In the field of machine vision, by simulating biological visual imaging and processing information, robots are helped to extract, process and understand the extracted information, so that they can perform accurate, efficient and safe automated operations. Machine vision can perform high-precision monitoring and image recognition. In industrial automation testing, while improving efficiency, it also has high requirements for the detection of tiny defects.
[0003] In the prior art, the method of synthesizing pictures taken by multiple lenses into one picture includes: using multiple lenses to focus on different objects in the same scene to obtain multiple images, selecting one image as a base, identifying the object with the highest definition in each of the remaining images through a software algorithm, and intercepting the clearest target object to replace the target object in the base, and finally obtaining the base image as a synthesized image. The data processing process of this method is computationally intensive, resulting in low efficiency in picture synthesis.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide an image synthesis method, device, portable scanner and non-volatile storage medium to at least solve the technical problem in the related art that the image synthesis process has a large amount of calculation resulting in low efficiency of image synthesis.
[0006] According to one aspect of an embodiment of the present invention, there is provided an image synthesis method, comprising: determining position parameters of a plurality of target lenses; photographing a target object using the plurality of target lenses according to the position parameters to obtain a plurality of first images, and marking target points on the plurality of first images respectively to obtain a plurality of second images, wherein the plurality of target lenses are arranged linearly; determining stitching parameters corresponding to the plurality of second images according to the target points, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images; and synthesizing the plurality of second images into a target image including the target object according to the stitching parameters.
[0007] Optionally, according to the stitching parameters, multiple second images are synthesized into a target image including the target object, including: according to the stitching parameters, repeated parts in the multiple second images are removed to obtain multiple third images, wherein the pixel width of the repeated parts is the same as the pixel width of the overlapping parts; according to the arrangement order of the multiple target shots, the multiple third images are synthesized into the target image.
[0008] Optionally, stitching parameters corresponding to the multiple second images are determined according to the target point, including: overlapping the points representing the same physical position in the target point so that two adjacent images in the multiple second images partially overlap; and determining the stitching parameters according to the overlapping part of two adjacent images in the multiple second images.
[0009] Optionally, determining the position parameters of the plurality of target lenses includes: acquiring lens parameters of the plurality of target lenses and a range of an area to be scanned of the target object; and determining the position parameters according to the lens parameters and the range of the area to be scanned.
[0010] Optionally, according to the position parameters, multiple target lenses are used to shoot the target object to obtain multiple first images, and target points are marked on the multiple first images to obtain multiple second images, including: when the position parameters include the arrangement spacing, object distance and imaging range of the multiple target lenses, the overlapping area range in the imaging range is determined according to the arrangement spacing; according to the position parameters and the overlapping area range, multiple target lenses are used to shoot the target object to obtain multiple first images, and target points are marked on the multiple first images to obtain multiple second images, wherein a geometric distance identification figure is drawn on the target object, and the minimum identification length of the geometric distance identification figure is not greater than the arrangement spacing.
[0011] Optionally, according to the position parameters and the overlapping area range, multiple target lenses are used to shoot the target object to obtain multiple first images, and target points are marked on the multiple first images to obtain multiple second images, including: according to the position parameters, aligning the first boundary of the framing frame of the first lens among the multiple target lenses with the scale of the target object, wherein the first lens is a lens located at the starting point of the linear arrangement among the multiple target lenses, the first boundary is a boundary in the framing frame of the first lens close to the second lens, and the second lens is adjacent to the first lens; according to the overlapping area range, when the first boundary is aligned with the scale of the target object, using the first lens to shoot the target object to obtain a first image corresponding to the first lens, and marking a first point on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range in the imaging ranges corresponding to the first lens and the second lens respectively; moving the target object according to the minimum identification length and the overlapping area range, The scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; when the scale on the target object is aligned with the second boundary, the target object is photographed with the second lens to obtain a first image corresponding to the second lens, and a second point is marked on the image photographed by the second lens, wherein the second point has the same physical position as the first point, the image photographed by the second lens is one of the first images, and the target point includes the first point and the second point; according to the minimum mark length and the overlapping area range, the target object is moved multiple times in the moving direction, so that the scale of the target object is sequentially aligned with the boundaries of the framing frames of the multiple target lenses respectively close to the first lens, each of the multiple target lenses is sequentially used to photograph the target object to obtain multiple first images, and the target point is marked on the multiple first images.
[0012] According to another aspect of an embodiment of the present invention, there is further provided an image synthesis device, comprising: a first data processing module, used to determine position parameters of a plurality of target lenses; a shooting module, used to shoot a target object using a plurality of target lenses according to the position parameters to obtain a plurality of first images, and to mark target points on the plurality of first images respectively to obtain a plurality of second images, wherein the plurality of target lenses are arranged linearly; a second data processing module, used to determine stitching parameters corresponding to the plurality of second images according to the target points, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images; and a synthesis module, used to synthesize the plurality of second images into a target image including the target object according to the stitching parameters.
[0013] According to another aspect of an embodiment of the present invention, a portable scanner is provided, comprising: a frame module, a plurality of linearly arranged target lenses, an FPGA chip and a memory chip; wherein the frame module is used to carry the plurality of linearly arranged target lenses, the FPGA chip and the memory chip; the plurality of linearly arranged target lenses are used to photograph a target object to obtain a plurality of first images; the FPGA chip is used to mark target points on the plurality of first images respectively to obtain a plurality of second images, and is also used to determine stitching parameters corresponding to the plurality of second images according to the target points, and to synthesize the plurality of second images into a target image including the target object according to the stitching parameters, wherein the stitching parameters include the pixel width of the overlapping portion between adjacent images in the first image; and the memory chip is used to store the plurality of first images, the plurality of second images and the stitching parameters.
[0014] According to another aspect of the embodiments of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned image synthesis methods.
[0015] According to yet another aspect of the embodiments of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned image synthesis methods is executed.
[0016] In an embodiment of the present invention, position parameters of a plurality of target lenses are determined; according to the position parameters, a plurality of target lenses are used to shoot a target object to obtain a plurality of first images, and target points are respectively marked on the plurality of first images to obtain a plurality of second images, wherein the plurality of target lenses are linearly arranged; according to the target points, stitching parameters corresponding to the plurality of second images are determined, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images; according to the stitching parameters, the plurality of second images are synthesized into a target image including the target object, thereby achieving the purpose of reducing the amount of calculation in the image synthesis process, thereby achieving the technical effect of improving the image synthesis efficiency, and further solving the technical problem in the related art that the image synthesis process has a large amount of calculation, resulting in low efficiency of image synthesis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a computer terminal for implementing an image synthesis method is shown;
[0019] Figure 2 is a flowchart of an image synthesis method provided according to an embodiment of the present invention;
[0020] Figure 3 is a schematic structural diagram of a scanner provided according to an optional embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of a target point marking position provided according to an optional embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a point overlap method provided according to an optional embodiment of the present invention;
[0023] Figure 6 is a schematic diagram of an image processing module provided according to an optional embodiment of the present invention;
[0024] Figure 7 is a structural block diagram of an image synthesis device provided according to an embodiment of the present invention;
[0025] Figure 8 is a structural block diagram of a portable scanner provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:
[0029] The current-frequency conversion substrate, referred to as the I / F substrate, has a circuit in it that is used to convert an analog current signal into a frequency signal.
[0030] Mobile Industry Processor Interface (MIPI) is a pixel data format for recording image data.
[0031] Low-Voltage Differential Signaling (LVDS) is a pixel data format for recording image data.
[0032] Field-Programmable Gate Array (FPGA) is a chip that solves the shortcomings of customized circuits and overcomes the disadvantage of the limited number of gate circuits of existing programmable devices.
[0033] According to an embodiment of the present invention, a method embodiment of an image synthesis method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing an image synthesis method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the image synthesis method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the image synthesis method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0038] Figure 2 is a flow chart of an image synthesis method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0039] Step S202, determining position parameters of multiple target lenses.
[0040] In this step, multiple target lenses are used to shoot the target object. Before shooting, the arrangement of the multiple target lenses can be determined, and the position parameters can be used to describe the arrangement of the multiple target lenses. Preferably, in this embodiment, the multiple target lenses are linearly arranged in a row and are lenses of the same model.
[0041] Step S204, according to the position parameters, a plurality of target lenses are used to shoot the target object to obtain a plurality of first images, and target points are respectively marked on the plurality of first images to obtain a plurality of second images, wherein the plurality of target lenses are arranged linearly.
[0042] In this step, multiple target lenses can be arranged according to the arrangement indicated by the position parameter, and each of the multiple target lenses shoots a part of the target object. Each target lens can obtain a first image through the shooting action, and the imaging ranges of every two adjacent target lenses have overlapping areas, so there is a part repeatedly shot by the adjacent target lenses in the images shot by every two adjacent target lenses, and the multiple first images obtained are a collection of the first images obtained by all target lenses shooting the target object; and the target points are marked on the multiple first images respectively, and the multiple first images marked with the target points are the multiple second images. Optionally, the target object can be a long strip object with a flat surface, and the long side direction of the flat surface of the target object is consistent with or approximately the same as the direction of the linear arrangement of the multiple target lenses. In this step, the flat surface of the target object can be shot by multiple target lenses to obtain multiple first images, and multiple second images can be obtained after the multiple first images are marked with target points, so that the multiple second images can be synthesized into a target image through subsequent steps, so that the target image presents an image of a relatively complete flat surface of the target object.
[0043] Step S206: determining stitching parameters corresponding to the plurality of second images according to the target point, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images.
[0044] In this step, the adjacent images are two adjacent first images obtained by two adjacent target lenses respectively photographing the target object. Since the arrangement of the target lenses is not changed when marking the points, the adjacent images in the multiple first images are also the adjacent images in the multiple second images. When multiple first images are obtained by photographing the target object using multiple target lenses, the imaging ranges of every two adjacent target lenses have overlapping areas, that is, every two adjacent target lenses will take pictures of the overlapping area within the imaging range, so there are parts that are repeatedly photographed in every two adjacent images, and these two parts can overlap. The physical position corresponding to the overlapping part is the overlapping area within the imaging range of the two adjacent target lenses, and the stitching parameter is the pixel width of the overlapping part between the adjacent images in the multiple second images.
[0045] Step S208: synthesize the plurality of second images into a target image including the target object according to the stitching parameters.
[0046] In this step, the plurality of second images may be processed and stitched together into a target image including the target object according to the pixel width of the overlapping portion of the plurality of second images described by the stitching parameter.
[0047] Optionally, when using multiple target lenses in this embodiment and taking photos of other objects according to the position parameters in this embodiment to obtain other multiple photos, the stitching parameters obtained in this embodiment can be directly applied to the stitching process of the other multiple images, without the need to perform image recognition, image matching and other data algorithm processing on the objects in the other multiple images. Therefore, in specific applications, the purpose of simplifying the image synthesis process can be achieved, thereby improving the image synthesis efficiency.
[0048] Optionally, before performing image synthesis, the plurality of first images or the plurality of second images may be preprocessed to achieve image correction processing, including correction of image distortion data coefficients and position coefficients. Specifically, correction may be performed according to the correction table of the lens and position. Lens distortion is a distortion caused by an optical lens, which usually results in squeezing or stretching of the edge of the image, and the distortion is more severe at the edge of the image and less at the center of the image. The distortion data coefficient of the image may be corrected according to an algorithm to correct the distortion effect of the image and obtain an image that can show the actual shape of the target object. Position coefficient correction may align the multiple images taken and eliminate the misalignment between the multiple images. According to the stitching parameters, the multiple images that have been preprocessed may be cut and stitched to synthesize a target image including the target object.
[0049] Similarly, when using other multiple lenses and arranging them according to other position parameters, when photographing the target object to obtain multiple pictures for image synthesis, the method described in this embodiment can be used to first photograph the target object and punctuate the multiple images, and determine the stitching parameters corresponding to each position parameter. The multiple images can be synthesized according to the stitching parameters, without the need to perform data algorithm processing such as image recognition and image matching on the captured images every time the camera is photographed. Therefore, in specific applications, the purpose of simplifying the image synthesis process can be achieved, thereby improving the image synthesis efficiency.
[0050] Through the above steps, the purpose of reducing the amount of calculation in the image synthesis process can be achieved, thereby achieving the technical effect of improving the image synthesis efficiency, and further solving the technical problem in the related technology that the image synthesis process has a large amount of calculation resulting in low image synthesis efficiency.
[0051] As an optional embodiment, according to the stitching parameters, multiple second images are synthesized into a target image including a target object, which can be achieved by the following steps: according to the stitching parameters, repeated parts in the multiple second images are removed to obtain multiple third images, wherein the pixel width of the repeated parts is the same as the pixel width of the overlapping parts; according to the arrangement order of the multiple target shots, the multiple third images are synthesized into the target image.
[0052] Optionally, the multiple second images are sheared according to the pixel width value of the overlapping part of each two adjacent images in the multiple second images described by the stitching parameters, and the redundant parts in the direction perpendicular to the arrangement direction of the multiple target lenses can be sheared, and the repeated parts in the sheared images are removed to obtain multiple third images, wherein the repeated part is one of the overlapping parts in the two adjacent images, and the overlapping part is two image parts obtained by shooting a target object within an imaging range. For the image content, the two image parts are repeated. When stitching the multiple images to obtain a complete image, one of the two repeated image parts can be removed, which is the repeated part, and the other part is left to participate in the stitching process of a complete target image.
[0053] As an optional embodiment, determining stitching parameters corresponding to multiple second images according to target points can be achieved through the following steps: by overlapping the points representing the same physical location in the target points, so that two adjacent images in the multiple second images partially overlap; determining the stitching parameters according to the overlapping part of two adjacent images in the multiple second images.
[0054] Optionally, if multiple target points represent the same physical location, when marking the target points, the points will be marked in the middle of two adjacent images, and it is confirmed that at least two of the marked points in the two adjacent images represent the same physical location, and this physical location is within the overlapping area of the two target lenses corresponding to the two adjacent images. In the stitching stage, the points representing the same physical location in the target points can be overlapped so that the adjacent two images in the multiple second images have overlapping parts, and the pixel width of the overlapping part is confirmed to obtain the stitching parameters.
[0055] It should be noted that in the above description, the overlapping area range and the overlapping parts in adjacent images are mentioned many times. The overlapping area range and the overlapping parts in adjacent images are in an object-image correspondence relationship. When imaging through the target lens, the overlapping area range belongs to the object space. After being imaged by the target lens, it corresponds to the overlapping parts in the adjacent images in the image space. Therefore, the overlapping area range refers to the range size of the specific physical position, and the overlapping parts in the adjacent images refer to the pixel range on the image.
[0056] As an optional embodiment, determining the position parameters of multiple target lenses can be achieved by the following steps: obtaining lens parameters of multiple target lenses and the range of the area to be scanned of the target object; and determining the position parameters according to the lens parameters and the range of the area to be scanned.
[0057] In this optional embodiment, the optimal arrangement method of multiple target lenses can be calculated based on the focal length of the target lens and the range of the area to be scanned. In this case, the optimal arrangement method of multiple target lenses is described by position parameters. For example, when the object distance between the multiple target lenses and the target object is the focal length, the best imaging effect can be obtained; when the arrangement spacing of the multiple target lenses is a suitable value, the imaging range of the multiple target lenses can cover the entire range of the area to be scanned, but does not exceed the area to be scanned too much, and multiple images of suitable size and clarity can be obtained, which is conducive to finally obtaining a target image containing the target object with a good imaging effect.
[0058] As an optional embodiment, according to the position parameters, multiple target lenses are used to shoot the target object to obtain multiple first images, and the target points are marked on the multiple first images to obtain multiple second images. This can be achieved by the following steps: when the position parameters include the arrangement spacing, object distance and imaging range of the multiple target lenses, the overlapping area range in the imaging range is determined according to the arrangement spacing; according to the position parameters and the overlapping area range, multiple target lenses are used to shoot the target object to obtain multiple first images, and the target points are marked on the multiple first images to obtain multiple second images, wherein a geometric distance identification figure is drawn on the target object, and the minimum identification length of the geometric distance identification figure is not greater than the arrangement spacing.
[0059] Optionally, a plurality of target lenses arranged according to position parameters are used to shoot the target object, and a plurality of first images can be obtained. The position parameters include the arrangement spacing of the plurality of target lenses and the imaging range of each target lens. The overlapping area range in the imaging range of the plurality of target lenses can be obtained at this time. The overlapping area range is the area range on the target object that is repeatedly photographed. According to the overlapping area range and the minimum identification length of the target object, the approximate position of the overlapping area range on the image can be found. The point position is marked within the overlapping area range on the image to obtain the target point position. Among them, the identification pattern of the geometric distance drawn by the target object can be a grid, a stripe or a point. The distance between each identification pattern is the minimum identification length, which is also fixed and not greater than the arrangement spacing between the plurality of target lenses. It can be ensured that there can be an identification pattern within the imaging range of each target lens, so the target object can play the role of identifying the physical distance. Optionally, after obtaining the plurality of second images, each of the plurality of second images can be preprocessed. The preprocessing can include image distortion data coefficient correction and position coefficient correction, which is conducive to the subsequent synthesis of the image.
[0060] As an optional embodiment, according to the position parameters and the overlapping area range, multiple target lenses are used to shoot the target object to obtain multiple first images, and target points are marked on the multiple first images to obtain multiple second images. This can be achieved by the following steps: according to the position parameters, a first boundary of the framing frame of a first lens among the multiple target lenses is aligned with the scale of the target object, wherein the first lens is a lens located at the starting point of the linear arrangement among the multiple target lenses, the first boundary is a boundary in the framing frame of the first lens close to the second lens, and the second lens is adjacent to the first lens; according to the overlapping area range, when the first boundary is aligned with the scale of the target object, the target object is shot with the first lens to obtain a first image corresponding to the first lens, and a first point is marked on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range in the imaging ranges corresponding to the first lens and the second lens respectively; according to the minimum identification length and the overlapping area range , move the target object so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; when the scale on the target object is aligned with the second boundary, use the second lens to shoot the target object to obtain a first image corresponding to the second lens, and mark a second point on the image shot by the second lens, wherein the second point has the same physical position as the first point, the image shot by the second lens is one of the first images, and the target point includes the first point and the second point; according to the minimum mark length and the overlapping area range, move the target object multiple times in the moving direction, so that the scale of the target object is aligned with the boundary of the framing frame of each of the multiple target lenses close to the first lens in turn, use each of the multiple target lenses in turn to shoot the target object to obtain multiple first images, and mark the target point on the multiple first images.
[0061] Optionally, multiple target lenses are used to obtain multiple first images and mark points in each image in the following manner: according to the position parameters, multiple target lenses are used to sequentially obtain multiple first images. When the first image is obtained by shooting for the first time, the first lens located at the starting point of the linear arrangement among the multiple target lenses is used. When the scale on the target object is aligned with the framing frame of the first lens in the target lens, and the first boundary is the boundary in the framing frame of the first lens close to the second lens, the target object is photographed and the first point is marked in the first image corresponding to the first lens. When marking the first point, the first point can be marked according to the overlapping area range. The first point on the image represents a physical position within the overlapping area; according to the minimum mark length and the overlapping area, the target object can be moved forward a small distance, and the moving direction is the same as the direction from the first lens to the second lens, so that the scale on the target object is aligned with the second boundary of the framing frame of the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens. At this time, the second lens is used to shoot the target object, and the first image corresponding to the second lens is obtained. In the first image corresponding to the second lens, a point corresponding to the physical position corresponding to the first point is found, marked as the second point, and the target point includes the first point and the second point. Through the above steps, it can be ensured that there are multiple points in the target point to represent the same physical position, and the physical position represented is within the overlapping area, and the image is formed in the overlapping part of the adjacent images. Similarly, the target object can be moved in sequence, so that the scale of the target object is aligned with the boundary of the framing frame of the target lens close to the first lens in sequence, and multiple target lenses are used to shoot the target object in sequence, and the obtained image is punctuated to obtain the target point. It should be noted that the scale on the target object mentioned in this embodiment is not the same scale on the target object. An identification graphic indicating the geometric distance is drawn on the target object. The identification graphic may be a grid or a stripe. Because the minimum identification length between the borders of the identification graphics on the target object is certain and the geometric distance can be indicated, the border of the identification graphic is called the scale on the target object. The scale on the target object mentioned in this embodiment may be the scale closest to the boundary to be aligned.
[0062] As a specific embodiment of the present invention, Figure 3 is a schematic diagram of the structure of an image scanning device provided according to an optional embodiment of the present invention, such as Figure 3As shown, the image scanning device includes a frame 1, which is used to carry the target lens, light source and photoelectric conversion module inside the device. Regarding the imaging mode of the image scanning device, six target lenses are used as an example in this specific embodiment. Among them, the six target lenses 110-115 are linearly arranged in sequence along the scanning direction, and the imaging mode of these six target lenses is to form an image reduced by a certain proportion. The photoelectric conversion module includes a chip substrate 3, which is used to convert the optical signal obtained by imaging into a digital signal for output, and 6 photoelectric conversion chips 120-125 are mounted on it. This photoelectric conversion chip and the target lens are arranged relatively spaced and one-to-one in a predetermined direction. Any two adjacent photoelectric conversion chips have overlapping areas in the imaging area in the scanning direction, wherein the predetermined direction is the extension direction of the optical axis of the lens of the multiple target lenses. The detection object surface area detected by each target lens is 130-135, that is, the area of the imaging range of each target lens mentioned above, wherein there are overlapping areas D11-D15, and the repeated parts of the overlapping area imaging are removed from the imaging range of all target lenses, and the remaining is the area to be scanned where the target object is located. The first photoelectric conversion chip 120 scans the corresponding detection object surface 130 under the imaging of the corresponding lens 110, and the corresponding second photoelectric conversion chip 121 scans the corresponding detection object surface 131 under the imaging of the corresponding target lens 111, and the overlapping area of the scanned object surfaces 130 and 131 is D11. Similarly, the photoelectric conversion chips 120-125 scan the corresponding detection object surfaces 130-135 under the imaging of the corresponding target lens, and the overlapping ranges are D11-D15 respectively.
[0063] In this specific embodiment, when describing the size of each area, the length in the linear arrangement direction of the lens is mainly considered, and for the length perpendicular to the linear arrangement direction of the lens, the values of all ranges in this embodiment are 12.9mm, because its specific value does not affect the subsequent calculation in the linear arrangement direction of the lens, so it is no longer mentioned in the following text when it comes to the calculation in the linear arrangement direction of the lens. In the linear arrangement direction of the lens, the specific values of this embodiment are: the length of the range of the area to be scanned is 73.4mm, the focal length of the target lens is 14mm, according to calculation, when the position parameters of the target lens are the following data, the target object can be scanned and imaged to achieve a better effect: the scanning area of each target lens, that is, the imaging range 130=131=132=133=134=135=12.9mm; the overlapping part of the imaging range of two adjacent target lenses D11=D12=D13=D14=D15=0.4mm; the effective reading area of 6 images is 73.4mm; the distance from the target lens to the working object surface is 14mm.
[0064] In this specific embodiment, a sample with a specific black and white grid pattern can be selected as the target object. Since the size of the overlapping part of the imaging range of two adjacent target lenses is determined to be 0.4mm, the size of a single black and white grid can be selected to be 1mm*1mm; the first target lens selected for taking pictures is located at the leftmost of all target lenses, so the grid sample is moved to the right, and the next target lens for taking pictures is located to the right of the first target lens. First, move the grid sample to the right, adjust the right boundary of the framing frame of the first lens to the center of the grid, and at this time, the right boundary of the framing frame of the first lens is 0.5mm away from the nearest grid frame. At this time, take a picture of the target object and obtain the first image, that is, the single grid at the boundary of the first image represents a size of 1mm*0.5mm. At this time, since the length of the overlapping part of the imaging range of two adjacent target lenses is 0.8 mm, the right boundary of the framing frame of the first lens is close to the point marked on the nearest grid frame, and its corresponding specific physical position is within the range of the overlapping part and close to the middle part of the overlapping part, which is conducive to accurately identifying the overlapping area range of two adjacent images in subsequent steps. Figure 4 is a schematic diagram of a target point marking position provided according to an optional embodiment of the present invention, such as Figure 4 As shown, at this time, four dots are marked on the grid frame closest to the left and right boundaries of the first image, marked as A1-A4, as the positioning coordinates for subsequent image processing. Figure 4 As shown, the x-axis direction is the direction in which the lenses are linearly arranged, moving along the x-axis direction is moving rightward, and the y-axis direction is the direction perpendicular to the linear arrangement of the lenses.
[0065] Secondly, adjust the distance between the first image and the second image so that the image grid sizes at the boundary between the first image and the second image are equal. Specifically, move the grid sample to the right by 0.2mm so that the left boundary of the framing frame of the second lens is adjusted to the center of the grid. At this time, the left boundary of the framing frame of the second lens is 0.5mm away from the nearest grid frame. At this time, take a photo of the target object to obtain the second image. The single grid at the boundary of the second image represents a size of 1mm*0.5mm, and the image grid sizes at the boundary between the first image and the second image are equal. Figure 4As shown, on the second image obtained, four dot positions are marked on the grid borders closest to the left and right boundaries, marked as B1-B4, wherein the physical positions represented by B1 and B2 marked on the left boundary are respectively the same as the physical positions represented by A3 and A4. Taking A3 and B1 as examples, it should be emphasized that although the points represented by A3 and B1 are the same point on the target object, the target object moves a distance of 0.2 mm between the first image and the second image, resulting in an actual 0.2 mm error in the physical positions corresponding to the points represented by A3 and B1. Taking into account the errors in actual applications including the shooting errors of the target lens itself, the error in the physical position corresponding to the point caused by the moving target object in this embodiment is acceptable.
[0066] Secondly, the positions of the following multiple images are adjusted in sequence, and images of the marked points are obtained. Specifically, this embodiment takes 6 images as an example, and the grid samples are adjusted to move 0.1mm to the right in sequence, and other target lenses are used to take pictures in sequence to obtain the following 4 images. The single grid at the boundary of each image represents a size of 1mm*0.5mm. Figure 4 As shown, in each subsequent image, four dot positions are marked at four specific positions in turn. The dot positions represent fixed positions in the grid sample, marked as B1-B4, C1-C4, D1-D4, E1-E4, and F1-F4.
[0067] Secondly, multiple images are preprocessed. The preprocessing method includes image distortion data coefficient correction and position coefficient correction. The specific method is to correct according to the correction table of the lens and position, so as to obtain a picture that is more in line with the actual image of the target object.
[0068] Secondly, the overlapping and redundant parts of multiple images are processed. Since each image is independent and the imaging area of the imaging lens is larger than the actual required image area, there are overlapping parts between adjacent images in the scanning direction, i.e., the x-axis direction. Figure 4As shown, the dot position indicated by the arrow is the point mark of the same position of the two images in the overlapping area, and the overlapping part of the image can be processed according to the point mark. In the x direction, taking the two adjacent images representing the areas 130 and 131 as an example, there is an overlapping part D11 in the areas represented by the two images, and the point A3 of the first image 130 and the point B1 of the second image 131 are the same image points at the same position in the overlapping area D11. The points A4 and B2 are also the same image points at the same position in the overlapping area D11. The marked points representing the same position can be overlapped, and the pixel width of the overlapping area in the two adjacent images can be identified to obtain the stitching parameters corresponding to the multiple images, and at the same time, a part of the image in the two parts of the image representing the area D11 in the overlapping area can be removed. At the same time, there are redundant image area areas in the sub-scanning direction y direction, which must also be removed. Taking the 4 dots in an image as an example, the coordinates of the 4 dots are used as the reference position, and the like are removed. Figure 4 The image outside the dotted line is shown. Preferably, the actual area represented by the remaining image after removing the overlapping and redundant parts of the single image in this design is 12.9mm*12.5mm.
[0069] Secondly, multiple images are synthesized to obtain a complete image. Figure 5 is a schematic diagram of a point overlap method provided according to an optional embodiment of the present invention, such as Figure 5 As shown, taking the image synthesis of the first image 130 and the second image 131 as an example, the dot marks B1 and B2 of the second image are respectively moved to the corresponding dots A3 and A4 of the first image to complete the seamless splicing of the first image and the second image, and the splicing of subsequent multiple images is completed in sequence to complete the synthesis of the entire image.
[0070] Finally, after determining the stitching parameters corresponding to the position parameters of the target lens according to the grid sample, multiple images of other target objects obtained by shooting the target lens corresponding to the position parameters determined in this specific embodiment can directly read the stitching parameters determined in this specific embodiment to cut and stitch the multiple images, without having to calculate according to the position parameters every time after shooting multiple images, thereby improving the efficiency of image synthesis during the application process.
[0071] Figure 6 is a schematic diagram of an image processing module provided according to an optional embodiment of the present invention, such as Figure 6As shown, the image processing module includes an I / F substrate 4, which is used to realize the data conversion and transmission function. Specifically, the signal generated by the photoelectric conversion chip 120-125 can be converted into a signal in the LVDS data format through the circuit inside the I / F substrate, and the signal is transmitted to the inside of the FPGA to complete the data transmission function. The data processing module includes an image processing substrate 5, wherein the image processing substrate is equipped with an FPGA chip 6. The FPGA can be used to read the image signal, and through the setting of the internal register, the timing cycle is controlled to transmit the feedback information to the image processing module. At the same time, the FPGA also has the image preprocessing function, and the preprocessing function here includes the correction coefficient of the image distortion and the correction coefficient of the image position. After the preprocessing, an image that is easy for the human eye to distinguish is obtained, and then the overlapping and redundant parts of the image are removed and the splicing process of multiple images is performed, so as to realize the correction synthesis function of multiple images. After the image is synthesized, it is sent to the external display module PC end through the serial port of the image processing substrate, which is equipped with the FULL mode of the image processing substrate, and the maximum transmission speed reaches 680Mbyte / s, to complete the display of the entire image.
[0072] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0073] Through the description of the above implementation methods, those skilled in the art can clearly understand that the image synthesis method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0074] According to an embodiment of the present invention, a device for implementing the above-mentioned image synthesis method is also provided. Figure 7 is a structural block diagram of an image synthesis device provided according to an embodiment of the present invention. Figure 7As shown, the image synthesis device includes: a first data processing module 72, a shooting module 74, a second data processing module 76 and a synthesis module 78. The image synthesis device is described below.
[0075] The first data processing module 72 is used to determine position parameters of multiple target lenses.
[0076] The shooting module 74 is connected to the first data processing module 72, and is used to shoot the target object using multiple target lenses according to the position parameters to obtain multiple first images, and mark the target points on the multiple first images respectively to obtain multiple second images, wherein the multiple target lenses are arranged linearly.
[0077] The second data processing module 76 is connected to the shooting module 74 and is used to determine stitching parameters corresponding to the plurality of second images according to the target point, wherein the stitching parameters include the pixel width of the overlapping portion between adjacent images in the plurality of second images.
[0078] The synthesis module 78 is connected to the second data processing module 76 and is used to synthesize the multiple second images into a target image including the target object according to the stitching parameters.
[0079] It should be noted that the first data processing module 72, the shooting module 74, the second data processing module 76 and the synthesis module 78 correspond to steps S202 to S208 in the embodiment, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules as part of the device can be run in the computer terminal 10 provided in the embodiment.
[0080] According to an embodiment of the present invention, a portable scanner for implementing the above-mentioned image synthesis method is also provided. Figure 8 is a block diagram of a portable scanner provided according to an embodiment of the present invention. Figure 8 As shown, the portable scanner includes: a frame module 82, a plurality of linearly arranged target lenses 84, an FPGA chip 86, and a storage chip 88. The portable scanner is described below.
[0081] The frame module 82 is used to carry a plurality of linearly arranged target lenses, FPGA chips and storage chips.
[0082] A plurality of linearly arranged target lenses 84 are used to photograph a target object, wherein the plurality of target lenses are linearly arranged.
[0083] FPGA chip 86 is used to mark target points on multiple first images respectively to obtain multiple second images, where the multiple first images are respectively photographed by multiple target lenses. It is also used to determine stitching parameters corresponding to the multiple second images according to the target points, and is also used to synthesize the multiple second images into a target image including the target object according to the stitching parameters, wherein the stitching parameters include the pixel width of the overlapping portion between adjacent images in the first image.
[0084] The storage chip 88 is used to store a plurality of first images, a plurality of second images and stitching parameters.
[0085] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0086] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the image synthesis method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned image synthesis method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The processor can call the information and application program stored in the memory through the transmission device to execute the following steps: determine the position parameters of multiple target lenses; according to the position parameters, use the multiple target lenses to shoot the target object to obtain multiple first images, and mark the target points on the multiple first images respectively to obtain multiple second images, wherein the multiple target lenses are arranged linearly; according to the target points, determine the stitching parameters corresponding to the multiple second images, wherein the stitching parameters include the pixel width of the overlapping part between adjacent images in the multiple second images; according to the stitching parameters, synthesize the multiple second images into a target image including the target object.
[0088] Optionally, the processor may also execute program code of the following steps: synthesizing the plurality of second images into a target image including a target object according to stitching parameters, including: removing repeated parts from the plurality of second images according to the stitching parameters to obtain a plurality of third images, wherein the pixel width of the repeated parts is the same as the pixel width of the overlapping parts; and synthesizing the plurality of third images into a target image according to an arrangement order of the plurality of target shots.
[0089] Optionally, the processor may also execute program code for the following steps: determining stitching parameters corresponding to the plurality of second images according to the target point, including: overlapping the points representing the same physical position in the target point so that two adjacent images in the plurality of second images partially overlap; determining stitching parameters according to the overlapping portion of two adjacent images in the plurality of second images.
[0090] Optionally, the processor may also execute program code of the following steps: determining position parameters of multiple target lenses, including: obtaining lens parameters of multiple target lenses and the range of the area to be scanned of the target object; determining the position parameters according to the lens parameters and the range of the area to be scanned.
[0091] Optionally, the processor may also execute program code for the following steps: based on position parameters, photographing the target object using multiple target lenses to obtain multiple first images, and marking target points on the multiple first images to obtain multiple second images, including: when the position parameters include the arrangement spacing, object distance and imaging range of the multiple target lenses, determining the range of overlapping areas in the imaging range based on the arrangement spacing; based on the position parameters and the range of overlapping areas, photographing the target object using multiple target lenses to obtain multiple first images, and marking target points on the multiple first images to obtain multiple second images, wherein a geometric distance identification graphic is drawn on the target object, and the minimum identification length of the geometric distance identification graphic is not greater than the arrangement spacing.
[0092] Optionally, the processor may also execute program code for the following steps: based on position parameters and overlapping area range, using multiple target lenses to photograph the target object to obtain multiple first images, and marking target points on the multiple first images to obtain multiple second images, including: based on position parameters, aligning a first boundary of a framing frame of a first lens among the multiple target lenses with a scale of the target object, wherein the first lens is a lens located at a starting point of a linear arrangement among the multiple target lenses, the first boundary is a boundary in the framing frame of the first lens close to the second lens, and the second lens is adjacent to the first lens; based on the overlapping area range, when the first boundary is aligned with the scale of the target object, using the first lens to photograph the target object to obtain a first image corresponding to the first lens, and marking a first point on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range in the imaging ranges corresponding to the first lens and the second lens respectively; based on the minimum identification length and the overlapping area range, moving the target object so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; when the scale on the target object is aligned with the second boundary, using the second lens to shoot the target object to obtain a first image corresponding to the second lens, and marking a second point on the image shot by the second lens, wherein the second point has the same physical position as the first point, the image shot by the second lens is one of the first images, and the target point includes the first point and the second point; according to the minimum mark length and the overlapping area range, moving the target object multiple times in the moving direction, so that the scale of the target object is aligned with the boundary of the framing frame of each of the multiple target lenses close to the first lens in turn, using each of the multiple target lenses in turn to shoot the target object to obtain multiple first images, and marking the target point on the multiple first images.
[0093] The embodiment of the present invention provides a scheme for image synthesis. Position parameters of multiple target lenses are determined; according to the position parameters, multiple target lenses are used to shoot a target object to obtain multiple first images, and target points are respectively marked on the multiple first images to obtain multiple second images, wherein the multiple target lenses are arranged linearly; according to the target points, stitching parameters corresponding to the multiple second images are determined, wherein the stitching parameters include the pixel width of the overlapping part between adjacent images in the multiple second images; according to the stitching parameters, the multiple second images are synthesized into a target image including the target object, thereby achieving the purpose of reducing the amount of calculation in the image synthesis process, thereby achieving the technical effect of improving the efficiency of image synthesis, and further solving the technical problem of low efficiency of image synthesis caused by large amount of calculation in the image synthesis process in the related art.
[0094] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0095] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the image synthesis method provided by the embodiment.
[0096] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0097] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: determining position parameters of multiple target lenses; based on the position parameters, photographing the target object using the multiple target lenses to obtain multiple first images, and marking target points on the multiple first images respectively to obtain multiple second images, wherein the multiple target lenses are arranged linearly; based on the target points, determining stitching parameters corresponding to the multiple second images, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the multiple second images; and based on the stitching parameters, synthesizing the multiple second images into a target image including the target object.
[0098] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: according to the stitching parameters, synthesizing the multiple second images into a target image including the target object, including: according to the stitching parameters, removing repeated parts in the multiple second images to obtain multiple third images, wherein the pixel width of the repeated parts is the same as the pixel width of the overlapping parts; according to the arrangement order of the multiple target shots, synthesizing the multiple third images into the target image.
[0099] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: determining stitching parameters corresponding to the multiple second images based on the target point, including: overlapping the points representing the same physical position in the target point so that two adjacent images in the multiple second images partially overlap; determining the stitching parameters based on the overlapping portion of two adjacent images in the multiple second images.
[0100] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: determining position parameters of multiple target lenses, including: obtaining lens parameters of multiple target lenses and the range of the area to be scanned of the target object; determining the position parameters according to the lens parameters and the range of the area to be scanned.
[0101] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: according to the position parameters, using multiple target lenses to shoot the target object to obtain multiple first images, and marking the target points on the multiple first images to obtain multiple second images, including: when the position parameters include the arrangement spacing, object distance and imaging range of the multiple target lenses, determining the overlapping area range in the imaging range according to the arrangement spacing; according to the position parameters and the overlapping area range, using multiple target lenses to shoot the target object to obtain multiple first images, and marking the target points on the multiple first images to obtain multiple second images, wherein a geometric distance identification graphic is drawn on the target object, and the minimum identification length of the geometric distance identification graphic is not greater than the arrangement spacing.
[0102] Optionally, in this embodiment, the non-volatile storage medium is configured to store a program code for executing the following steps: according to the position parameter and the overlapping area range, using multiple target lenses to shoot the target object to obtain multiple first images, and marking the target point on the multiple first images to obtain multiple second images, including: according to the position parameter, aligning the first boundary of the framing frame of the first lens among the multiple target lenses with the scale of the target object, wherein the first lens is the lens located at the starting point of the linear arrangement among the multiple target lenses, the first boundary is the boundary of the framing frame of the first lens close to the second lens, and the second lens is adjacent to the first lens; according to the overlapping area range, when the first boundary is aligned with the scale of the target object, using the first lens to shoot the target object to obtain a first image corresponding to the first lens, and marking a first point on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range in the imaging ranges corresponding to the first lens and the second lens respectively; according to the minimum scale According to the minimum identification length and the overlapping area range, the target object is moved so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; when the scale on the target object is aligned with the second boundary, the target object is photographed with the second lens to obtain a first image corresponding to the second lens, and a second point is marked on the image photographed by the second lens, wherein the second point has the same physical position as the first point, the image photographed by the second lens is one of the first images, and the target point includes the first point and the second point; according to the minimum identification length and the overlapping area range, the target object is moved multiple times in the moving direction so that the scale of the target object is sequentially aligned with the boundaries of the framing frames of the multiple target lenses respectively close to the first lens, each of the multiple target lenses is sequentially used to photograph the target object to obtain multiple first images, and the target point is marked on the multiple first images.
[0103] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0104] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0105] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0109] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An image synthesis method, characterized in that: include: Determine position parameters of multiple target lenses; According to the position parameters, the target object is photographed using the multiple target lenses to obtain multiple first images, and the target points are respectively marked on the multiple first images to obtain multiple second images, wherein the multiple target lenses are arranged linearly; Determine, according to the target point, stitching parameters corresponding to the plurality of second images, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images; According to the stitching parameters, the plurality of second images are synthesized into a target image including the target object; The method of photographing the target object using the multiple target lenses according to the position parameters to obtain multiple first images, and marking the target points on the multiple first images to obtain multiple second images includes: In a case where the position parameters include the arrangement spacing, the object distance and the imaging range of the plurality of target lenses, determining the range of the overlapping area in the imaging range according to the arrangement spacing; According to the position parameters and the overlapping area range, the target object is photographed using the multiple target lenses to obtain the multiple first images, and the target points are marked on the multiple first images to obtain the multiple second images, wherein a geometric distance identification graphic is drawn on the target object, and the minimum identification length of the geometric distance identification graphic is not greater than the arrangement spacing; Wherein, according to the position parameters and the overlapping area range, the target object is photographed using the multiple target lenses to obtain the multiple first images, and the target points are marked on the multiple first images to obtain the multiple second images, including: According to the position parameter, aligning a first boundary of a framing frame of a first lens among the multiple target lenses with a scale of the target object, wherein the first lens is a lens located at a starting point of a linear arrangement among the multiple target lenses, and the first boundary is a boundary of the framing frame of the first lens close to a second lens, and the second lens is adjacent to the first lens; According to the overlapping area range, when the first boundary is aligned with the scale of the target object, the target object is photographed using the first lens to obtain a first image corresponding to the first lens, and a first point is marked on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range of the imaging ranges corresponding to the first lens and the second lens respectively; According to the minimum mark length and the overlapping area range, move the target object so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; When the scale on the target object is aligned with the second boundary, the target object is photographed using the second lens to obtain a first image corresponding to the second lens, and a second point is marked on the image photographed by the second lens, wherein the second point has the same physical position as that represented by the first point, the image photographed by the second lens is one of the first images, and the target point includes the first point and the second point; According to the minimum marking length and the overlapping area range, the target object is moved multiple times in the moving direction so that the scale of the target object is aligned with the boundary of the framing frame of each of the multiple target lenses close to the first lens in sequence, and the target object is photographed using each lens of the multiple target lenses in sequence to obtain the multiple first images, and the target point position is marked on the multiple first images.
2. The method according to claim 1, characterized in that The step of synthesizing the plurality of second images into a target image including the target object according to the stitching parameter comprises: According to the stitching parameter, removing repeated parts from the plurality of second images to obtain a plurality of third images, wherein the pixel width of the repeated parts is the same as the pixel width of the overlapping parts; The plurality of third images are synthesized into the target image according to the arrangement order of the plurality of target lenses.
3. The method according to claim 1, characterized in that Determining stitching parameters corresponding to the plurality of second images according to the target point position includes: By overlapping the points representing the same physical position in the target points, two adjacent images in the plurality of second images are partially overlapped; The stitching parameter is determined according to an overlapping portion of two adjacent images in the plurality of second images.
4. The method according to claim 1, characterized in that: The step of determining position parameters of a plurality of target lenses comprises: Acquire lens parameters of the multiple target lenses and a to-be-scanned area range of the target object; The position parameter is determined according to the lens parameter and the range of the area to be scanned.
5. An image synthesis device, characterized in that: include: A first data processing module, used to determine position parameters of multiple target lenses; A shooting module, configured to shoot a target object using the plurality of target lenses according to the position parameters to obtain a plurality of first images, and mark target points on the plurality of first images respectively to obtain a plurality of second images, wherein the plurality of target lenses are arranged linearly; A second data processing module, configured to determine stitching parameters corresponding to the plurality of second images according to the target point, wherein the stitching parameters include pixel widths of overlapping portions between adjacent images in the plurality of second images; A synthesis module, configured to synthesize the plurality of second images into a target image including the target object according to the stitching parameters; The method of photographing the target object using the multiple target lenses according to the position parameters to obtain multiple first images, and marking the target points on the multiple first images to obtain multiple second images includes: In a case where the position parameters include the arrangement spacing, the object distance and the imaging range of the plurality of target lenses, determining the range of the overlapping area in the imaging range according to the arrangement spacing; According to the position parameters and the overlapping area range, the target object is photographed using the multiple target lenses to obtain the multiple first images, and the target points are marked on the multiple first images to obtain the multiple second images, wherein a geometric distance identification graphic is drawn on the target object, and the minimum identification length of the geometric distance identification graphic is not greater than the arrangement spacing; Wherein, according to the position parameters and the overlapping area range, the target object is photographed using the multiple target lenses to obtain the multiple first images, and the target points are marked on the multiple first images to obtain the multiple second images, including: According to the position parameter, aligning a first boundary of a framing frame of a first lens among the multiple target lenses with a scale of the target object, wherein the first lens is a lens located at a starting point of a linear arrangement among the multiple target lenses, and the first boundary is a boundary of the framing frame of the first lens close to a second lens, and the second lens is adjacent to the first lens; According to the overlapping area range, when the first boundary is aligned with the scale of the target object, the target object is photographed using the first lens to obtain a first image corresponding to the first lens, and a first point is marked on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range of the imaging ranges corresponding to the first lens and the second lens respectively; According to the minimum mark length and the overlapping area range, move the target object so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; When the scale on the target object is aligned with the second boundary, the target object is photographed using the second lens to obtain a first image corresponding to the second lens, and a second point is marked on the image photographed by the second lens, wherein the second point has the same physical position as that represented by the first point, the image photographed by the second lens is one of the first images, and the target point includes the first point and the second point; According to the minimum marking length and the overlapping area range, the target object is moved multiple times in the moving direction so that the scale of the target object is aligned with the boundary of the framing frame of each of the multiple target lenses close to the first lens in sequence, and the target object is photographed using each lens of the multiple target lenses in sequence to obtain the multiple first images, and the target point position is marked on the multiple first images.
6. A portable scanner, characterized in that: include: Frame module, multiple linearly arranged target lenses, FPGA chip and storage chip; among them, The frame module is used to carry the multiple linearly arranged target lenses, the FPGA chip and the storage chip; The plurality of linearly arranged target lenses are used to photograph the target object to obtain a plurality of first images; The FPGA chip is used to mark target points on the plurality of first images respectively to obtain a plurality of second images, and is also used to determine stitching parameters corresponding to the plurality of second images according to the target points, and to synthesize the plurality of second images into a target image including the target object according to the stitching parameters, wherein the stitching parameters include a pixel width of an overlapping portion between adjacent images in the first image; The storage chip is used to store the plurality of first images, the plurality of second images and the stitching parameters; According to the position parameters and the overlapping area range in the imaging range, the target object is photographed by using multiple target lenses to obtain the multiple first images, and the target points are marked on the multiple first images to obtain the multiple second images, wherein the position parameters include the arrangement spacing of the multiple target lenses, the object distance and the imaging range, the overlapping area range is determined according to the arrangement spacing, a geometric distance identification figure is drawn on the target object, and the minimum identification length of the geometric distance identification figure is not greater than the arrangement spacing; wherein, according to the position parameter, aligning a first boundary of a framing frame of a first lens among the multiple target lenses with a scale of the target object, wherein the first lens is a lens located at a starting point of a linear arrangement among the multiple target lenses, and the first boundary is a boundary of the framing frame of the first lens close to a second lens, and the second lens is adjacent to the first lens; According to the overlapping area range, when the first boundary is aligned with the scale of the target object, the target object is photographed using the first lens to obtain a first image corresponding to the first lens, and a first point is marked on the first image corresponding to the first lens, wherein the physical position represented by the first point is within the overlapping area range of the imaging ranges corresponding to the first lens and the second lens respectively; According to the minimum mark length and the overlapping area range, move the target object so that the scale of the target object is aligned with the second boundary of the framing frame of the second lens, wherein the moving direction of the target object is the direction from the first lens to the second lens, and the second boundary is the boundary of the framing frame of the second lens close to the first lens; When the scale on the target object is aligned with the second boundary, the target object is photographed using the second lens to obtain a first image corresponding to the second lens, and a second point is marked on the image photographed by the second lens, wherein the second point has the same physical position as that represented by the first point, the image photographed by the second lens is one of the first images, and the target point includes the first point and the second point; According to the minimum marking length and the overlapping area range, the target object is moved multiple times in the moving direction so that the scale of the target object is aligned with the boundary of the framing frame of each of the multiple target lenses close to the first lens in sequence, and the target object is photographed using each lens of the multiple target lenses in sequence to obtain the multiple first images, and the target point position is marked on the multiple first images.
7. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the image synthesis method according to any one of claims 1 to 4.
8. A computer device, characterized in that: The computer device comprises a processor, and the processor is used to run a program, wherein the program executes the image synthesis method according to any one of claims 1 to 4 when running.
