Image length calculation method
By counting the number of photosensitive chips spanned by the target object in the contact image sensor and calculating the carrier length, end length and optical hole spacing, the problem of sharp increase in error when CIS measures a longer target object is solved, and higher calculation accuracy is achieved.
Patent Information
- Application Number
- PCT/CN2024/114947
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-02
- Filing Date
- 2024-08-28
- Publication Date
- 2025-05-08
AI Technical Summary
When measuring the length of the target object using a contact image sensor (CIS), there are random errors due to photosensitive chip assembly errors, especially when measuring a longer target object, the error increases dramatically.
A method for calculating image length is proposed. By counting the number of photosensitive chips that the target object completely spans along the scanning direction, and using parameters such as the carrier length, the length of the end part of the target object spans the photosensitive chip, and the spacing of the light holes, the image length is calculated according to the specific formula, so that the direct calculation of the number of photosensitive chips multiplied by the spacing is avoided.
The random error problem caused by assembly error is effectively solved, and the calculation accuracy of image length is significantly improved, especially when measuring longer target objects.
Smart Images

Figure CN2024114947_08052025_PF_FP_ABST
Abstract
Description
A method for calculating image length Technical Field
[0001] The present application belongs to the field of optical scanning image processing technology, and further relates to a technology for processing images scanned by a contact image sensor. Specifically, a method for calculating image length is provided. Background Art
[0002] In industrial manufacturing and other applications, it is necessary to accurately measure the length of the target object. With the development of automation technology and the need to improve efficiency, the method of automatically measuring the length of the target object has been adopted in more and more production and manufacturing processes.
[0003] A common method for automated object measurement is to scan the object using a CIS (Contact Image Sensor) module, or a contact image scanning device comprised of multiple CIS modules, and then calculate the object's length based on the scanned image. Because CIS modules can scan objects proportionally, CIS-based scanning devices can calculate the object's dimensions without the need for a reference object or scaling.
[0004] However, when using a CIS module, there is an absolute error. This error is caused by an uncertain physical gap between adjacent photosensitive chips during the product assembly process. After measurement, this physical gap is a random number of approximately 30-60um. The current length calculation method is to multiply the aperture spacing on the photosensitive chip by the total number of apertures, and by default, this physical gap is discarded. Since the length of a single photosensitive chip is fixed, when the target object is short, the number of photosensitive chips is small, and the error caused by the physical gap is also small. However, when it is necessary to scan a longer target object (for example, a length of 1.5 meters or longer), the number of photosensitive chips used will be greatly increased, and the number of physical gaps will also increase significantly, ultimately causing the error in the calculated length to increase dramatically.
[0005] Summary of the Invention
[0006] To address the problems existing in the above-mentioned prior art, the present application provides, through an embodiment, a method for calculating image length, for calculating the length L of an image obtained by scanning a target object using at least one CIS module along a scanning direction. Each CIS module includes a photosensitive chip disposed on a carrier, and a plurality of light holes distributed at equal intervals along the scanning direction above the photosensitive chip. The method for calculating image length includes the following steps:
[0007] Counting the image to obtain the number z of photosensitive chips that the target object completely crosses along the scanning direction;
[0008] If z ≥ 1, the length L of the image along the scanning direction is calculated based on formula (1):
[0009] L=z×k+m+n+2×p (1),
[0010] Among them, k is the length of the carrier along the scanning direction, m is the length of the first end of the target object partially spanning the photosensitive chip along the scanning direction, n is the length of the second end of the target object partially spanning the photosensitive chip along the scanning direction, and p is the spacing between any adjacent light holes in the CIS module.
[0011] Furthermore, m and n are determined by the following formula:
[0012] Wherein, x is the number of light holes covered along the scanning direction on the photosensitive chip partially crossed by the target object at its first end; y is the number of light holes covered along the scanning direction on the photosensitive chip partially crossed by the target object at its second end.
[0013] Preferably, along the scanning direction, a designed distance between the outermost light hole of each CIS module and the edge of its carrier is p / 2.
[0014] Preferably, the CIS module scans and images the target object in equal proportions.
[0015] Preferably, the length of the target object along the scanning direction is greater than the length of the photosensitive chip along the scanning direction.
[0016] Preferably, when the number of CIS modules used to scan the target object is greater than 1, the carriers of the respective CIS modules are aligned in a direction perpendicular to the scanning direction.
[0017] Preferably, when the number of CIS modules for scanning the target object is greater than 1, the carriers of the CIS modules are arranged seamlessly along the scanning direction.
[0018] Preferably, the method for calculating the image length further comprises the following steps:
[0019] If z=0, further determining whether the target object partially spans two photosensitive chips along the scanning direction;
[0020] If so, the length L of the image along the scanning direction is calculated based on formula (2):
[0021] L=m+n+p (2),
[0022] If not, the length L of the image along the scanning direction is calculated based on formula (3):
[0023] L=s×p (3),
[0024] Wherein, s is the number of light holes covered on the photosensitive chip along the scanning direction when the scanned object is scanned by only one photosensitive chip.
[0025] An embodiment of the present application provides a method for calculating the length of an image, which uses a carrier of a CIS module with precise length to calculate the length of the portion completely spanned by the target object. This method can effectively solve the random errors existing in the existing solution of calculating the length using the number of light holes, and significantly improve the calculation accuracy of the image length. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic structural diagram of a CIS module in an embodiment of the present application;
[0027] FIG2 is a schematic diagram of the layout of multiple CIS modules in some embodiments of the present application;
[0028] FIG3 is a flowchart of a method for calculating image length according to some embodiments of the present application;
[0029] FIG4 is a schematic diagram of scanning a target object according to a specific embodiment of the present application;
[0030] FIG5 shows the pixel distribution of a row in a scanned image obtained according to a specific embodiment of the present application;
[0031] FIG6 is a flowchart of a method for calculating image length according to some embodiments of the present application.
[0032] Numbers in the figure
[0033] 1: light hole, 2: photosensitive chip, 3: carrier DETAILED DESCRIPTION
[0034] Hereinafter, the present application will be further described based on preferred embodiments with reference to the accompanying drawings.
[0035] In the description of the embodiments of the present application, it should be noted that if the terms "upper", "lower", "inner", "outer" and the like indicate an orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or are the orientation or positional relationship in which the products of the embodiments of the present application are usually placed when in use, they are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, in the description of the present application, in order to distinguish different units, words such as first and second are used in this specification, but these are not limited by the order of manufacture, nor can they be understood as indicating or implying relative importance. Their names may be different in the detailed description and claims of the present application.
[0036] In order to facilitate understanding, various components on the drawings are enlarged or reduced, but this practice is not intended to limit the scope of protection of this application. The vocabulary in this specification is used to illustrate the embodiments of the present application, but is not intended to limit this application. It should also be noted that, unless otherwise clearly specified and limited, the terms "set", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, an indirect connection through an intermediate medium, or a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in this application can be specifically understood.
[0037] The present application provides a method for calculating image length, which is used to calculate the length L of an image obtained by scanning a target object through at least one CIS module along a scanning direction.
[0038] Figure 1 illustrates the structure of a CIS module. As shown in Figure 1 , each CIS module includes a photosensitive chip 2 mounted on a carrier 3 and a plurality of light apertures 1 spaced evenly apart along a scanning direction (horizontally in Figure 1 ) above the photosensitive chip 2. When the CIS module shown in Figure 1 is used to scan a target object, light emitted by the target object passes through the light apertures 1 and is converted by the photosensitive chip 2 into an electrical signal of corresponding intensity. This signal is then processed through analog-to-digital conversion and image stitching to ultimately form a scanned image of the target object.
[0039] The CIS module shown in Figure 1 can scan and image the target object in proportion, that is, the magnification of the light passing through the light hole 1 is 1, and the image size of the light passing through each light hole 1 on the photosensitive chip 2 is 1 pixel, and the pixel size is the same as the actual physical size of the corresponding scanning area. Therefore, when one CIS module is able to scan the entire target object, the actual size of the scanned target object can be obtained by counting the number of light holes covered by the target object without the need for proportional adjustment.
[0040] When the length of the target object is greater than the length of the imaging chip of a CIS module, multiple CIS modules need to be spliced together to meet the scanning length requirements (for example, after the three CIS modules are spliced together in Figure 2, longer target objects can be scanned at full size). At this time, the assembly error of the CIS modules needs to be considered.
[0041] As shown in Figure 1, for a CIS module, the size of its carrier 3 is fixed, the photosensitive chip 2 is set on the carrier 3, and its length in the scanning direction is slightly smaller than the carrier 3. The distances between the light holes 1 on both sides and the edge of the carrier 3 are a1 and a2 respectively. Generally, the design dimensions of a1 and a2 should be equal and both equal to p / 2, where p is the distance between two adjacent light holes. However, during the assembly process of the CIS module, there is generally an installation error in the position of the photosensitive chip 2 relative to the carrier 3. This error results in an uncertain physical gap between two adjacent photosensitive chips 2. After measurement, this physical gap is a random number of approximately 30-60um. The above error further results in a1 and a2 of each CIS module not being strictly equal to p / 2, and further results in a random error in the distance between the two light holes 1 at the connection of the two CIS modules.
[0042] The current length calculation method is to multiply the spacing between the light holes 1 on the photosensitive chip 2 by the total number of light holes, and discard this physical gap by default. When the target object is short, the number of photosensitive chips 2 is not large, and the error caused by the physical gap is also small. However, when a longer target object (for example, a length of 1.5 meters or longer) needs to be scanned, the number of photosensitive chips 2 used will increase greatly, and the number of physical gaps will also increase greatly, which will ultimately lead to a sharp increase in the error of the calculated length.
[0043] To this end, the present application provides a method for calculating image length to solve the above-mentioned problems in the prior art. As shown in FIG3 , in some preferred embodiments, the calculation method includes the following steps:
[0044] Step 210 , performing statistics on the image to obtain the number z of photosensitive chips that the target object completely crosses along the scanning direction;
[0045] Step 220: If z≥1, the length L of the image along the scanning direction is calculated based on formula (1):
[0046] L=z×k+m+n+2×p (1),
[0047] Among them, k is the length of the carrier 3 along the scanning direction, m is the length of the first end of the target object partially spanning the photosensitive chip 1 along the scanning direction, n is the length of the second end of the target object partially spanning the photosensitive chip 2 along the scanning direction, and p is the spacing between any adjacent light holes 1 in the CIS module.
[0048] Formula (1) consists of four parts. Here, z×k indicates that when z (or more than one) photosensitive chips 1 are completely covered by the scanned object, the length of that part is no longer calculated by multiplying the number of apertures by the spacing, but by multiplying the length of the carrier 3, whose dimensions can be accurately determined, by z. m and n represent the lengths of the photosensitive chips 2 partially spanned at both ends of the target object, respectively. 2×p represents the spacing between the outermost apertures 1 of the two partially spanned photosensitive chips 2 at both ends and the outermost apertures 1 of the adjacent fully spanned photosensitive chips 2 (considering that the design distance between the apertures 1 at both ends and the edge of the carrier 3 is p / 2). Formula (1) uses the carrier length, whose dimensions can be accurately determined, instead of the existing method of counting all the apertures. This effectively solves the problem of the uncertainty of the spacing between the outermost apertures of adjacent imaging chips due to assembly errors, which in turn causes the rapid accumulation of errors when measuring the length of the target object by multiple CIS modules.
[0049] Furthermore, m and n are determined by the following formula:
[0050] Wherein, x is the number of light holes 1 covered along the scanning direction on the photosensitive chip 2 partially crossed by the target object at its first end; y is the number of light holes 1 covered along the scanning direction on the photosensitive chip 2 partially crossed by the target object at its second end.
[0051] Preferably, when the number of CIS modules for scanning the target object is greater than 1, the carriers 3 of the respective CIS modules are aligned in a direction perpendicular to the scanning direction, and the carriers 3 of the respective CIS modules are arranged seamlessly along the scanning direction.
[0052] Figure 4 shows a specific embodiment, in which 10 CIS modules are arranged along the scanning direction, and the photosensitive chips included in each of them are numbered IC1 to IC10 respectively. The 10 CIS modules are integrated in a housing, and the carriers 3 of each CIS module are aligned with each other without gaps, thereby forming a contact image sensor 4, which is used to scan a target object 5, wherein the target object 5 completely spans IC2 to IC9, and its two ends partially span IC1 and IC10 respectively, and m and n respectively represent the distances that the left and right boundaries of the target object partially span on IC10 and IC1.
[0053] FIG5 further illustrates one row of an image obtained by scanning the target object 5 by the contact image sensor 4 shown in FIG4 . The left and right boundaries of the target object 5 in the image can be observed. Based on image data processing, the number of corresponding photosensitive chips and the number of light holes on the hardware can be restored. These known dimension data can be used to calculate the length L of the image of the target object.
[0054] Specifically, the scanned target object 5 has images on IC1 to C10, wherein the left boundary is located at the 430th light hole of IC10, the right boundary is located at the 429th light hole of IC1, and the middle part completely spans the eight photosensitive chips IC2 to IC9.
[0055] In the embodiment of the present application, the resolution of the CIS module is 600 DPI mode (aperture pitch 42.3 μm). The length of the carrier 3 in each CIS module is 18.29 mm, and 432 apertures are provided thereon. The number of apertures on the left boundary spanning IC10 is 430, and the number of apertures on the right boundary spanning IC1 is 4. According to formula (1), the object length can be obtained as:
[0056] L=18.29×8+0.0423×430+0.0423×4+0.0423×2=164.7682mm.
[0057] The above-mentioned method for calculating image length uses a carrier of a CIS module with precise length to calculate the length of the portion completely spanned by the target object. This method can effectively solve the random errors existing in the existing solution of calculating length using the number of light holes, and significantly improve the calculation accuracy of image length.
[0058] FIG6 shows a flow chart of a method for calculating image length provided by some other preferred embodiments. In the embodiment shown in FIG6 , steps 310 and 320 are respectively the same as steps 210 and 220 in the embodiment shown in FIG3 , except that step 330 is added:
[0059] If z=0, further determining whether the target object partially spans two photosensitive chips along the scanning direction;
[0060] If so, the length L of the image along the scanning direction is calculated based on formula (2):
[0061] L=m+n+p (2),
[0062] If not, the length L of the image along the scanning direction is calculated based on formula (3):
[0063] L=s×p (3),
[0064] Wherein, s is the number of light holes covered on the photosensitive chip along the scanning direction when the scanned object is scanned by only one photosensitive chip.
[0065] Step 330 is used to calculate the image length for the case where the target object is short and does not span an entire photosensitive chip. If the target object is imaged on two adjacent photosensitive chips simultaneously, the image length is calculated using equation (2). In this case, only the compensation amount of the aperture pitch p needs to be increased. If the target object is imaged on only one photosensitive chip, the image length is calculated using equation (3), and no aperture pitch compensation is required.
[0066] The above is a detailed introduction to the specific implementation methods of the present application. For those skilled in the art, several improvements and modifications can be made to the present application without departing from the principles of the present application. These improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for calculating image length, for calculating the length L of an image obtained by scanning a target object through at least one CIS module along a scanning direction, wherein each CIS module comprises a photosensitive chip disposed on a carrier, and a plurality of light holes distributed at equal intervals along the scanning direction above the photosensitive chip, characterized in that: The following steps are involved: Counting the image to obtain the number z of photosensitive chips that the target object completely crosses along the scanning direction; If z ≥ 1, the length L of the image along the scanning direction is calculated based on formula (1): L=z×k+m+n+2×p (1), Among them, k is the length of the carrier along the scanning direction, m is the length of the first end of the target object partially crossing the photosensitive chip along the scanning direction, n is the length of the second end of the target object partially crossing the photosensitive chip along the scanning direction, and p is the spacing between any adjacent light holes in the CIS module.
2. The method for calculating image length according to claim 1, characterized in that: The m and n are determined by the following formula: Wherein, x is the number of light holes covered along the scanning direction on the photosensitive chip partially crossed by the target object at its first end; y is the number of light holes covered along the scanning direction on the photosensitive chip partially crossed by the target object at its second end.
3. The method for calculating image length according to claim 1, characterized in that: Along the scanning direction, the design distance between the outermost light hole of each CIS module and the edge of its carrier is p / 2.
4. The method for calculating image length according to claim 1, characterized in that: The CIS module scans and images the target object in equal proportion.
5. The method for calculating image length according to claim 1, characterized in that: The length of the target object along the scanning direction is greater than the length of the photosensitive chip along the scanning direction.
6. The method for calculating image length according to claim 1, characterized in that: When the number of CIS modules used to scan the target object is greater than 1, the carriers of the respective CIS modules are aligned along a direction perpendicular to the scanning direction.
7. The method for calculating image length according to claim 1, characterized in that: When the number of CIS modules used to scan the target object is greater than 1, the carriers of the CIS modules are arranged seamlessly along the scanning direction.
8. The method for calculating image length according to claim 2, characterized in that: The following steps are also included: If z=0, further determining whether the target object partially spans two photosensitive chips along the scanning direction; If so, the length L of the image along the scanning direction is calculated based on formula (2): L=m+n+p (2), If not, the length L of the image along the scanning direction is calculated based on formula (3): L = s × p (3), Wherein, s is the number of light holes covered along the scanning direction on the photosensitive chip when the scanned object is scanned by only one photosensitive chip.
Citation Information
Patent Citations
Multiple-CIS (contact type image sensor) cascading-based scanning imaging system and scanning imaging method thereof
CN110632090A
Image scanning device
CN110913090A
Image length calculation method
CN117490574A
Method for scanning of image data, involves obtaining image data line by line in form of pixels by linearly arranged image sensor chip having interfaces from image information of information carrier
DE102007011668A1