Method, device, equipment and medium for measuring distance between image acquisition device and spray head
By obtaining the printing position and center coordinates of the calibration map, the distance between the image acquisition device and the printhead is calculated, which solves the problem of inaccurate distance between the camera and the printhead and improves the precision and positional accuracy of inkjet printing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HOSONSOFT CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the distance between the camera and the printhead is not accurately measured manually or mechanically, which affects the positional accuracy of inkjet printing.
By obtaining the printing position of the calibration map, the image acquisition device is controlled to acquire the image of the calibration map and perform calibration. The center coordinates of the calibration mark are identified, the distance between the image acquisition device and the nozzle is calculated, and the distance is measured using the formula H=(Y2+(ImgH-Y0-H0/2-Edge))-Y1.
Accurately measuring the distance between the camera and the printhead improves printing precision, reduces labor costs, and ensures accurate printing position.
Smart Images

Figure CN121916784A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inkjet printing technology, and in particular to a method, apparatus, device, and medium for measuring the distance between an image acquisition device and a printhead. Background Technology
[0002] The inkjet printing industry utilizes precise delivery technology for tiny ink droplets to reproduce high-definition images and text on printing media. Its applications are wide-ranging, from home photo printing to large-format advertising output. With the development of environmentally friendly inks and high-efficiency printheads, the industry continues to develop towards green, high-speed, and high-resolution technologies to meet the market's growing demand for personalized and instant printing.
[0003] In the inkjet printing industry, high-precision positioning is one of the key factors to ensure print quality. If there is an error in the position of the camera and the printhead, the position of the printed pattern will be inaccurate. Therefore, it is often necessary to measure the distance between the camera and the printhead. Traditional measurement methods often rely on manual visual inspection or use mechanical tools to directly measure the relative positions between key components, such as the distance between the camera and the printhead. However, manual measurement is bound to have errors, and these errors will affect the scanning and recognition to generate the printed image, thus causing the problem of inaccurate position of the printed image. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, device and medium for measuring the distance between an image acquisition device and a printhead, in order to solve the problem in the prior art where the distance between the camera and the printhead is inaccurate when measured manually or mechanically, thus affecting the accuracy of the printing position.
[0005] The technical solution adopted in this invention is:
[0006] In a first aspect, the present invention provides a method for measuring the distance between an image acquisition device and a nozzle, the method comprising:
[0007] Obtain the position of the first row of printed data on the calibration plot and record it as the first print position;
[0008] The image acquisition device is controlled to acquire the image of the calibration map and obtain the position of the calibration map in the Y-axis direction, where the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction;
[0009] The acquired image is calibrated to obtain the target image;
[0010] Based on the target image, identify the calibration markers in the target image and obtain the center coordinates of the calibration markers in the target image;
[0011] Based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates, the distance between the image acquisition device and the nozzle is obtained.
[0012] Preferably, the step of obtaining the position of the first row of printed data of the calibration diagram, denoted as the first print position, includes:
[0013] Obtain the print bitmap corresponding to the calibration map, wherein the form of the calibration mark in the print bitmap includes, but is not limited to, dots, color blocks or crosses;
[0014] The calibration map is obtained by printing the bitmap onto a printing medium.
[0015] Place the calibration diagram on the printing platform;
[0016] Obtain the position of the ink dots in the first row of the calibration diagram in the Y-axis direction, and record it as the first printing position.
[0017] Preferably, the control image acquisition device acquires the acquired image of the calibration map and acquires the position of the calibration map in the Y-axis direction, wherein the X-axis direction is the printing direction, and the Y-axis direction is perpendicular to the printing direction, including:
[0018] Control the calibration map to move within the shooting range of the image acquisition device;
[0019] The image acquisition device is controlled to acquire images of the calibration map;
[0020] Record the position of the calibration map in the Y-axis direction when acquiring images.
[0021] Preferably, calibrating the acquired image to obtain the target image includes:
[0022] Corner detection is performed on the acquired image to obtain the actual position of the calibration mark in the acquired image;
[0023] The distortion parameters are obtained based on the actual position and theoretical position of the calibration mark in the acquired image;
[0024] The acquired image is calibrated based on the distortion parameters to obtain the target image.
[0025] Preferably, the step of identifying the calibration mark in the target image and obtaining the center coordinates of the calibration mark in the target image includes:
[0026] The target image is calibrated and identified using a template matching algorithm to obtain the calibration identifier in the target image.
[0027] The center coordinates of the calibration mark in the target image are obtained based on the calibration mark in the target image.
[0028] Preferably, obtaining the distance between the image acquisition device and the printhead based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates includes:
[0029] The distance H between the image acquisition device and the printhead is calculated using the formula: H = (Y2 + (ImgH - Y0 - H0 / 2 - Edge)) - Y1, where Y2 is the position of the calibration map in the Y-axis direction, ImgH is the height of the target image, Y0 is the ordinate of the center coordinate, H0 is the diameter of the calibration mark, Edge is the invalid boundary of the target image, and the invalid boundary is the length of the gap between the calibration mark and the boundary of the calibration map, and Y1 is the first printing position.
[0030] Preferably, the method for measuring the distance between the image acquisition device and the nozzle further includes:
[0031] Based on the distance between the image acquisition device and the printhead, printhead parameter compensation values are obtained, wherein the printhead parameter compensation values include ink jet volume and ink jet speed.
[0032] Based on the printhead parameter compensation value, the printhead parameters are adjusted. When the spacing increases, the ink volume and ink speed of the printhead are reduced; when the spacing decreases, the ink volume and ink speed of the printhead are increased to obtain the target printing parameters.
[0033] Inkjet printing is performed according to the target printing parameters.
[0034] Secondly, the present invention provides an image acquisition device and a nozzle spacing device, the device comprising:
[0035] First print position acquisition module; used to acquire the position of the first row of print data of the calibration diagram, denoted as the first print position;
[0036] Calibration map position acquisition module: used to control the image acquisition device to acquire the acquired image of the calibration map and obtain the position of the calibration map in the Y-axis direction, where the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction;
[0037] Calibration module: used to calibrate the acquired image to obtain the target image;
[0038] Center target acquisition module: used to identify the calibration mark in the target image based on the target image, and obtain the center coordinates of the calibration mark in the target image;
[0039] Spacing acquisition module: used to acquire the spacing between the image acquisition device and the nozzle based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates.
[0040] Thirdly, embodiments of the present invention also provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.
[0041] Fourthly, embodiments of the present invention also provide a storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method of the first aspect described above.
[0042] In summary, the beneficial effects of the present invention are as follows:
[0043] The present invention provides a method, apparatus, device, and medium for measuring the distance between an image acquisition device and a printhead. First, the position of the first row of printing data on the calibration map is acquired and denoted as the first printing position. The image acquisition device is then controlled to acquire an image of the calibration map and its position along the Y-axis. The acquired image is calibrated to obtain a target image. Based on the target image, calibration markers are identified, and the center coordinates of these markers are obtained. Finally, the distance between the image acquisition device and the printhead is determined based on the first printing position, the position of the calibration map along the Y-axis, and the center coordinates. This invention solves the problem in the prior art where inaccurate manual or mechanical measurement of the distance between the camera and the printhead affects the accuracy of the printing position. It accurately measures the distance between the camera and the printhead, further improving printing accuracy and significantly reducing labor costs. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.
[0045] Figure 1 This is a schematic diagram showing the positional relationship between the camera and the nozzle in Embodiment 1 of the present invention;
[0046] Figure 2 This is a flowchart illustrating the method for measuring the distance between the image acquisition device and the nozzle in Embodiment 1 of the present invention.
[0047] Figure 3 This is a flowchart illustrating the method for obtaining the first row of nozzles in Embodiment 1 of the present invention;
[0048] Figure 4 This is a flowchart illustrating the method for obtaining the coordinates of the calibration mark center in Embodiment 1 of the present invention;
[0049] Figure 5This is a schematic diagram of the calibration image in Embodiment 1 of the present invention;
[0050] Figure 6 This is a structural block diagram of the image acquisition device and the nozzle spacing device in Embodiment 3 of the present invention;
[0051] Figure 7 This is a schematic diagram of the electronic device in Embodiment 4 of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, the element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Where there is no conflict, embodiments of the present invention and the various features thereof can be combined with each other, all of which are within the scope of protection of the present invention.
[0053] Example 1
[0054] like Figure 1 As shown in the figure, this is a top view of the positional relationship between the camera and the printhead. It illustrates the positional relationship between the camera and the printhead. A printhead assembly, consisting of multiple printheads, is mounted on the printer beam. The camera is positioned on either side of the printhead assembly. A drive unit moves the printhead assembly along the beam to complete inkjet printing on media of different sizes. The distance between the camera and the printhead assembly refers to the distance between the first row of printheads in the printhead assembly and the bottom of the camera's effective field of view along the Y-axis. Here, the X-axis is the printing direction, and the Y-axis is the direction perpendicular to the X-axis.
[0055] Please see Figure 2 Embodiment 1 of the present invention discloses a method for measuring the distance between an image acquisition device and a nozzle, the method comprising:
[0056] S1: Obtain the position of the first row of printed data in the calibration plot, and record it as the first print position;
[0057] Specifically, firstly, a print bitmap of the desired style is generated on the printing software, and then a calibration map containing calibration marks is printed on the printing platform. The calibration map is used to locate the printing position to achieve accurate printing. The style of the calibration marks on the calibration map can be designed as easily recognizable patterns such as circles, crosses, or color blocks of specific colors. There is no limitation on the style of the calibration marks. The calibration marks are used for positioning, and there is no limitation on the number of calibration marks. There can be one, one row, or multiple rows. In this embodiment, the calibration marks on the calibration map are circular. The height of the calibration marks has been determined when designing the calibration map. During the printing process, the printing software records the accurate position of the first row of calibration mark printing data on the Y-axis. This position is recorded as the position of the first row of nozzles in the nozzle group, providing a starting reference for subsequent measurements.
[0058] In one embodiment, please refer to Figure 3 S1: Obtaining the position of the first row of printed data in the calibration diagram, denoted as the first printed position, includes:
[0059] S11: Obtain the print bitmap corresponding to the calibration map, wherein the form of the calibration mark in the print bitmap includes, but is not limited to, dots, color blocks or crosses;
[0060] S12: Print the bitmap onto a printing medium to obtain the calibration map;
[0061] S13: Place the calibration diagram on the printing platform;
[0062] S14: Obtain the position of the ink dots in the first row of the calibration diagram in the Y-axis direction, and record it as the first printing position.
[0063] Specifically, the calibration map serves to help determine the camera's intrinsic parameters and extrinsic position through fixed patterns or markings, in order to correct lens distortion and establish a precise correspondence between pixels and actual spatial coordinates, thereby improving the accuracy of measurement and positioning. The calibration map includes calibration marks, which can be designed as easily recognizable patterns such as circles, crosses, or color blocks of specific colors. The calibration marks are arranged on the calibration map according to a certain rule. In this embodiment, the calibration marks in the calibration map are dots. The number of calibration marks in the calibration map is not limited; there can be one or more. The height H0 of the calibration marks is preset, which is the diameter of the dots. The calibration map is printed onto a printing medium, which can be paper. The printed calibration map is placed on a printing platform, which can be a flat plate or a rewind tape. During the printing of the calibration map, the position Y1 of the first row of printed ink dots in the Y-axis direction is obtained. Since the first row of printed ink dots corresponds to the first row of nozzles in the nozzle group, this position is also the position of the first row of nozzles in the Y-axis direction.
[0064] S2: Control the image acquisition device to acquire the acquired image of the calibration map and acquire the position of the calibration map in the Y-axis direction, where the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction;
[0065] Specifically, the image acquisition device can be a camera. The calibration map is placed on a printing platform, and the printing platform is moved manually or by the printing system to a position within the camera's field of view. Specifically, the printing platform is moved along the Y-axis to a position below the camera, so that the calibration map is within the camera's shooting range. At this time, the camera is controlled to acquire the image of the calibration map and record the Y-axis coordinates of the calibration map at this time for use as a reference for subsequent measurements and calculations.
[0066] In one embodiment, S2: controlling the image acquisition device to acquire the acquired image of the calibration map and acquire the position of the calibration map in the Y-axis direction, wherein the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction includes:
[0067] S21: Control the calibration map to move within the shooting range of the image acquisition device;
[0068] S22: Control the image acquisition device to acquire the image of the calibration map;
[0069] S23: Record the position of the calibration map in the Y-axis direction when acquiring images.
[0070] Specifically, a calibration map is placed on the printing platform. The printing platform is controlled to move towards the camera, until it is positioned below the camera. This means that the Y-axis coordinates of the calibration map on the printing platform are the same as the Y-axis coordinates of the camera. At this point, the calibration map can effectively enter the camera's shooting range. The camera is then controlled to acquire images of a portion of the calibration map or the entire calibration map as the acquired image. The Y-axis coordinates Y2 of the calibration map at this point are recorded and used as a reference for subsequent measurements and calculations. By acquiring the image of the calibration map and confirming the positional relationship between the camera and the calibration map, the distance between the camera and the printhead can be calculated more easily.
[0071] S3: Calibrate the acquired image to obtain the target image;
[0072] Specifically, in inkjet printing production scenarios, various factors can cause uneven lighting during camera capture, leading to distortion in the resulting images. Furthermore, the original image captured by the camera may also be affected by lens distortion. Therefore, image processing algorithms are needed to calibrate the captured images. This calibration process corrects these distortions, ensuring that each pixel in the image maintains the same distance as in the real world, thus obtaining a more accurate target image. This provides a precise foundation for subsequent calibration and identification. Distortion calibration methods include calibration board methods, self-calibration methods, and deep learning. Since calibration images with printed calibration marks are already provided, this embodiment uses the calibration board method to calibrate the captured images, reducing implementation complexity and offering high calibration accuracy.
[0073] In one embodiment, step S3: calibrating the acquired image to obtain the target image includes:
[0074] S31: Perform corner detection on the acquired image to obtain the actual position of the calibration mark in the acquired image;
[0075] S32: Obtain the distortion parameters based on the actual position and theoretical position of the calibration mark in the acquired image;
[0076] S33: Perform distortion calibration on the acquired image according to the distortion parameters to obtain the target image.
[0077] Specifically, the method of image calibration using calibration maps as calibration tools can employ corner detection algorithms. First, the corner detection algorithm automatically identifies calibration marks on the calibration map. Based on the actual positions of these points in the image and the theoretical positions of the calibration marks, the deviation of their pixel positions in the image is calculated to obtain the radial distortion parameters (e.g., k1, k2, k3) and tangential distortion parameters (p1, p2) of the lens. Based on these parameters, a distortion model is established. This model is then used to perform inverse distortion correction on the original calibration map image, that is, to remove barrel or pincushion distortion in the image through mathematical transformations, restoring the true geometric shape of the image. After distortion calibration is completed, the corner detection algorithm is performed again to check whether the distortion has been eliminated. If it has been eliminated, the image of the calibration map after distortion calibration is used as the target image. This method improves the accuracy of identifying calibration marks in the calibration map.
[0078] S4: Based on the target image, identify the calibration mark in the target image and obtain the center coordinates of the calibration mark in the target image;
[0079] Specifically, image recognition algorithms can be applied to the calibrated target image to identify calibration markers in the image. For example, Hough transform, template matching, edge detection, or machine learning classifiers can be used to automatically identify each calibration marker and calculate the center coordinates of the calibration marker. These center coordinates represent their two-dimensional positions in the image and are used as a reference for subsequent measurements and calculations.
[0080] In one embodiment, such as Figure 4 As shown, step S4: Based on the target image, identifying the calibration marker in the target image and obtaining the center coordinates of the calibration marker in the target image includes:
[0081] S41: Use a template matching algorithm to perform calibration and identification on the target image to obtain the calibration identifier in the target image;
[0082] S42: Obtain the center coordinates of the calibration mark in the target image based on the calibration mark in the target image.
[0083] Specifically, image recognition methods for target scan images include Hough transform, template matching algorithms, edge detection algorithms, or machine learning classifiers. These methods can identify calibration markers from target images. Taking dots as an example, this example uses template matching to identify dots in the calibration image. First, the image is preprocessed by converting it to grayscale and filtering it to reduce noise in the calibration image. Then, the calibration markers in the target image are identified using the template matching algorithm. A template with the same origin as the calibration image is selected, and then the calibration image in the target image is matched using the template matching algorithm. After identifying the calibration markers in the target image, the coordinates of the center of the calibration marker are calculated based on these points through coordinate matching, such as... Figure 5 As shown, this is a calibration marker in the target image. The center coordinates of the calibration marker are (X0, Y0), and Edge is the distance between the cut edge of the calibration marker and the image boundary, that is, the distance from the dashed line in the figure to the image boundary.
[0084] S5: Based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates, obtain the distance between the image acquisition device and the nozzle.
[0085] Specifically, using all the parameters mentioned above, including the first printing position (i.e., the position of the first row of the printhead), the position of the calibration map in the Y-axis direction, and the center coordinates, the distance between the camera and the printhead is calculated according to the formula: H = (Y2 + (ImgH - Y0 - H0 / 2 - Edge)) - Y1, where ImgH is the height of the target image, Y2 is the position of the calibration map in the Y-axis direction, Y0 is the ordinate of the center coordinates of the calibration mark, H0 is the diameter of the calibration mark, Edge is the invalid boundary of the target image (i.e., the length of the gap between the calibration mark and the boundary, which can be 0), and Y1 is the position of the first row of the printhead in the Y-axis direction. By taking the absolute value, the obtained distance is ensured to be positive, accurately determining the distance between the camera and the printhead. Based on this distance, the distance between the camera and the printhead is adjusted to achieve the preset distance requirements, solving the problem of Y-direction deviation between the camera installation and the printhead, further improving the accuracy of image scanning and printing, and overall improving the printing quality.
[0086] In summary, this embodiment provides a method for measuring the distance between an image acquisition device and a printhead. First, the position of the first row of printing data on the calibration map is obtained, denoted as the first printing position. The image acquisition device is then controlled to acquire the image of the calibration map and obtain its position along the Y-axis, where the X-axis is the printing direction and the Y-axis is perpendicular to the printing direction. The acquired image is calibrated to obtain a target image. Based on the target image, calibration markers in the target image are identified, and the center coordinates of these markers are obtained. Finally, the distance between the image acquisition device and the printhead is obtained based on the first printing position, the position of the calibration map along the Y-axis, and the center coordinates. This embodiment solves the problem in the prior art where manual or mechanical measurement of the distance between the camera and the printhead is inaccurate, thus affecting the accuracy of the printing position. It provides an automatic method for measuring the distance between the camera and the printhead, accurately measuring the distance between them, further improving printing accuracy, and avoiding the risk of errors in manual measurement.
[0087] Example 2
[0088] After calculating the distance between the camera and the printhead, if the distance does not conform to the preset distance, the printing parameters of the printhead can be adjusted to achieve the same printing effect as expected. The method for measuring the distance between the image acquisition device and the printhead also includes:
[0089] S6: Based on the distance between the image acquisition device and the printhead, obtain the printhead parameter compensation value, wherein the printhead parameter compensation value includes ink injection volume and ink injection speed;
[0090] S7: Adjust the printhead parameters according to the printhead parameter compensation value. When the spacing increases, reduce the ink ejection volume and ink ejection speed of the printhead; when the spacing decreases, increase the ink ejection volume and ink ejection speed of the printhead to obtain the target printing parameters.
[0091] S8: Perform inkjet printing according to the target printing parameters.
[0092] Specifically, the automatic measurement of the relative distance between the camera and the printhead allows the control system to dynamically adjust printing parameters such as ink volume, speed, and direction to compensate for changes in ink distribution caused by distance variations. This ensures consistent print quality and pattern integrity at different heights or angles. The specific implementation process is as follows: the automatically measured distance between the camera and printhead is compared with a standard distance, and the required compensation value is automatically calculated. If the distance increases, to maintain the correct landing point of ink droplets on the printing medium and pattern integrity, the control system will reduce the ink volume of the printhead, thereby slightly reducing the volume of each ink droplet to prevent excessive ink droplet diffusion due to the greater distance; the jetting speed is adjusted to ensure sufficient flight time for ink droplets to land accurately even at increased distances; and the direction is finely adjusted based on the calculation of distance and printhead angle to reduce pattern deformation caused by angular deviations. If the distance decreases, the inkjet volume and speed of the printhead are increased to ensure printing accuracy. The adjusted printing parameters are used as the target printing parameters, and inkjet printing is performed according to the target printing parameters. This method can adaptively adjust the inkjet parameters according to the distance between the printhead and the camera to achieve the ideal inkjet printing effect.
[0093] Example 3
[0094] Please see Figure 6 Embodiment 3 of the present invention also provides a measuring image acquisition device and a nozzle spacing device 200, the device comprising:
[0095] First print position acquisition module 201; used to acquire the position of the first row of print data of the calibration diagram, denoted as the first print position;
[0096] Calibration map position acquisition module 202: used to control the image acquisition device to acquire the acquired image of the calibration map and acquire the position of the calibration map in the Y-axis direction, wherein the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction;
[0097] Calibration module 203: used to calibrate the acquired image to obtain the target image;
[0098] Center target acquisition module 204: used to identify the calibration mark in the target image based on the target image, and obtain the center coordinates of the calibration mark in the target image;
[0099] Spacing acquisition module 205: used to acquire the spacing between the image acquisition device and the nozzle based on the first printing position, the position of the calibration map in the Y-axis direction and the center coordinates.
[0100] Specifically, this embodiment provides a device for measuring the distance between an image acquisition device and a printhead. The first printing position acquisition module of the device is used to acquire the position of the first row of printing data on the calibration map, denoted as the first printing position. The calibration map position acquisition module is used to control the image acquisition device to acquire the acquired image of the calibration map and acquire the position of the calibration map in the Y-axis direction. The calibration module is used to calibrate the acquired image to obtain a target image. The center target acquisition module is used to identify the calibration mark in the target image based on the target image and acquire the center coordinates of the calibration mark in the target image. The distance acquisition module is used to acquire the distance between the image acquisition device and the printhead based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates. This solves the problem in the prior art where inaccurate manual or mechanical measurement of the distance between the camera and the printhead affects the accuracy of the printing position, thus accurately measuring the distance between the camera and the printhead and further improving printing accuracy.
[0101] Example 4
[0102] In addition, combined Figure 1 The image acquisition device and nozzle spacing method described in Embodiment 1 of the present invention can be implemented by electronic devices. Figure 7 A schematic diagram of the hardware structure of the electronic device provided in Embodiment 4 of the present invention is shown.
[0103] Electronic devices may include processors and memory storing computer program instructions.
[0104] Specifically, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0105] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0106] The processor reads and executes computer program instructions stored in the memory to implement any of the methods for measuring the distance between the image acquisition device and the nozzle in the above embodiments.
[0107] In one example, the electronic device may also include a communication interface and a bus. For example, Figure 7 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.
[0108] The communication interface is mainly used to enable communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0109] A bus, including hardware, software, or both, couples components of the device together. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, a bus may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.
[0110] Example 5
[0111] In addition, in conjunction with the image acquisition device and nozzle spacing method in Embodiment 1 above, Embodiment 5 of the present invention can also provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any one of the image acquisition device and nozzle spacing methods in the above embodiments.
[0112] In summary, the embodiments of the present invention provide a method, apparatus, device, and medium for measuring the distance between an image acquisition device and a nozzle.
[0113] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0114] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0115] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0116] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for measuring the distance between an image acquisition device and a nozzle, characterized in that, The method includes: Obtain the position of the first row of printed data on the calibration plot and record it as the first print position; The image acquisition device is controlled to acquire the image of the calibration map and obtain the position of the calibration map in the Y-axis direction, where the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction; The acquired image is calibrated to obtain the target image; Based on the target image, identify the calibration markers in the target image and obtain the center coordinates of the calibration markers in the target image; Based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates, the distance between the image acquisition device and the nozzle is obtained.
2. The method for measuring the distance between the image acquisition device and the nozzle according to claim 1, characterized in that, The location where the first row of printed data of the calibration map is obtained, denoted as the first print position, includes: Obtain the print bitmap corresponding to the calibration map, wherein the form of the calibration mark in the print bitmap includes, but is not limited to, dots, color blocks or crosses; The calibration map is obtained by printing the bitmap onto a printing medium. Place the calibration diagram on the printing platform; Obtain the position of the ink dots in the first row of the calibration diagram in the Y-axis direction, and record it as the first printing position.
3. The method for measuring the distance between the image acquisition device and the nozzle according to claim 2, characterized in that, The control image acquisition device acquires the acquired image of the calibration map and obtains the position of the calibration map in the Y-axis direction, wherein the X-axis direction is the printing direction, and the Y-axis direction is perpendicular to the printing direction, including: Control the calibration map to move within the shooting range of the image acquisition device; The image acquisition device is controlled to acquire images of the calibration map; Record the position of the calibration map in the Y-axis direction when acquiring images.
4. The method for measuring the distance between the image acquisition device and the nozzle according to claim 3, characterized in that, The calibration of the acquired image to obtain the target image includes: Corner detection is performed on the acquired image to obtain the actual position of the calibration mark in the acquired image; The distortion parameters are obtained based on the actual position and theoretical position of the calibration mark in the acquired image; The acquired image is calibrated based on the distortion parameters to obtain the target image.
5. The method for measuring the distance between the image acquisition device and the nozzle according to claim 4, characterized in that, The step of identifying the calibration mark in the target image and obtaining the center coordinates of the calibration mark in the target image includes: The target image is calibrated and identified using a template matching algorithm to obtain the calibration identifier in the target image. The center coordinates of the calibration mark in the target image are obtained based on the calibration mark in the target image.
6. The method for measuring the distance between the image acquisition device and the nozzle according to claim 1, characterized in that, The step of obtaining the distance between the image acquisition device and the printhead based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates includes: calculating the distance H between the image acquisition device and the printhead, with the calculation formula as: H = (Y2 + (ImgH - Y0 - H0 / 2 - Edge)) - Y1, where Y2 is the position of the calibration map in the Y-axis direction, ImgH is the height of the target image, Y0 is the ordinate of the center coordinates, H0 is the diameter of the calibration mark, Edge is the invalid boundary of the target image, the invalid boundary is the length of the gap between the calibration mark and the boundary of the calibration map, and Y1 is the first printing position.
7. The method for measuring the distance between the image acquisition device and the nozzle according to claim 1, characterized in that, The method further includes: Based on the distance between the image acquisition device and the printhead, printhead parameter compensation values are obtained, wherein the printhead parameter compensation values include ink jet volume and ink jet speed. Based on the printhead parameter compensation value, the printhead parameters are adjusted. When the spacing increases, the ink volume and ink speed of the printhead are reduced; when the spacing decreases, the ink volume and ink speed of the printhead are increased to obtain the target printing parameters. Inkjet printing is performed according to the target printing parameters.
8. A device for measuring image acquisition and a nozzle spacing device, characterized in that, The device includes: First print position acquisition module; used to acquire the position of the first row of print data of the calibration diagram, denoted as the first print position; Calibration map position acquisition module: used to control the image acquisition device to acquire the acquired image of the calibration map and obtain the position of the calibration map in the Y-axis direction, where the X-axis direction is the printing direction and the Y-axis direction is perpendicular to the printing direction; Calibration module: used to calibrate the acquired image to obtain the target image; Center target acquisition module: used to identify the calibration mark in the target image based on the target image, and obtain the center coordinates of the calibration mark in the target image; Spacing acquisition module: used to acquire the spacing between the image acquisition device and the nozzle based on the first printing position, the position of the calibration map in the Y-axis direction, and the center coordinates.
9. An electronic device, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-7.
10. A storage medium storing computer program instructions thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.