Image acquisition method, device, electronic device and computer-readable storage medium
By calculating the count value of the line scan camera interruption, continuing image acquisition and stitching images when the feature point match meets the conditions, the problem of resetting after the line scan camera interruption is solved, and the acquisition efficiency and imaging quality are improved.
Patent Information
- Application Number
- CN202210598504.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-05-30
AI Technical Summary
When an existing line scan camera encounters abnormal interruption during image acquisition, it must re-motion reset, resulting in inefficient use of the acquisition equipment.
By obtaining the unit pixel distance and the moving distance when the motion structure is interrupted, the interrupt count value is calculated, image acquisition continues and the image is stitched when the characteristic point match meets the conditions, avoiding reset.
It realizes no need to reset after image acquisition is interrupted, saves time, ensures imaging quality, supports multi-line operations and improves technical tolerance.
Smart Images

Figure CN115065763B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of image acquisition, and in particular, to an image acquisition method, apparatus, electronic device, and computer-readable storage medium. Background Art
[0002] A line scan camera is used to obtain image information. For example, it obtains the image information of a product to be detected. Its operating principle is to perform continuous imaging by line-by-line exposure, and the exposure process is synchronized by using a high-speed pulse signal of an encoder. In the existing image acquisition process of a line scan camera, since the line frequency exposure of the line scan camera is set as a complete process, an electrical control starts a signal and an end signal, and each operation must complete the entire process.
[0003] If an abnormal interruption or an active intervention interruption occurs in the image acquisition, it is necessary to perform a re-motion reset, that is, to restore to the starting state of the image acquisition process and perform image acquisition again; repeated operations will seriously waste time and reduce the use efficiency of the acquisition device. Summary of the Invention
[0004] To solve at least the above technical problems in the prior art, embodiments of the present invention provide an image acquisition method, apparatus, and electronic device.
[0005] A first aspect of the embodiments of the present disclosure provides an image acquisition method for an image device to acquire image information. The image device is connected to a connection motion structure for driving its movement. The method includes: obtaining a unit pixel distance; starting image acquisition, the motion structure starts to move at the starting row of the image, and for each movement of the unit pixel distance, one row of image data is obtained; obtaining the movement distance when the movement of the motion structure is interrupted, and determining the interrupted count value according to the movement distance and the unit pixel distance; continuing image acquisition, the motion structure starts to move at the row number of the image that is the same as the interrupted count value, and for each movement of the unit pixel distance, one row of image data is obtained.
[0006] In some embodiments, the method further includes: when obtaining one row of image data each time, synchronously performing counting and saving it as the count value of the row number; comparing the count value of the row number with a preset value of the row number, and when the two are the same, stopping image acquisition.
[0007] In some embodiments, the method further includes: before continuing image acquisition, comparing the count value of the row number with the interrupted count value, and when the two are different, updating the count value of the row number to the interrupted count value.
[0008] In some embodiments, the method further includes: after the image acquisition is completed, dividing the image into a first image and a second image according to the interrupted count value, where the image acquired before the interruption is the first image, and the image acquired after the interruption is the second image; extracting and comparing the feature points of the first image and the second image, and when the number of matched feature points meets a set number, determining the image stitched by the first image and the second image as the required image.
[0009] In some embodiments, the method further includes: when the number of matched feature points is less than the set number, setting a new interrupted count value, and the moving structure starts to move at the same row number as the new interrupted count value of the image; determining a new second image according to the new interrupted count value, extracting and comparing the feature points of the first image and the new second image; when the number of matched feature points meets the set number, determining the image stitched by the first image and the new second image as the required image.
[0010] In some embodiments, the obtaining the unit pixel distance includes: calculating the actual distance corresponding to each pixel on the plane where the moving structure is located according to the pixel value of the image device.
[0011] In some embodiments, for each movement of the unit pixel distance, obtaining a row of image data includes: for each movement of the unit pixel distance by the moving structure, triggering the encoder to send a pulse signal to the image device, and the image device triggers the exposure of a row of images to obtain a row of image data exposed by the image device.
[0012] A second aspect of the embodiments of the present disclosure provides an image acquisition device for an image device to acquire image information, where the image device is connected to a connecting moving structure for driving its movement, and the device includes: a start-stop module, an acquisition module, and a calculation module; the start-stop module is configured to start image acquisition; the acquisition module is configured to obtain the unit pixel distance, obtain image data, and obtain the moving distance when the movement of the moving structure is interrupted; the calculation module is configured to determine the interrupted count value according to the moving distance and the unit pixel distance.
[0013] In some embodiments, the calculation module is further configured to synchronously count when acquiring each row of image data and save it as the count value of the number of rows; the start-stop module is further configured to compare the count value of the number of rows with the preset value of the number of rows, and when the two are the same, stop image acquisition.
[0014] In some embodiments, the calculation module is further configured to compare the count value of the number of rows with the interrupted count value before continuing image acquisition, and when the two are different, update the count value of the number of rows to the interrupted count value.
[0015] In some embodiments, an image division module and a feature comparison module are further included. The image division module is configured to divide the image into a first image and a second image according to the interrupted count value after the image acquisition is completed, where the image acquired before the interruption is the first image, and the image acquired after the interruption is the second image. The feature comparison module is configured to extract and compare the feature points of the first image and the second image. When the number of matching feature points meets the set number, it is determined that the image stitched by the first image and the second image is the required image.
[0016] In some embodiments, a setting module is further included. The setting module is configured to set a new interrupted count value when the number of matching feature points is less than the set number, and the motion structure starts to move at the same row number as the new interrupted count value of the image. The image division module is further configured to determine a new second image according to the new interrupted count value, and the feature comparison module is configured to extract and compare the feature points of the first image and the new second image. When the number of matching feature points meets the set number, it is determined that the image stitched by the first image and the new second image is the required image.
[0017] In some embodiments, the acquisition module is further configured to, according to the pixel value of the image device, the calculation module is further configured to calculate the actual distance corresponding to each pixel on the plane where the motion structure is located.
[0018] In some embodiments, the acquisition module is further configured to, when the motion structure moves a unit pixel distance, trigger the encoder to send a pulse signal to the image device, and the image device triggers the exposure of a row of images to obtain the image data of a row of images exposed by the image device.
[0019] A third aspect of the embodiments of the present disclosure provides an electronic device, which includes: a processor, a memory, and a bus; the memory stores executable instructions; the processor communicates with the memory through the bus. When the processor executes the executable instructions stored in the memory, the above image acquisition method is implemented.
[0020] A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium, which is characterized in that it stores executable instructions for implementing the above image acquisition method when being executed by a processor.
[0021] A fifth aspect of the embodiments of the present disclosure provides a computer program product, which is characterized in that the computer program product includes a computer program / instructions, and when the computer program / instructions are executed by a processor, the above image acquisition method is implemented.
[0022] The image acquisition method provided by an embodiment of the present disclosure includes: obtaining the moving distance when the movement of a moving structure is interrupted, determining the count value of the interruption according to the moving distance and the unit pixel distance; continuing image acquisition, the moving structure starts to move at the row number of the image that is the same as the count value of the interruption, and for each movement of the unit pixel distance, one row of image data is obtained. In this way, in the case where image acquisition is interrupted, based on the count value of the interruption, image acquisition is continued without performing a reset operation, saving the time required for image acquisition and ensuring the imaging quality of continuous operation. Description of the Drawings
[0023] By referring to the accompanying drawings and reading the following detailed description, the above and other objects, features, and advantages of the exemplary embodiments of the present disclosure will become readily understandable. In the drawings, several embodiments of the present disclosure are shown in an exemplary rather than restrictive manner, where:
[0024] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0025] Figure 1 is an optional processing flow schematic diagram of the image acquisition method provided by an embodiment of the present disclosure;
[0026] Figure 2 is an optional processing flow schematic diagram of the image acquisition method provided by an embodiment of the present disclosure;
[0027] Figure 3 is an optional processing flow schematic diagram of the image acquisition method provided by an embodiment of the present disclosure;
[0028] Figure 4 is a schematic diagram of the composition structure of the image acquisition device provided by an embodiment of the present disclosure;
[0029] Figure 5 is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present disclosure.
[0030] In the figure:
[0031] 400: Image acquisition device; 500: Electronic device;
[0032] 410: Start / stop module; 420: Acquisition module; 430: Calculation module;
[0033] 510: Processor; 520: Network interface; 530: User interface; 540: Bus; 550: Memory; 551: Operating system; 552: Network communication module. Detailed Embodiments
[0034] To make the objectives, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only a part rather than all of the embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0035] If an image device (such as a line scan camera) is to implement the function of continuous operation after interruption, it must perform a motion reset, that is, restore to the starting state of the image acquisition process and re-perform image acquisition.
[0036] In view of the problem in the related art that if image acquisition is interrupted, only re-acquisition can be performed, the embodiments of the present disclosure provide an image acquisition method, device, and electronic device. Figure 1 It is an optional processing flow schematic diagram of the image acquisition method provided by the embodiments of the present disclosure. As Figure 1 shown, the image acquisition method is used for an image device to acquire image information. The image device is connected to a connection motion structure for driving its movement. The method includes:
[0037] Step S10: Obtain the unit pixel distance; during the use of the image device, exposure is performed row by row, and the unit distance moved by the motion structure each time is the unit pixel distance.
[0038] For example, according to the pixel value of the image device (such as a line scan camera), calculate the actual distance stepLen mm / pixel corresponding to each pixel on the plane where the motion structure is located, where mm / pixel is the millimeter distance corresponding to each pixel.
[0039] Step S20: The host computer issues an image acquisition instruction to start image acquisition. The motion structure starts to move from the starting row of the image, and each time it moves the unit pixel distance, a row of image data is acquired.
[0040] For example, the host computer issues an image acquisition instruction to a programmable logic controller (PLC), and controls the movement of the motion structure through the programmable logic controller. For example, the motion structure is a three-dimensional motion structure, which respectively includes moving structures moving in the X-axis, Y-axis, and Z-axis directions. For example, the slide rail and slider structure of the moving structure.
[0041] For example, the starting row of the image can be interpreted as: the image device is used to acquire image information of a product. When the image device performs image acquisition, it needs to acquire row by row, and the starting row of the image is the first row of the image to be acquired.
[0042] For example, every time the motion structure moves the distance of one unit pixel, it triggers the encoder to send a pulse signal to the image device, and the image device triggers the exposure of one row of images and acquires the image data of one row of the exposed image device.
[0043] Step S30: Obtain the moving distance when the motion structure moves and is interrupted, and determine the interrupted count value according to the moving distance and the unit pixel distance.
[0044] For example, when the motion structure moves, use a sensor to synchronously obtain the moving distance of the motion structure. For example, the sensor is a grating sensor, and use the grating sensor to obtain the moving distance runlen of the motion structure. Determine the interrupted count value stepCount according to the moving distance runlen and the unit pixel distance stepLen. The calculation formula is as follows:
[0045] stepCount = runlen / stepLen;
[0046] The motion structure may have accidental interruptions or human interruptions. When they exist, obtain the image row number where the motion structure is located when interrupted.
[0047] Step S40: Continue image acquisition. The motion structure starts to move at the row number of the image that is the same as the interrupted count value, and for every movement of the unit pixel distance, obtain one row of image data.
[0048] The above image acquisition method has the following advantages:
[0049] 1. After the image acquisition is interrupted, it can continue to operate without affecting the imaging quality;
[0050] 2. Interrupt operations can be added to the image acquisition process, and other operation functions can be inserted during the operation to achieve the scenario of multi-line operations;
[0051] 3. It reduces the engineering application environment and improves the technical tolerance of the application;
[0052] 4. It avoids the time waste of re-taking pictures;
[0053] 5. It ensures the imaging quality of continuous operation.
[0054] Figure 2 It is an optional processing flow schematic diagram of the image acquisition method provided by the embodiments of the present disclosure. As Figure 2 shown, the image acquisition method further includes:
[0055] Step S50: When acquiring each line of image data, synchronously perform counting and save it as the count value lineCount of the number of lines; compare the count value of the number of lines with the preset value of the number of lines, and when the two are the same, stop image acquisition.
[0056] During the image acquisition process, if there is no interruption in image acquisition, stop image acquisition until the count value of the number of lines is the same as the preset value of the number of lines. If there is an interruption, when continuing image acquisition, stop image acquisition until the count value of the number of lines is the same as the preset value of the number of lines.
[0057] Continue to refer to Figure 2 , the image acquisition method further includes:
[0058] Step S31: Before continuing image acquisition, compare the count value of the number of lines with the count value of the interruption. When the two are different, update the count value of the number of lines to the count value of the interruption.
[0059] During image acquisition, judgment is made based on the count value of the number of lines. Therefore, during the image acquisition process, the count value of the number of lines can be corrected. For example, compare the count value lineCount of the number of lines with the count value stepCount of the interruption. When the two values are the same, it means that the count value lineCount of the number of lines is correct and does not need to be updated. When the two values are different, it means that the count value lineCount of the number of lines has a deviation and needs to be updated. Among them, the accuracy of the value obtained based on the moving distance runlen of the motion structure and the unit pixel distance stepLen is high. Therefore, the count value stepCount of the interruption can be used as the basis for correction.
[0060] In some embodiments, when the image acquisition is interrupted, the product being acquired may move. Therefore, image correction is required after image acquisition is completed. Figure 3 It is an optional processing flow schematic diagram of the image acquisition method provided by the embodiments of the present disclosure. As Figure 3 shown, the image acquisition method further includes:
[0061] Step S61: After image acquisition is completed, divide the image into a first image and a second image according to the count value of the interruption, where the image acquired before the interruption is the first image, and the image acquired after the interruption is the second image; extract and compare the feature points of the first image and the second image. When the number of matching feature points meets the set number, determine that the image stitched by the first image and the second image is the required image.
[0062] For example, image feature extraction is performed through the SURF image algorithm. For example, when the number of matching feature points between the first image and the second image meets the requirement, that is, there is sufficient field of view intersection, it indicates that the first image and the second image are consecutive images, and the image stitched by the first image and the second image is the required image.
[0063] In some embodiments, the image acquisition method further includes:
[0064] Step S62: When the number of matching feature points is less than the set number, set a new interrupted count value, and the motion structure starts to move at the same row number as the new interrupted count value of the image; determine a new second image according to the new interrupted count value, extract and compare the feature points of the first image and the new second image; when the number of matching feature points meets the set number, determine that the image stitched by the first image and the new second image is the required image.
[0065] For example, when there is not enough field of view intersection for the number of matching feature points, set a new interrupted count value, and determine a new second image according to the new interrupted count value. For example, move the motion structure back a certain distance, and calculate the new interrupted count value according to the backward distance, unit pixel distance, and interrupted count value. The calculation formula is as follows:
[0066] New interrupted count value = interrupted count value - backward distance / unit pixel distance;
[0067] If the feature points of the new second image still cannot meet the matching number requirement, the motion structure moves back a certain distance again, and recalculates the new interrupted count value and the new second image until the feature points meet the matching number requirement.
[0068] For example, after determining the new interrupted count value, calculate the common part between the first image and the new second image. When stitching the required image, overlap the common part of the first image and the new second image for stitching into a complete and non-repetitive required image.
[0069] For example, based on the algorithm in the Opencv library, calculate the new second image. For example, use the findHomography function to obtain the transformation matrix H, and use the perspective transformation method to transform and obtain the new second image.
[0070] Figure 4 It is a schematic diagram of the composition structure of the image acquisition device provided by the embodiments of the present disclosure. As Figure 4As shown in the figure, an image acquisition device 400 is provided in an embodiment of the present disclosure, which is used for an image device to acquire image information. The image device is connected to a connection motion structure for driving its movement. The device includes: a start / stop module 410, an acquisition module 420, and a calculation module 430. The start / stop module is configured to start image acquisition. The acquisition module is configured to acquire the unit pixel distance, acquire image data, and acquire the moving distance when the movement of the motion structure is interrupted. The calculation module is configured to determine the interrupted count value according to the moving distance and the unit pixel distance.
[0071] In some embodiments, the calculation module is further configured to perform counting synchronously when acquiring each row of image data and save it as the count value of the number of rows. The start / stop module is further configured to compare the count value of the number of rows with the preset value of the number of rows. When the two are the same, image acquisition is stopped.
[0072] In some embodiments, the calculation module is further configured to compare the count value of the number of rows with the interrupted count value before continuing image acquisition. When the two are different, the count value of the number of rows is updated to the interrupted count value.
[0073] In some embodiments, an image division module and a feature comparison module are further included. The image division module is configured to divide the image into a first image and a second image according to the interrupted count value after image acquisition is completed. Among them, the image acquired before the interruption is the first image, and the image acquired after the interruption is the second image. The feature comparison module is configured to extract and compare the feature points of the first image and the second image. When the matching number of the feature points meets the set number, it is determined that the image stitched by the first image and the second image is the required image.
[0074] In some embodiments, a setting module is further included. The setting module is configured to set a new interrupted count value when the matching number of the feature points is less than the set number, and the motion structure starts to move at the row number of the image that is the same as the new interrupted count value. The image division module is further configured to determine a new second image according to the new interrupted count value. The feature comparison module is configured to extract and compare the feature points of the first image and the new second image. When the matching number of the feature points meets the set number, it is determined that the image stitched by the first image and the new second image is the required image.
[0075] In some embodiments, the acquisition module is further configured to calculate the actual distance corresponding to each pixel on the plane where the motion structure is located according to the pixel value of the image device. The calculation module is further configured to calculate the actual distance corresponding to each pixel on the plane where the motion structure is located.
[0076] In some embodiments, the acquisition module is further configured to trigger the encoder to send a pulse signal to the image device every time the motion structure moves the unit pixel distance, and the image device triggers one row of image exposure to acquire one row of image data of the exposed image device.
[0077] It should be noted that the description of the image acquisition device in the embodiments of the present disclosure is similar to the description of the above image acquisition method embodiments, and has similar beneficial effects to the method embodiments, so details will not be repeated. For the technical details not described in the image acquisition device provided in the embodiments of the present disclosure, they can be understood according to Figures 1 to 3 the description of any one of the drawings.
[0078] The following describes the exemplary applications of the electronic device provided in the embodiments of the present disclosure. The electronic device provided in the embodiments of the present disclosure can be implemented as an electronic device, and the electronic device can be a server or a terminal device.
[0079] Figure 5 is a schematic hardware structure diagram of the electronic device provided in the embodiments of the present disclosure. Figure 5 The illustrated electronic device 500 includes: at least one processor 510, a memory 550, and a bus 540; each component in the electronic device 500 is coupled together through the bus 540. It can be understood that the bus 540 is used to realize the connection and communication between these components. In addition to the data bus, the bus 540 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in Figure 5 all kinds of buses are labeled as bus 540.
[0080] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0081] The memory 550 stores executable instructions for implementing the image acquisition method provided in the embodiments of the present disclosure, and the image acquisition method can be implemented by Figure 4 the start / stop module 410, the acquisition module 420, and the calculation module 430 in the illustrated image acquisition device; the memory 550 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memories, hard disk drives, optical disc drives, etc. The memory 550 optionally includes one or more storage devices that are physically located away from the processor 510.
[0082] In some embodiments, the memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof.
[0083] In some embodiments, the electronic device 500 may further include:
[0084] An operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0085] A network communication module 552 for reaching other computing devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), etc.
[0086] Embodiments of the present disclosure provide a computer-readable storage medium storing executable instructions, where the executable instructions, when executed by a processor, will cause the processor to execute the image acquisition method provided by the embodiments of the present disclosure. For example, as Figures 1 to 3 shown in the image acquisition method.
[0087] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0088] In some embodiments, the executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0089] For example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one location, or alternatively, on multiple computing devices distributed at multiple locations and interconnected via a communication network.
[0090] Embodiments of the present disclosure provide a computer program product, the computer program product including a computer program / instructions, and the computer program / instructions, when executed by a processor, implement the image acquisition method of the present disclosure.
[0091] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0092] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present disclosure, "a plurality" means two or more, unless otherwise specifically defined.
[0093] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present disclosure, and all of them should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims
1. An image acquisition method for an image device to acquire image information, the image device being connected to a connection motion structure for driving its movement, characterized in that, The method includes: Obtaining the unit pixel distance; Starting image acquisition. The moving structure starts to move from the starting row of the image, and for each movement of the unit pixel distance, one row of image data is obtained; Obtaining the moving distance when the movement of the moving structure is interrupted, and determining the interrupted count value according to the moving distance and the unit pixel distance; Continuing image acquisition. The moving structure starts to move from the row number of the image that is the same as the interrupted count value, and for each movement of the unit pixel distance, one row of image data is obtained.
2. The image acquisition method according to claim 1, wherein The method further includes: When obtaining one row of image data, synchronously performing counting and saving it as the count value of the row number; Comparing the count value of the row number with the preset value of the row number. When the two are the same, stop image acquisition.
3. The image acquisition method according to claim 2, wherein The method further includes: Before continuing image acquisition, comparing the count value of the row number with the interrupted count value. When the two are different, updating the count value of the row number to the interrupted count value.
4. The image acquisition method according to claim 1, wherein The method further includes: After image acquisition is completed, dividing the image into a first image and a second image according to the interrupted count value, where the image acquired before the interruption is the first image, and the image acquired after the interruption is the second image; Extracting and comparing the feature points of the first image and the second image. When the number of matching feature points meets the set number, determining that the image stitched by the first image and the second image is the required image.
5. The image acquisition method according to claim 4, characterized in that, The method further includes: When the number of matching feature points is less than the set number, setting a new interrupted count value, and the moving structure starts to move from the row number of the image that is the same as the new interrupted count value; Determining a new second image according to the new interrupted count value, extracting and comparing the feature points of the first image and the new second image; When the number of matching feature points meets the set number, determining that the image stitched by the first image and the new second image is the required image.
6. The image acquisition method according to any one of claims 1 to 5, characterized in that, The obtaining of the unit pixel distance includes: According to the pixel value of the image device, calculating the actual distance corresponding to each pixel in the plane where the moving structure is located.
7. The image acquisition method according to any one of claims 1 to 5, characterized in that, For each movement of the unit pixel distance, obtaining one row of image data includes: For each movement of the unit pixel distance by the moving structure, triggering the encoder to send a pulse signal to the image device, and the image device triggers one row of image exposure to obtain one row of image data of the exposed image device.
8. An image acquisition device is used for an image device to acquire image information. The image device is connected to a connecting motion structure for driving its movement, and is characterized in that, The device includes: a start-stop module, an acquisition module, and a calculation module; The start-stop module is configured to start image acquisition; The acquisition module is configured to obtain the unit pixel distance, one row of image data corresponding to each movement of the unit pixel distance by the moving structure starting from the starting row of the image, and the moving distance when the movement of the moving structure is interrupted; The calculation module is configured to determine the interrupted count value according to the moving distance and the unit pixel distance; The start-stop module is further configured to restart image acquisition; The obtaining module is further configured to obtain one line of image data corresponding to each movement of the unit pixel distance when the motion structure starts to move from the row where the image and the interrupted count value are the same.
9. An electronic device, characterized in that, The electronic device includes: a processor, a memory, and a bus; the memory stores executable instructions; the processor communicates with the memory through the bus, and when the processor executes the executable instructions stored in the memory, implements the image acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Stored with executable instructions, which are used to implement the image acquisition method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
Moving object shooting method based on mobile terminal, and mobile terminal
CN105847662A
Workpiece detection method, system and equipment and storage medium
CN113777109A