Scanning zero point position judgment method, office device and storage medium
By collecting and comparing the scan data at the current zero position and standard zero position in the scanning component, the accuracy of the zero position is determined, and the problem that the scanning component driven by the DC motor cannot accurately determine the zero position is achieved, and the accuracy of the zero position is achieved Judgment and cost reduction.
Patent Information
- Application Number
- CN202411307400.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-14
AI Technical Summary
When using a low-cost DC motor to drive the scanning component in the prior art, it is difficult to accurately determine the scanning zero point position, resulting in the scanning component being unable to accurately obtain the scanning data at the junction of black and white stripes during movement, affecting the normal operation of the device.
By controlling the scanning component to move at the current zero position and the standard zero position, collect scanning data and compare it, determine whether the current zero position is accurate, and use conditions one and two to determine whether the scanning component is in the correct position of the black and white bar, avoiding the steps The dependence of accuracy on the drive mechanism.
The error of the zero position is effectively controlled within a small range, ensuring that the scanning components can accurately determine the zero position under the DC motor with low cost, reducing the cost of office equipment, and ensuring the normal operation of the scanning work.
Smart Images

Figure CN119316526A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a scanning zero point position judgment method, an office device and a storage medium. Background Art
[0002] A scanning module is usually installed in office devices such as copiers and scanners. When scanning an image, the scanning module needs to first find the scanning zero point position. After finding the scanning zero point position, scanning starts from the scanning zero point position. In order to reduce the cost of the whole machine, in the prior art, a black and white bar is set in the zero point position area near the end of the device, and the scanning zero point position is located by collecting and analyzing the black and white bar data.
[0003] The scanning module usually includes a CIS (contact image sensor) and a motor that drives the CIS to move. When the zero point position of the CIS is located, the motor drives the CIS to move to the position of the black and white stripes to perform an edge search operation. During the movement of the CIS, dynamic scanning data is collected, and then the scanning revelation position is located according to the analysis results of the dynamic scanning data. For example, the Chinese invention patent "A method and device for positioning the starting position of scanning" with the announcement number CN114885070B (application number 202210809904.3) adopts this method. However, when this method for positioning the starting position of scanning is implemented, it is necessary to use a stepper motor with high stepping accuracy to drive, so that the intersection of the black and white stripes can be accurately found through dynamic scanning data to confirm the origin. However, in order to reduce the cost of the device, there is also a situation in which a DC motor with lower cost is used to replace the stepper motor in the device, and the stepping accuracy of the DC motor is poor. In the process of driving the scanning component to move, the scanning component is not sure whether it can obtain the scanning data at the intersection of the black and white stripes, and the zero point position cannot be accurately determined accordingly, thereby affecting the normal operation of the device. Summary of the invention
[0004] The first technical problem to be solved by the present invention is to provide a scanning zero point position determination method for the above-mentioned prior art, which can effectively determine whether the zero point position is accurate and control the error of the zero point position within a very small range.
[0005] The second technical problem to be solved by the present invention is to provide an office device using the above-mentioned scanning zero point position determination method in view of the above-mentioned prior art.
[0006] The second technical problem to be solved by the present invention is to provide a storage medium for the above-mentioned prior art, storing computer instructions, wherein the computer instructions are used to enable a computer to execute the scanning zero point position determination method as described above.
[0007] The technical solution adopted by the present invention to solve the above-mentioned first technical problem is: a scanning zero point position determination method, characterized in that it comprises the following steps:
[0008] S1, control the scanning component to move to the zero position;
[0009] S2, controlling the scanning component to move from the current zero point position to a first direction so that the scanning component crosses the black and white bars set on the base, wherein the first direction is a direction away from the zero point position;
[0010] S3, controlling the scanning component to move in a second direction, recording the moving distance of the scanning component, and controlling the scanning component to collect scanning data during the movement;
[0011] S4. Compare the scanning data collected during the movement of the scanning component under the current zero point position with the standard scanning data collected during the movement of the scanning component under the standard zero point position to determine whether the current zero point position is accurate.
[0012] As an improvement, with respect to the current zero point position and the standard zero point position, the scanning data collected when the scanning component moves the same distance are compared to determine whether the current zero point position is accurate.
[0013] Preferably, in step S3, a first scanning data set in which the scanning component moves within a range [x1, x2] and a second scanning data set in which the scanning component moves within a range [x3, x4] are acquired, and in the case of a standard zero point position, the range [x1, x2] is within the range in which the scanning component moves to scan a black area in the black and white stripes, and the range [x3, x4] is within the range in which the scanning component moves to scan a white area in the black and white stripes;
[0014] In step S4, when both condition 1 and condition 2 are satisfied, it is determined that the current zero point position is accurate;
[0015] Condition 1 is that the scan data in the first scan data group is the scan value corresponding to the black area in the black and white stripes; Condition 2 is that the scan data in the second scan data group is the scan value corresponding to the white area in the black and white stripes.
[0016] Preferably, the black area in the black and white stripes on the base is located on the side of the white area away from the zero point position, and accordingly, x1<x2<x3<x4.
[0017] In order to make accurate judgments, under the standard zero point position, the positions of the scanning components moving x1 and x2 are within the set first error range compared to the corresponding distances close to the side edges of the black area in the black and white stripes, and the positions of the scanning components moving x3 and x4 are within the set second error range compared to the corresponding distances close to the side edges of the white area in the black and white stripes.
[0018] In order to avoid inaccurate judgment results caused by the swing of the scanning component, the center interval [Y1, Y2] of the scanning component in the extension direction perpendicular to the moving direction of the scanning component is determined;
[0019] Setting condition one is that the scanning data in the center interval [Y1, Y2] of the first scanning data group are all scanning values corresponding to the black area in the black and white stripes; setting condition two is that the scanning data in the center interval [Y1, Y2] of the second scanning data group are all scanning values corresponding to the white area in the black and white stripes.
[0020] Preferably, when both condition 1 and condition 2 cannot be satisfied at the same time, NG counting is performed, and then S1 to S4 are re-executed;
[0021] When the NG count reaches the set number of times N, it is determined that the scanning component is abnormal.
[0022] Simply, control the motor to drive the scanning component to move;
[0023] In step S1, when the scanning component is controlled to move to hit the side wall on the origin side of the base and the motor is blocked, it is determined that the scanning component moves to the zero position.
[0024] The technical solution adopted by the present invention to solve the above-mentioned second technical problem is: an office device, including a casing, and a scanner arranged in the casing, the scanner including a base, a scanning component movably arranged on the base, a driving mechanism drivingly connected to the scanning component, and black and white bars arranged on the base, characterized in that: it also includes a controller and a memory, the controller is electrically connected to the scanning component, the driving mechanism, and the memory, the memory stores computer instructions, and the computer instructions are used to enable the computer to execute the scanning zero point position judgment method as mentioned above.
[0025] The technical solution adopted by the present invention to solve the third technical problem mentioned above is: a computer-readable storage medium, characterized in that: the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the scanning zero point position determination method as mentioned above.
[0026] Compared with the prior art, the advantages of the present invention are: the scanning zero point position determination method in the present invention, compared with the prior art directly using the scanning component to detect the boundary position of the black and white stripes to accurately determine the zero point position, the scanning zero point position determination method in the present invention compares the scanning data of the scanning component under the current zero point position with the scanning data of the scanning component under the standard zero adjustment position, thereby determining whether the current zero point position is accurate. In this way, the stepping accuracy limitation of the driving mechanism of the driving scanning component is eliminated, and even if a DC motor with low cost and poor stepping accuracy is used to drive the scanning module to move, it is still possible to effectively determine whether the zero point position is accurate, and limit the error of the zero point position to a smaller range.
[0027] An office device using the scanning zero point position determination method can provide feasibility for reducing the cost of the scanner in the office device while ensuring the zero point position accuracy control of the scanning component. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Schematic diagram of the scanning component movement control in an embodiment of the present invention.
[0029] Figure 2 Flow chart of the scanning zero point position determination method in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The present invention is further described in detail below with reference to the accompanying drawings.
[0031] The scanning zero point position determination method in this embodiment can be applied to products provided with scanners, such as office devices such as printers, copiers, and scanning equipment with scanners.
[0032] The office device in this embodiment includes a housing and a scanner arranged in the housing, wherein the scanner includes a base, a scanning component movably arranged on the base, a driving mechanism connected to the scanning component, an upper cover covering the base, and black and white stripes arranged on the upper cover. Corresponding to the moving direction of the scanning component in the base, one end of the base serves as the zero point side corresponding to the zero point position of the scanning component, and the other end of the base corresponds to the side of the upper cover where the black and white stripes are arranged. The scanning component usually has a length, and the length extension direction of the scanning component is perpendicular to the moving direction of the scanning component. Accordingly, the black and white stripes are also arranged to be strip-shaped extending along the length direction of the scanning component, so that the length of the black and white stripes can cover the length of the scanning component, so that each position on the scanning component can obtain scanning data of the black and white stripes.
[0033] When the scanning component moves over the black and white stripes, the scanning data obtained by the scanning component are the RGB values corresponding to the black image and the white image formed by scanning the black and white stripes.
[0034] When setting the black and white stripes, the distribution positions of the black area and the white area in the black and white stripes relative to the zero point position are specifically set as needed. For example, in this embodiment, the black area in the black and white stripes is set on the side farther away from the zero point position relative to the white area. Of course, the black area and the white area can also be reversed as needed.
[0035] The driving source of the driving mechanism can be selected from various motors in the prior art, such as a stepper motor or a DC motor. However, when the stepper motor is driving, its stepping precision is high and the cost is high, while the DC motor has low stepping precision and low cost. Moreover, for low-priced products, in order to reduce product costs, selecting a low-cost driving motor is a common means used in product development. However, based on the existing zero point determination method of the scanning component, there is a situation where the standard zero point may not be found. The present invention adopts the following scanning zero point position determination method to solve this problem.
[0036] The office device also includes a controller and a memory arranged in the casing. The controller is connected to the scanning component, the driving mechanism, and the memory by electrical signals. The memory stores computer instructions, which are used to enable the computer to execute the scanning zero point position judgment method as described below.
[0037] like Figure 1 and Figure 2 As shown, the scanning zero point position determination method in this embodiment includes the following steps.
[0038] S1. Control the driving mechanism to drive the scanning assembly to move to the zero position. However, the zero position is uncertain whether it is accurate, and subsequent steps are required to further confirm whether the zero position is accurate compared to the standard zero position.
[0039] In this step, various existing methods can be used to realize the movement of the scanning component to the zero position. Based on the structure of the scanner and for the convenience of control, in this embodiment, when the scanning component is controlled to move to the side wall on the origin side of the base and the motor is blocked, the scanning component is determined to move to the zero position. The zero position is the current zero position determined by the scanning component this time, but it is not certain whether the current zero position is accurate relative to the standard zero position. It is necessary to use subsequent steps to determine the accuracy of the zero position. When the accuracy meets the requirements, it can be determined that the current zero position is accurate, and then the office device can perform subsequent scanning-related work to ensure the normal scanning work. When the office device leaves the factory, the standard origin position is also determined based on the same method, which facilitates the comparison calculation in the subsequent work process to determine whether the zero position when the scanning component moves to the position where the base hits the wall is accurate.
[0040] S2. Control the scanning component to move from the current zero position to the first direction, so that the scanning component crosses the position of the black and white stripes set on the base. The first direction is the direction away from the zero position, that is, control the driving mechanism to drive the scanning component to move from the zero position to the position where one end of the black and white stripes is set. During the movement, the scanning component passes through the area of the black and white stripes, so that when the scanning component moves along the second direction in the subsequent step, it is convenient to collect complete black and white stripe scanning data.
[0041] S3, controlling the scanning component to move in the second direction, recording the moving distance of the scanning component, and controlling the scanning component to collect scanning data during the movement, wherein the collected scanning data includes scanning data of the black and white stripes obtained by scanning when passing through the black and white stripe area.
[0042] S4. Compare the scanning data collected during the movement of the scanning component under the current zero point position with the standard scanning data collected during the movement of the scanning component under the standard zero point position to determine whether the current zero point position is accurate.
[0043] Specifically, with respect to the current zero point position and the standard zero point position, the scanning data collected when the scanning component moves the same distance are compared to determine whether the current zero point position is accurate.
[0044] When the office equipment is powered on for self-test, based on the standard zero point position, the drive scanning component is controlled to move according to steps S2 and S3 and obtain the moving distance data and scanning data, thereby forming standard scanning data for the moving distance parameters for comparison.
[0045] In order to reduce the amount of contrast calculation and improve the contrast accuracy, in step S3, a first scanning data set in which the scanning component moves a distance within the range [x1, x2] and a second scanning data set in which the scanning component moves a distance within the range [x3, x4] are obtained, and in the case of a standard zero point position, the range [x1, x2] is within the range in which the scanning component moves to the black area in the scanning black and white strips, and the range [x3, x4] is within the range in which the scanning component moves to the white area in the scanning black and white strips.
[0046] And in order to avoid the range [x1, x2] being narrower than the width of the black area in the black and white stripes, and to avoid the range [x3, x4] being narrower than the width of the white area in the black and white stripes, which may cause a large contrast error. In this embodiment, in order to accurately judge, in the case of the standard zero point position, the position where the scanning component moves x1 and x2 is within the set first error range compared to the corresponding side edge distance of the black area in the black and white stripes, and the position where the scanning component moves x3 and x4 is within the set second error range compared to the corresponding side edge distance of the white area in the black and white stripes. The first error and the second error are determined by the wall thickness error on the zero point side of the base and the attachment error of the black and white stripes. The determination of the range [x1, x2] and the range [x3, x4] can satisfy that when the error of the current zero point position is too large compared to the standard zero point position, the scanning data obtained by the scanning component when the moving distance is within the range [x1, x2] and the range [x3, x4] will change compared to the standard scanning data. For example, when the standard scan data in the range [x1, x2] are all RGB values corresponding to black, and the current scan data in the range [x1, x2] contain RGB values corresponding to white, it means that the current zero point position is not accurate enough, resulting in inconsistency between the current scan data collected at the same moving distance and the standard data.
[0047] In this embodiment, the black area in the black and white stripes on the base is located on the side of the white area away from the zero point position, and accordingly, x1<x2<x3<x4.
[0048] When comparing and judging in step S4, when both condition 1 and condition 2 are satisfied, it is judged that the current zero point position is accurate. Among them, condition 1 is that the scan data in the first scan data group is the scan value corresponding to the black area in the black and white stripes; condition 2 is that the scan data in the second scan data group is the scan value corresponding to the white area in the black and white stripes. Among them, the scan value is the RGB value of the black image and the white image obtained by scanning the black area and the white area on the black and white stripes.
[0049] In addition, since the scanning component has a certain length, in the process of driving the scanning component to move, it is inevitable that the scanning component will swing due to the influence of some particles in the environment around the scanning component. Usually, when swinging, the swing amplitude of the central area of the scanning component is smaller, while the swing amplitude at the two end positions will be slightly larger, which will cause some errors in the scanning data obtained at the two end positions of the scanning component. In order to reduce the impact of the scanning data error comparison caused by the surrounding environment on the result, the center interval [Y1, Y2] of the scanning component in the extension direction perpendicular to the moving direction of the scanning component is determined.
[0050] The corresponding setting condition one is that the scanning data in the center interval [Y1, Y2] of the first scanning data group are all scanning values corresponding to the black area in the black and white stripes; the setting condition two is that the scanning data in the center interval [Y1, Y2] of the second scanning data group are all scanning values corresponding to the white area in the black and white stripes.
[0051] In addition, in order to avoid the influence of external factors on the scanning component, which may cause errors in the result of a single comparison judgment, in this embodiment, when both condition 1 and condition 2 cannot be met at the same time, NG counting is performed, and then S1 to S4 are re-executed. When the NG count reaches the set number of times N, the scanning component is judged to be abnormal.
[0052] Compared with the prior art method of directly using the scanning component to detect the boundary position of the black and white stripes to accurately determine the zero point position, the scanning zero point position determination method of the present invention compares the scanning data of the scanning component under the current zero point position with the scanning data of the scanning component under the standard zero adjustment position to determine whether the current zero point position is accurate. In this way, the stepping accuracy limitation of the driving mechanism of the driving scanning component is eliminated, and even if a DC motor with low cost and poor stepping accuracy is used to drive the scanning module to move, it can effectively determine whether the current zero point position is accurate, and limit the error of the zero point position to a reasonable small range.
[0053] An office device using the scanning zero point position determination method can provide feasibility for reducing the cost of the scanner in the office device while ensuring the zero point position accuracy control of the scanning component.
[0054] The present invention also relates to a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the scanning zero point position determination method as described above.
[0055] In the specification and claims of the present invention, terms indicating directions, such as "front", "rear", "up", "down", "left", "right", "side", "top", "bottom", etc., are used to describe various exemplary structural parts and elements of the present invention, but these terms are used here only for the purpose of convenience of description and are determined based on the exemplary orientations shown in the accompanying drawings. Since the embodiments disclosed in the present invention can be arranged in different directions, these terms indicating directions are only used as explanations and should not be regarded as limitations. For example, "up" and "down" are not necessarily limited to directions opposite to or consistent with the direction of gravity.
Claims
1. A scanning zero point position determination method, characterized in that: The following steps are involved: S1, control the scanning component to move to the zero position; S2, controlling the scanning component to move from the current zero point position to a first direction so that the scanning component crosses the black and white bars set on the base, wherein the first direction is a direction away from the zero point position; S3, controlling the scanning component to move in a second direction, recording the moving distance of the scanning component, and controlling the scanning component to collect scanning data during the movement; S4. Compare the scanning data collected during the movement of the scanning component under the current zero point position with the standard scanning data collected during the movement of the scanning component under the standard zero point position to determine whether the current zero point position is accurate.
2. The scanning zero point position determination method according to claim 1, characterized in that: With respect to the current zero point position and the standard zero point position, the scanning data collected when the scanning component moves the same distance are compared to determine whether the current zero point position is accurate.
3. The scanning zero point position determination method according to claim 2, characterized in that: In step S3, a first scanning data set in which the scanning component moves within a range [x1, x2] and a second scanning data set in which the scanning component moves within a range [x3, x4] are obtained, and in the case of a standard zero point position, the range [x1, x2] is within the range in which the scanning component moves to scan a black area in the black and white stripes, and the range [x3, x4] is within the range in which the scanning component moves to scan a white area in the black and white stripes; In step S4, when both condition 1 and condition 2 are satisfied, it is determined that the current zero point position is accurate; Condition 1 is that the scan data in the first scan data group is the scan value corresponding to the black area in the black and white stripes; Condition 2 is that the scan data in the second scan data group is the scan value corresponding to the white area in the black and white stripes.
4. The scanning zero point position determination method according to claim 3, characterized in that: The black area in the black and white stripes on the base is located on the side of the white area away from the zero point position, and accordingly, x1<x2<x3<x4.
5. The scanning zero point position determination method according to claim 3, characterized in that: In the case of the standard zero point position, the positions of the scanning components moving x1 and x2 are within the set first error range compared to the corresponding distances close to the side edges of the black area in the black and white stripes, and the positions of the scanning components moving x3 and x4 are within the set second error range compared to the corresponding distances close to the side edges of the white area in the black and white stripes.
6. The scanning zero point position determination method according to any one of claims 3 to 5, characterized in that: In an extension direction perpendicular to the moving direction of the scanning component, determine a center interval [Y1, Y2] of the scanning component in the extension direction; Setting condition one is that the scanning data in the center interval [Y1, Y2] of the first scanning data group are all scanning values corresponding to the black area in the black and white stripes; setting condition two is that the scanning data in the center interval [Y1, Y2] of the second scanning data group are all scanning values corresponding to the white area in the black and white stripes.
7. The scanning zero point position determination method according to any one of claims 3 to 5, characterized in that: When both condition 1 and condition 2 cannot be satisfied at the same time, NG counting is performed, and then S1 to S4 are executed again; When the NG count reaches the set number of times N, it is determined that the scanning component is abnormal.
8. The scanning zero point position determination method according to any one of claims 1 to 5, characterized in that: Control the motor to drive the scanning component to move; In step S1, when the scanning component is controlled to move to hit the side wall on the origin side of the base and the motor is blocked, it is determined that the scanning component moves to the zero position.
9. An office device, comprising a housing, and a scanner disposed in the housing, the scanner comprising a base, a scanning component movably disposed on the base, a driving mechanism drivingly connected to the scanning component, an upper cover covering the base, and black and white stripes disposed on the upper cover, characterized in that: It also includes a controller and a memory, wherein the controller is electrically connected to the scanning component, the driving mechanism, and the memory, and the memory stores computer instructions, which are used to enable a computer to execute the scanning zero point position determination method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the scanning zero point position determination method according to any one of claims 1 to 8.
Citation Information
Patent Citations
A method and apparatus for locating the starting position of a scan.
CN114885070B