Adjusting image capture frequency, method and apparatus for image capture
By adjusting the camera's image acquisition frequency to match the object's movement speed, the deformation problem of line scan cameras when acquiring images of moving objects was solved, achieving deformation-free image acquisition and complete information restoration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, when line scan cameras acquire images of moving objects, the acquisition speed does not match the object's movement speed, resulting in image compression or stretching distortion, which makes it impossible to fully restore the object's information.
By acquiring images of a pre-set calibration object moving at the same speed as the moving object, determining the coordinates of multiple edges of the calibration object, calculating the deformation coefficient, and adjusting the image acquisition frequency of the camera according to the deformation coefficient to match the speed of the moving object, deformation-free image acquisition is achieved.
It enables the camera to acquire images at a frequency that matches the speed of the moving object, avoiding image compression or stretching distortion and ensuring complete restoration of image information.
Smart Images

Figure CN115174761B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to methods and apparatus for adjusting the image acquisition frequency of a camera and for image acquisition. Background Technology
[0002] Based on the imaging principle of line scan cameras, which focuses on "converging lines into a surface," image quality is limited by the camera's line frequency acquisition speed. This means there is a problem of whether the object's movement speed matches the line scan camera's acquisition speed: if the object's movement speed is lower than the line scan camera's acquisition speed, the camera will take multiple exposures at that acquisition point to capture a certain part of the object, resulting in a stretched image and overlapping image information; if the object's movement speed is higher than the line scan camera's acquisition speed, the actual parts of the object captured by the camera in two consecutive exposures will be far apart, resulting in a compressed image and loss of image information. Summary of the Invention
[0003] This application provides a method and apparatus for adjusting the image acquisition frequency and image acquisition of a camera, so that the object in the image acquired from the moving object does not undergo deformation such as compression or stretching.
[0004] This application provides a method for adjusting the image acquisition frequency of a camera, comprising:
[0005] The camera captures images of a pre-set calibration object that moves at the same speed as the moving object.
[0006] Determine multiple edge coordinates of the calibration object in the image, and determine the deformation coefficient of the calibration object in the image based on the multiple edge coordinates;
[0007] The image acquisition frequency of the camera is adjusted according to the deformation coefficient.
[0008] The method involves acquiring an image of a pre-set calibration object moving at the same speed as the moving object using the camera; determining multiple edge coordinates of the calibration object in the image; determining the deformation coefficient of the calibration object in the image based on the multiple edge coordinates; and adjusting the image acquisition frequency of the camera based on the deformation coefficient, so that the object in the image acquired from the moving object does not undergo compression, stretching, or other deformation.
[0009] In some embodiments, adjusting the image acquisition frequency of the camera according to the deformation coefficient specifically includes:
[0010] Obtain information that characterizes the velocity of the moving object;
[0011] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted.
[0012] This method allows the camera's image acquisition frequency to be adjusted, enabling the camera to acquire and reconstruct object information according to the speed at which the object moves.
[0013] In some embodiments, if the speed of the object's movement is detected by a photoelectric encoder, then when the photoelectric encoder detects the object, the photoelectric encoder outputs a pulse signal to the camera;
[0014] The information is the pulse signal;
[0015] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted, specifically including:
[0016] The speed of the object is determined by counting the number of pulse signals obtained.
[0017] The object's velocity is multiplied by the deformation coefficient, and the resulting product is used as the adjusted image acquisition frequency of the camera.
[0018] This method can determine the speed of an object and convert it into a pulse signal, which is then input to the camera, allowing the camera to match the speed of the object's movement for image acquisition.
[0019] In some embodiments, the pulse signal output by the photoelectric encoder is a pulse signal with a fixed high and low level duty cycle;
[0020] The number of pulse signals obtained by the statistics specifically includes:
[0021] The number of high or low levels in the pulse signal obtained by counting the counter in the camera is cnt_h;
[0022] The adjusted image acquisition frequency of the camera is obtained using the following formula:
[0023] cnt = cnt_h / duty cycle;
[0024] T = (1 / camera system clock frequency) * cnt;
[0025] f1 = 1 / T;
[0026] f = K * f1;
[0027] Where K = 1 / k, k is the deformation coefficient; and f represents the adjusted image acquisition frequency of the camera.
[0028] Using this method, T can be derived from the number of high and low points obtained, and the adjusted image acquisition frequency of the camera can be calculated based on T and K.
[0029] In some embodiments, when K is a non-integer, the method further includes:
[0030] Adjust K to an integer; use the adjusted K to calculate f.
[0031] Since the camera's FPGA can only process integers, this method can convert K from a decimal to an integer, thereby reducing the error in calculating f.
[0032] In some embodiments, when K is a non-integer, the method further includes:
[0033] The image acquisition frequency of the camera is updated in the following manner:
[0034] Adjusting K to a fraction, we get K = m / n;
[0035] First, the frequency of f1 is multiplied by m to obtain the multiplier value f. 11 =mf1;
[0036] Then, using the n, for the f 11 Frequency division processing is performed to obtain the updated image acquisition frequency of the camera, f = mf1 / n.
[0037] This method allows K to be adjusted to its simplest fraction, and f is obtained by amplifying the frequency f1 by a factor of m based on the numerator m of the simplest fraction. 11 Then f 11 The frequency is divided n times to obtain f, thereby reducing the calculation error of f.
[0038] In some embodiments, when the counter in the camera counts to cnt_h / m, the frequency of f1 is multiplied by m to obtain the multiplied frequency value f. 11 ;
[0039] Every 2*n count values, for the f 11 Perform a frequency division process, dividing the frequency by 1 / n each time, for a total of n divisions.
[0040] This method allows the frequency f1 to be amplified by m times to obtain f. 11 Then f 11 After frequency division processing n times, the corrected camera acquisition frequency f is obtained, thereby realizing the adjustment of the camera acquisition frequency.
[0041] After acquiring the image but before determining the multiple edge coordinates, the method further includes:
[0042] The image is binarized to obtain a binarized image.
[0043] This method can make the image present only a clear black and white effect, highlighting the outline of the calibration object, which is beneficial for the extraction of the calibration object's edge. At the same time, the data bit width of each pixel in the binarized image is narrowed, reducing the amount of computational data.
[0044] In some embodiments, after obtaining the binarized image and before determining the plurality of edge coordinates, the method further includes:
[0045] A morphological closing operation is performed on the binarized image.
[0046] This method can remove dark details in the calibration area of the binarized image, fill in the small holes, and improve the accuracy of subsequently determining the coordinates of the four edge tangent points of the calibration object.
[0047] In some embodiments, determining the plurality of edge coordinates specifically includes:
[0048] The largest connected component in the image is determined using a connected component algorithm.
[0049] Determine the coordinates of multiple edges of the largest connected component.
[0050] Using this method, the coordinates of the four edge tangent points of the largest connected domain of the calibration object can be obtained. Then, the ratio of the horizontal axis length to the vertical axis length of the calibration object can be calculated using these four coordinates to obtain the deformation coefficient.
[0051] In some embodiments, the calibration object is a circular calibration object, and the plurality of edge coordinates include the coordinates of the four tangent points of the top, bottom, left, and right edges of the circular calibration object;
[0052] The deformation coefficient is the ratio of the horizontal axis passing through the center of the circular calibration object to the vertical axis passing through the center of the circle.
[0053] Circular objects have a fixed radius, and their diameter is the same regardless of the angle. Using this method, the calculated deformation coefficient will not be affected by the angle of sample placement, which is beneficial to improving the accuracy of subsequent adjustments to the camera's image acquisition frequency.
[0054] Another embodiment of this application provides an image acquisition method, including:
[0055] When the speed of an object changes, the image acquisition frequency of the camera is adjusted using the method described above.
[0056] The object is imaged using the adjusted image acquisition frequency.
[0057] Another embodiment of this application provides a computing device including a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the methods described above according to the obtained program.
[0058] Furthermore, according to embodiments, for example, a computer program product for a computer is provided, which includes software code portions that, when the product is run on the computer, perform the steps of the methods defined above. The computer program product may include a computer-readable medium on which the software code portions are stored. Furthermore, the computer program product may be directly loaded into the computer's internal memory and / or sent via a network through at least one of an upload process, a download process, and a push process.
[0059] Another embodiment of this application provides a computer-readable storage medium storing computer-executable instructions for causing the computer to perform any of the methods described above. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 A schematic diagram illustrating the acquisition of motion images of an object using a line scan camera, as provided in an embodiment of this application.
[0062] Figure 2a This application provides an example of an object imaging effect at a line frequency of 4kHz.
[0063] Figure 2b This application provides an example of an object imaging effect at a line frequency of 8kHz.
[0064] Figure 2c This is an image of an object captured at a line frequency of 11kHz, provided in an embodiment of this application.
[0065] Figure 3 This application provides a diagram showing the aspect ratio of an object image under different acquisition line frequencies.
[0066] Figure 4 This is a schematic flowchart illustrating a method for adjusting the image acquisition frequency of a camera, as provided in an embodiment of this application.
[0067] Figure 5This application provides a schematic flowchart illustrating a method for adjusting the image acquisition frequency of a camera.
[0068] Figure 6 A schematic diagram of the level signal output by an optical encoder provided in an embodiment of this application;
[0069] Figure 7 This application provides a schematic diagram of an image binarization process.
[0070] Figure 8 A histogram statistical chart of a reference circle sample image provided in an embodiment of this application;
[0071] Figure 9 This application provides a schematic diagram of an image morphology closing operation process.
[0072] Figure 10 This application provides a graph showing the ratio of the axis length of an object image under different acquisition line frequencies.
[0073] Figure 11 A schematic flowchart illustrating the image acquisition method provided in this application embodiment;
[0074] Figure 12 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0075] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0076] This application provides a method and apparatus for adjusting the image acquisition frequency of a camera. By calibrating the calibration object only once, a fixed conversion coefficient between the object's movement speed and the acquisition frequency can be obtained. This solves the problem that the acquired object image cannot completely restore the object's information because the camera's acquisition speed does not match the object's movement speed. It enables the camera to acquire and restore object information according to the image acquisition frequency that matches the object's movement speed.
[0077] The method and apparatus are based on the same concept of the application. Since the methods and apparatus solve problems in similar ways, the implementation of the apparatus and methods can refer to each other, and the repeated parts will not be described again.
[0078] The terms "first," "second," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0079] The following examples and embodiments are to be understood as illustrative only. While this specification may refer to "a," "an," or "some" examples or embodiments in several places, this does not mean that every such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. Furthermore, terms such as "comprising" and "including" should be understood not to limit the described embodiments to consisting only of those features mentioned; such examples and embodiments may also include features, structures, units, modules, etc., not specifically mentioned.
[0080] The various embodiments of this application will now be described in detail with reference to the accompanying drawings. It should be noted that the order in which the embodiments are presented in this application represents only a chronological order and does not represent the superiority or inferiority of the technical solutions provided by the embodiments.
[0081] It should be noted that the technical solutions provided in this application embodiment are illustrated using a line scan camera to capture moving objects as an example, but are not limited thereto.
[0082] Line scan cameras can be mounted underground to scan car chassis, mounted on the side to capture images of train carriages, or captured images of objects moving on conveyor belts. Since the speed of each moving object (car, train, conveyor belt) is different, to ensure that the captured object in each image is proportional to its actual size and that the object is not stretched or compressed, the camera's acquisition speed must match the object's movement speed.
[0083] See Figure 1 A line scan camera acquires images perpendicular to the object's direction of motion at different acquisition frequencies. When the acquisition frequency of the line scan camera (e.g., 4kHz) is lower than the object's speed, some parts of the object will not be captured, resulting in a compressed elliptical image. See [link to documentation]. Figure 2aWhen a linear scan camera acquires a line frequency (e.g., 8kHz) close to the speed of the moving object, the acquired image will be perfectly circular, meaning the vertical and horizontal axes will be of equal length. See [link / reference]. Figure 2b When the line scan camera's acquisition frequency (e.g., 11kHz) is greater than the object's speed, information duplication occurs (the same part of the object is acquired multiple times), causing the acquired image to appear as a stretched elliptical shape. See [link to documentation]. Figure 2c .
[0084] It should be noted that, for ease of description, the unit of the object's motion speed in this embodiment can be directly described as frequency. Specifically, in this embodiment, the speed of the object's motion is detected by a speed detection device, which may include, for example, a photoelectric encoder and a conveyor belt system. When the object passes the photoelectric encoder, the photoelectric encoder outputs a level signal. The photoelectric encoder mainly consists of a grating disk and a photoelectric detection device. The photoelectric encoder disk is coaxial with the conveyor belt motor. When the motor rotates, the conveyor belt carries the object placed above it. The grating disk rotates at the same speed as the motor. The photoelectric detection device, composed of electronic components such as light-emitting diodes, detects and outputs several pulse signals. By calculating the number of pulses output by the photoelectric encoder per second, the current motor speed can be obtained, and thus the object's motion speed can be determined. Therefore, in this embodiment, the frequency of the encoder's output pulse signal can also be directly described as the object's motion speed.
[0085] For example, given that the object's speed is approximately 8200Hz (the frequency of the encoder's output pulse signal), a line scan camera acquires images of the moving object at acquisition frequencies of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11 kHz (i.e., image acquisition frequencies), resulting in 11 images, which are numbered 1 to 11. The horizontal axis (the horizontal diameter passing through the center) and vertical axis (the vertical diameter passing through the center) of the circles in these 11 images are measured. The proportional relationship between the horizontal and vertical axis lengths of the images acquired at different acquisition frequencies is calculated. For specific parameters, see [link to relevant documentation]. Figure 3 The list shown is from Figure 3 The following two conclusions can be drawn:
[0086] (1) Regardless of the speed of the acquisition line frequency, the horizontal axis length of the obtained circular calibration object image remains almost unchanged, which is consistent with the imaging principle.
[0087] (2) The speed of line acquisition only affects the vertical axis length (i.e., the vertical axis length) of the obtained circular calibration object image: When the line acquisition speed is less than the object's motion speed, the ratio of the vertical axis length to the horizontal axis length is less than 1, therefore, the obtained image will be... Figure 2aThe image shown is an elliptical shape. When the sampling frequency is greater than the object's speed, the ratio of the longitudinal axis length to the transverse axis length is greater than 1, therefore it will produce... Figure 2c The image shown is elliptical. When the acquisition frequency is close to the speed of the object's movement, the ratio of the vertical axis length to the horizontal axis length is close to 1, resulting in a perfect circle. This satisfies the principle of "unchanged horizontal and vertical proportions," meaning the image remains undistorted. Figure 2b As shown.
[0088] Therefore, by simply determining whether the vertical axis length and horizontal axis length of the sample circle (calibrator) in the acquired image are the same, it can be determined whether the acquisition line frequency matches the object's movement speed. Furthermore, based on the ratio between the horizontal axis length and the vertical axis length, the relationship between the acquisition line frequency and the object's movement speed can be determined.
[0089] It should be noted that in the embodiments of this application, the pre-set calibration object moves at the same speed as the object, so that the speed of the calibration object is equal to the speed of the object.
[0090] Based on the principle of "unchanged horizontal and vertical proportions" in image non-deformation, this application proposes a method for adjusting the image acquisition frequency of a camera. The method involves acquiring an image of a pre-set calibration object moving at the same speed as the moving object, determining multiple edge coordinates of the calibration object in the image, and then determining the deformation coefficient of the calibration object based on these edge coordinates. The image acquisition frequency of the camera is then adjusted according to this deformation coefficient. This allows for obtaining the deformation coefficient by sampling the target circle only once, regardless of the object's speed or whether its current speed is known. The corrected camera acquisition speed can match the object's speed, enabling the camera to acquire and restore object information at an image acquisition frequency matching the object's speed. This significantly reduces the number of times the target circle is sampled and the deformation coefficient parameters are adjusted. Specific examples are given below.
[0091] See Figure 4 The method for adjusting the image acquisition frequency of a camera provided in this application includes:
[0092] S101. The camera captures an image of a pre-set calibration object that moves at the same speed as the moving object;
[0093] The camera mentioned above may be, for example, a line scan camera, but is not limited to a line scan camera;
[0094] The object in question is, for example, a car chassis, a product being conveyed on a conveyor belt, or a train traveling on a track.
[0095] The calibration object, for example, is a circular calibration object, such as a piece of paper with a white background and a black circle that is pasted on the surface of the moving object, or placed at the front of the moving object, and placed on the conveyor belt like the moving object, moving at the same speed and in the same direction as the conveyor belt, so that the line frequency is adjusted after passing through the image of the calibration object first, and the object image acquired subsequently will not be deformed.
[0096] S102. Determine multiple edge coordinates of the calibration object in the image, and determine the deformation coefficient of the calibration object in the image based on the multiple edge coordinates;
[0097] The multiple edge coordinates can be any coordinate positions that can determine whether the calibration object image has been deformed, such as the coordinates of the four edge tangent points of a circular calibration object;
[0098] The deformation coefficient (represented, for example, by k) can also be called the line frequency automatic adjustment coefficient;
[0099] S103. Adjust the image acquisition frequency of the camera according to the deformation coefficient;
[0100] The image acquisition frequency, such as the line acquisition frequency (referred to as line frequency) of a line scan camera, means that if an image is acquired N times in 1 second, then the image acquisition frequency = 1 / N.
[0101] Linear scan camera sensors are linear. For example, a 2048-pixel linear scan camera has 2048 pixels horizontally and typically only one pixel vertically, such as the GL0402 linear scan sensor. Its pixel size is 7µm x 7µm, meaning the pixel height captured in a single exposure is 7µm. Given the lens, focal length, and the distance between the object and the camera, according to the proportional law of diagonal triangles, the ratio of focal length to the distance between the object and the camera equals the ratio of pixel height to the actual distance S1 of the object's movement. That is:
[0102] S1 = (Distance between camera and object / Focal length) * 7µm
[0103] Therefore, in order to ensure that the acquired image is not stretched or compressed, the distance of the object's movement in each sample must be S1. In 1 second, with N samples (image acquisition frequency f = 1 / N, unit: Hz), the distance the object moves in 1 second is N*S1 = the object's velocity V*(1s). Thus:
[0104] f = S1 / V = (Distance between camera and object / Focal length) * 7µm / V
[0105] As can be seen from the above measurement of the object's speed by the photoelectric encoder, the object's speed V can be fed back by the number of pulses output by the photoelectric encoder per second. The number of pulses per second is the frequency f1, which is the frequency f1 = 1 / V input by the photoelectric encoder to the camera. Therefore:
[0106] f = (distance between camera and object / focal length) * 7um * f1 = K * f1;
[0107] Where K = (distance between camera and object to be measured / focal length) * 7um, it can be obtained by the deformation coefficient k, that is, K = 1 / k;
[0108] That is, the image acquisition frequency f of the camera can be obtained simply by using the frequency signal (i.e., f1 mentioned above) input to the camera from the photoelectric encoder.
[0109] In step S103, the image acquisition frequency of the camera is adjusted to solve the problem that the acquired object image cannot fully restore the object's information because the camera acquisition speed does not match the object's movement speed. This enables the camera to acquire and restore object information according to the image acquisition frequency that matches the object's movement speed.
[0110] In some embodiments, adjusting the image acquisition frequency of the camera according to the deformation coefficient specifically includes:
[0111] Obtain information that characterizes the velocity of the moving object;
[0112] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted.
[0113] The information mentioned above may be, for example, an encoder signal. The encoder can be considered as a device in a speed detection device for moving objects. When the object moves, the speed detection device outputs an encoder signal to the camera. The camera can determine the speed of the object through the encoder signal, and then determine whether the camera's image acquisition frequency needs to be adjusted based on the encoder signal and the deformation coefficient. If so, the camera's image acquisition frequency is adjusted according to the encoder signal and the deformation coefficient to match the speed of the object, so that all the object information is acquired by the camera or the same information is not repeatedly acquired, thereby avoiding deformation of the object in the acquired image.
[0114] In some embodiments, the speed detection device may also be a radar or other similar device;
[0115] In some embodiments, the speed detection device can also directly output the object's motion speed to the camera, so that the camera can determine whether it needs to adjust the camera's image acquisition frequency based on the object's motion speed and the deformation coefficient. If so, the camera's image acquisition frequency is determined based on the object's motion speed and the deformation coefficient, so that the camera's image acquisition frequency matches the object's motion speed.
[0116] In some embodiments, if the speed of the object's movement is detected by a photoelectric encoder, then when the photoelectric encoder detects the object, the photoelectric encoder outputs a pulse signal to the camera;
[0117] The information is the pulse signal;
[0118] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted, specifically including:
[0119] The speed of the object is determined by counting the number of pulse signals obtained.
[0120] The object's velocity is multiplied by the deformation coefficient, and the resulting product is used as the adjusted image acquisition frequency of the camera.
[0121] In some embodiments, the pulse signal output by the photoelectric encoder is a pulse signal with a fixed high and low level duty cycle;
[0122] The number of pulse signals obtained by the statistics specifically includes:
[0123] The number of high or low levels in the pulse signal obtained by counting the counter in the camera is cnt_h;
[0124] The adjusted image acquisition frequency of the camera is obtained using the following formula:
[0125] cnt = cnt_h / duty cycle;
[0126] T = (1 / camera system clock frequency) * cnt;
[0127] f1 = 1 / T;
[0128] f = K * f1;
[0129] Where K = 1 / k, k is the deformation coefficient; and f represents the adjusted image acquisition frequency of the camera.
[0130] Since the FPGA inside the camera can only process integers, in some embodiments, when K is a non-integer, the method further includes:
[0131] Adjust K to an integer; use the adjusted K to calculate f.
[0132] To reduce the calculation error in obtaining f, in some embodiments, when K is a non-integer, the method further includes:
[0133] The image acquisition frequency of the camera is updated in the following manner:
[0134] Adjusting K to a fraction, we get K = m / n;
[0135] First, the frequency of f1 is multiplied by m to obtain the multiplier value f. 11 =mf1;
[0136] Then, using the n, for the f 11 Frequency division processing is performed to obtain the updated image acquisition frequency of the camera, f = mf1 / n.
[0137] To adjust the camera's acquisition frequency, in some embodiments, when the counter in the camera counts to cnt_h / m, the frequency f1 is multiplied by m to obtain the multiplied frequency value f. 11 ;
[0138] Every 2*n count values, for the f 11 Perform a frequency division process, dividing the frequency by 1 / n each time, for a total of n divisions.
[0139] To ensure the image exhibits a clear black and white effect, highlighting the outline of the calibration object and improving the accuracy of subsequently determining the coordinates of the four edge tangent points of the calibration object, in some embodiments, after acquiring the image and before determining the multiple edge coordinates, the method further includes:
[0140] The image is binarized to obtain a binarized image.
[0141] To remove dark details inside the target foreground circle (i.e., the calibration area) in the binarized image and fill in small holes within the image, which is beneficial for subsequent extraction of the coordinates of the four edge tangent points of the calibration object, in some embodiments, after obtaining the binarized image and before determining the multiple edge coordinates, the method further includes:
[0142] A morphological closing operation is performed on the binarized image.
[0143] In order to obtain the coordinates of the four tangent points of the top, bottom, left, and right edges of the largest connected component of the calibration object, in some embodiments, the determination of the plurality of edge coordinates specifically includes:
[0144] The largest connected component in the image is determined using a connected component algorithm.
[0145] Determine the coordinates of multiple edges of the largest connected component.
[0146] Circular objects have a fixed radius, and their diameter is the same regardless of the angle in which the sample is placed. Therefore, in some embodiments, the calibration object is a circular calibration object, and the multiple edge coordinates include the coordinates of the four tangent points of the circular calibration object's top, bottom, left, and right edges.
[0147] The deformation coefficient is the ratio of the horizontal axis passing through the center of the circular calibration object to the vertical axis passing through the center of the circle.
[0148] See Figure 5 This application provides a method for adjusting the image acquisition frequency of a camera, the specific steps of which include:
[0149] Step S201: Perform binarization processing on the acquired calibration object image (the specific binarization processing operation will be illustrated in the following example) to obtain a binarized image;
[0150] Step S202: Perform a morphological closing operation on the binarized image (the specific morphological closing operation will be illustrated in the following examples) to obtain the image after the morphological closing operation.
[0151] Step S203: Extract multiple coordinates at the edges of the largest connected region in the image after morphological closing operation.
[0152] For example, the four-connected-domain method is used to extract the maximum connected domain (i.e., the image region of the calibration object), thereby determining the coordinates of the four tangent points of the maximum connected domain (top, bottom, left, and right). Finally, the start and end coordinate attributes (x and y directions) of the calibration object (e.g., a circular calibration object) are obtained. start ,x end ,y start ,y end ).
[0153] Step S204: Calculate the deformation coefficient.
[0154] For example, the line frequency automatic adjustment coefficient k can be calculated using the following formula:
[0155] k=(x end -x start ) / (y end -y start )
[0156] In other words, by calculating the ratio of the horizontal and vertical axis lengths of the circular calibration object in the image, the final automatic line frequency adjustment coefficient k, i.e., 1 / K, can be obtained. This method can avoid the correction coefficient error caused by measurement error and calculation error of the parameter required to obtain K (the distance between the camera and the object under test).
[0157] Step S205: Line frequency correction.
[0158] For example, when k is greater than 1, it means that the horizontal axis of the circular calibration object's image is longer than the vertical axis, the camera's line frequency is relatively low, and some image information is missing and not acquired. Therefore, according to the preset rules, the camera's image acquisition frequency is increased, so that the camera can acquire more object image information to form a complete object image and avoid object image distortion.
[0159] Conversely, when k is less than 1, it means that the vertical axis of the circular calibration object's image is greater than the horizontal axis, the camera's line frequency is relatively high, and some repetitive image information is collected. Therefore, the camera's image acquisition frequency is reduced according to the preset rules to avoid the camera collecting repetitive object image information and avoid deformation of the object image.
[0160] In some embodiments, the preset rule may be, for example, adjusting the camera's image acquisition frequency according to a preset step size until the calculated k = 1, or the difference between k and 1 is within a preset range.
[0161] Alternatively, the preset rules include:
[0162] The image acquisition frequency of the camera is adjusted by using the object's velocity and deformation coefficient k.
[0163] The speed of the object can be obtained by a speed acquisition device or determined by the signal output by the speed acquisition device. For example, by counting the encoder signal output by the speed acquisition device to the camera, the time T for the grating disk to rotate one revolution can be determined, and T′=Tk can be calculated; the image acquisition frequency of the camera can be adjusted to 1 / T′.
[0164] Adjusting the image acquisition frequency of the camera, also known as frequency division and multiplication processing, includes frequency division and / or frequency multiplication. Frequency division means reducing the frequency, and frequency multiplication means increasing the frequency. That is, when adjusting the frequency, you can first divide the frequency and then multiply it, or you can first multiply the frequency and then divide it, or you can only divide the frequency or only multiply it.
[0165] In some embodiments, the camera uses an FPGA chip as the main control chip to count the number of pulse signals output by the photoelectric encoder. The system clock of the FPGA chip can reach more than 100MHz (i.e., the counter counts from 1 to 100000000 within 1 second), meaning that the accuracy of each count can reach less than 10ns. Therefore, the timing error of this counter scheme is small, and the accuracy in calculating its speed is relatively accurate.
[0166] In some embodiments, the current motor speed can be reflected by calculating the number of pulses output by the photoelectric encoder per second. However, when the object moves at a high speed, the conveyor belt travels a large distance within the statistical time of 1 second. This means that the image of the object on the conveyor belt over this distance may be distorted because its speed is too fast to capture. Furthermore, when the object's speed changes in real time, even if the speed obtained after 1 second is not the current speed, the image acquisition frequency corrected according to this speed will not match the current speed, and the image may still be distorted. Therefore, to reduce delay and for objects with variable speeds, a photoelectric encoder with a fixed high / low duty cycle can be used. This means that the proportion of the high and low levels of the encoder's output pulse signal to the entire cycle T of one rotation of the grating disk is fixed. Thus, the time T can be derived by simply counting the number of high or low levels, and the instantaneous frequency f1 can be obtained.
[0167] For example, if the photoelectric encoder outputs 10 pulses within 1 second (starting from a low level by default, T1, T2, T3...T10 each initiate a high level), assuming a duty cycle of 50%, the camera's system clock resets the counter at the rising edge from low to high, and then counts the high levels until the level goes low. Assuming the number of high levels cnt_h at time T1 is 5, and the camera's system clock frequency is 100MHz, then the counter value cnt for the entire cycle from T1 to T2 should be 5 / 50% = 10, and the time T consumed is (1 / 100MHz)*10 = 100ns. The number of pulses per unit time is the frequency, i.e., its instantaneous frequency f1 = 1 / 100ns.
[0168] Therefore, using an encoder with a fixed duty cycle can reduce the duration required for the statistical period T, thus reducing latency. Furthermore, the instantaneous velocity of the moving object at each time point can be obtained, and even in cases of variable-speed motion, the camera's image acquisition frequency can be adjusted in real time. In other words, the real-time performance of updating the camera's image acquisition frequency using the technical solution provided in this application embodiment is also improved.
[0169] Additionally, during use, the object may suddenly stop moving; see [link / reference]. Figure 6 If the counter does not reach the next low-to-high transition in time T3, it will continue counting until the object starts moving again and generates a new level signal. This pause time will be mistakenly taken as the cycle time, causing a calculation error.
[0170] Therefore, in some embodiments, according to f = K * f1, when K is greater than 1, the frequency needs to be increased, and vice versa. In order to reduce the error in calculating K, it can be accurate to the decimal point. However, since the data used by the camera's FPGA is all integer, it is necessary to convert the decimal part of K into the simplest fraction, i.e., K = m / n, where m and n are the numerator and denominator of the simplest fraction. Then f = K * f1 = m * f1 / n, that is, first perform frequency multiplication on f1, and then perform frequency division on the obtained frequency to get f.
[0171] For example, within 1 second, the photoelectric encoder outputs 10 pulses (starting from a low level by default, then T1, T2, T3...T...). 10 Each time a high level is initiated, assuming a duty cycle of 50%, the number of high levels at time T1 (cnt_h) is 5, and the camera's system clock frequency is 100MHz, then the period time of f is T′=1 / f=n / (m*f1)=n*T / m=n*(1 / 100M*cnt_h / 50%) / m=(cnt_h / m)*(2*n)*(1 / 100M). Using another counter, the count is reset from high level to low level. When the counter reaches cnt_h / m, the camera generates a frequency multiplication signal. This process multiplies f1, obtaining the multiplied image acquisition frequency f. 11 Then, the frequency-divided signal is re-output every 2*n high-level cycles, i.e., for f... 11 The frequency division process is performed once, and then repeated (n-1) times to obtain the final image acquisition frequency f. That is, after frequency doubling, the frequency division process is performed n times in total, and each time the frequency is divided according to 1 / n to obtain the final image acquisition frequency f.
[0172] Assuming K = 1.25, i.e., m = 5 and n = 4, if calculated using integer methods, f = 10 / 4 * 5 = 10. If m = 15 and n = 12, K = 1.25 is still satisfied, but f = 10 / 12 * 15 = 0.8333 * 15. Since the integer part of 0.8333 is 0, we round down to the nearest integer, resulting in f = 0. This calculation method introduces a significant error. Therefore, in this embodiment, the simplest fraction method is used for frequency division and doubling, ensuring that the frequency division calculation error remains consistent with the frequency doubling calculation error, thereby eliminating the error in the final image acquisition frequency f.
[0173] In some embodiments, the binarization process described in step S201 above is referred to as... Figure 7 For example, specifically including:
[0174] Step S301: Acquire a clear black and white image of the calibration object (e.g., a white background with a black circle or a black background with a white circle);
[0175] Step S302: Perform median filtering on the calibration object image;
[0176] Step S303: Select the optimal threshold.
[0177] The acquired image, consisting of a white background and a black circular or elliptical target foreground, is used as a reference image. Its grayscale value distribution is relatively regular. (See also...) Figure 8 The horizontal axis represents the image grayscale values from 0 to 255, and the vertical axis represents the number of pixels counted for each grayscale value. It can be seen that the image pixel grayscale values mainly fall on the background area and the target area, showing a double-peak and valley phenomenon. Therefore, the double-peak method is used on the image after median filtering, and the grayscale value T of the valley between the two peaks is selected as the optimal threshold to distinguish the background area and the target area.
[0178] Step S304: Binarize the median-filtered image. Compare the grayscale value Gray(x,y) of each pixel in the median-filtered image with the optimal threshold T to obtain the binarized image result.
[0179]
[0180] Where f(x,y) represents the binarized image result; x and y are the horizontal and vertical coordinates of the pixel; Gray(x,y) represents the gray value of the pixel at coordinates (x,y); and T represents the optimal threshold.
[0181] In some embodiments, the morphological closing operation described in step S202 above, see [link to documentation]. Figure 9 For example, specifically including:
[0182] Step S401: Select structural elements.
[0183] As the basic unit of operation, the appropriateness of the choice of structuring elements directly affects the results of morphological closing operations, leading to errors in subsequent edge extraction. Therefore, when constructing the structuring elements:
[0184] First, ensure that the structural elements are symmetric matrices to prevent image shifting.
[0185] Secondly, the shape of the selected structural element must be determined, as different shapes will produce different computational results, leading to different image effects. In order to fill the interior of the target circle and denoise the image, and finally to obtain the edge of the circle, the shape of the circle must not be affected. The advantage of the disk-shaped structural unit is that it is isotropic, and direction-independent operations are performed on the edge of the circle, so the processing results of the edge points are consistent.
[0186] Finally, the size of the structuring element must be determined. If the structuring element size is too small, the closing operation cannot fill the gaps inside the circle. Conversely, if the size is too large, it may cause the target area and the interference area in the image to stick together, resulting in greater interference. Furthermore, it may lead to excessive caching and wasted resources during hardware implementation.
[0187] To save hardware resources, for example, a 3x3 disk transformed into a square can be used as the structural element, and its matrix form is as follows:
[0188] Step S402: Dilate the highlighted areas (i.e., the circular calibration area) in the binarized image. The image after dilation has a larger highlighted area than the original image. During the operation, adjacent areas are replaced with the maximum pixel values, thus increasing the highlighted area. The dilation algorithm is used to perform an OR operation between the 3*3 structuring element unit and the binarized image in a top-to-bottom and left-to-right order:
[0189] If the calculation results within the 3*3 window (i.e., the calculation results of the "OR" operation) are all 0, then the final result of the pixel is 0; otherwise, the output result is 1, thus filling the small black holes in the target bright circle. At the same time, the edge of the target circle in the image result will appear thicker.
[0190] Step S403: Perform an erosion operation on the dilated image to remove the highlighted areas. The eroded image will have smaller highlighted areas than the original image. During the operation, adjacent areas are replaced with the minimum pixel values, reducing the highlighted areas. First, a 3x3 filter window is formed according to the structural element units. Then, an OR operation is performed on the data of the 9 pixels within the filter window: if all the target data in the filter window are 1, the result for that pixel is 1; otherwise, if any is 0, the output result is 0.
[0191] This process can eliminate some small, isolated noise, and at the same time restore the edge thickening caused by the expansion to its original state.
[0192] To verify the effect of camera line frequency correction, an object was moved at different speeds, and 11 images were acquired at each speed. The automatic line frequency adjustment coefficient k was obtained as 8.0713, 4.1059, 2.7213, 2.0419, 1.6532, 1.3722, 1.1653, 1.0338, 0.9227, 0.8174, and 0.7479. The camera's acquisition frequency was then corrected using k. Images of objects moving at the same speed were acquired using the corrected line frequency, i.e., 11 images numbered 1 to 11 (the same image number corresponds to the same object speed). The horizontal and vertical axis lengths of the circles in these 11 images were measured, and the proportional relationship between the horizontal and vertical axis lengths of the images acquired before and after camera line frequency correction was calculated. See [link to relevant documentation]. Figure 10 The results obtained after the test sample circle ratio correction are close to 1, indicating that the acquisition line frequency has been automatically matched and the method is feasible.
[0193] See Figure 11 An image acquisition method provided in this application includes:
[0194] S501. When the speed of the object changes, the image acquisition frequency of the camera is adjusted using the above method for adjusting the image acquisition frequency of the camera.
[0195] S502. Using the adjusted image acquisition frequency, perform image acquisition on the object.
[0196] See Figure 12 This application provides a computing device, which may be, for example, a camera itself, or a module disposed in the camera for performing the above-described method. The device includes:
[0197] Processor 600 is used to read the program from memory 620 and execute the following procedures:
[0198] The camera captures images of a pre-set calibration object that moves at the same speed as the moving object.
[0199] Determine multiple edge coordinates of the calibration object in the image, and determine the deformation coefficient of the calibration object in the image based on the multiple edge coordinates;
[0200] The image acquisition frequency of the camera is adjusted according to the deformation coefficient.
[0201] In some embodiments, the processor 600 adjusts the image acquisition frequency of the camera according to the deformation coefficient, and performs the following process:
[0202] Obtain information that characterizes the velocity of the moving object;
[0203] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted.
[0204] In some embodiments, the processor 600 is further configured to read a program from the memory 620 and execute the following processes:
[0205] If the speed of the object's movement is detected by a photoelectric encoder, then when the photoelectric encoder detects the object, the photoelectric encoder outputs a pulse signal to the camera;
[0206] The information is the pulse signal;
[0207] Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted, specifically including:
[0208] The speed of the object is determined by counting the number of pulse signals obtained.
[0209] The object's velocity is multiplied by the deformation coefficient, and the resulting product is used as the adjusted image acquisition frequency of the camera.
[0210] In some embodiments, the processor 600 is further configured to read a program from the memory 620 and execute the following processes:
[0211] The pulse signal output by the photoelectric encoder is a pulse signal with a fixed high and low level duty cycle;
[0212] The number of pulse signals obtained by the statistics specifically includes:
[0213] The number of high or low levels in the pulse signal obtained by counting the counter in the camera is cnt_h;
[0214] The adjusted image acquisition frequency of the camera is obtained using the following formula:
[0215] cnt = cnt_h / duty cycle;
[0216] T = (1 / camera system clock frequency) * cnt;
[0217] f1 = 1 / T;
[0218] f = K * f1;
[0219] Where K = 1 / k, k is the deformation coefficient; and f represents the adjusted image acquisition frequency of the camera.
[0220] In some embodiments, when K is a non-integer, the processor 600 further performs:
[0221] Adjust K to an integer; use the adjusted K to calculate f.
[0222] In some embodiments, when K is a non-integer, the processor 600 further performs the following process:
[0223] The image acquisition frequency of the camera is updated in the following manner:
[0224] Adjusting K to a fraction, we get K = m / n;
[0225] First, the frequency of f1 is multiplied by m to obtain the multiplier value f. 11 =mf1;
[0226] Then, using the n, for the f 11 Frequency division processing is performed to obtain the updated image acquisition frequency of the camera, f = mf1 / n.
[0227] In some embodiments, the processor 600 is further configured to read a program from the memory 620 and execute the following processes:
[0228] When the counter in the camera counts to cnt_h / m, the frequency of f1 is multiplied by m to obtain the multiplied value f. 11 ;
[0229] Every 2*n count values, for the f 11 Perform a frequency division process, dividing the frequency by 1 / n each time, for a total of n divisions.
[0230] In some embodiments, after acquiring the image and before determining the plurality of edge coordinates, the processor 600 is further configured to read the program in the memory 620 and execute the following process:
[0231] The image is binarized to obtain a binarized image.
[0232] In some embodiments, after obtaining the binarized image and before determining the plurality of edge coordinates, the processor 600 is further configured to read the program in the memory 620 and execute the following process:
[0233] A morphological closing operation is performed on the binarized image.
[0234] In some embodiments, the processor 600 is further configured to read a program from the memory 620, determine the plurality of edge coordinates, and perform the following processes:
[0235] The largest connected component in the image is determined using a connected component algorithm.
[0236] Determine the coordinates of multiple edges of the largest connected component.
[0237] In some embodiments, the processor 600 is further configured to read a program from the memory 620 and execute it:
[0238] The calibration object is a circular calibration object, and the plurality of edge coordinates include the coordinates of the four tangent points of the top, bottom, left and right edges of the circular calibration object;
[0239] The deformation coefficient is the ratio of the horizontal axis passing through the center of the circular calibration object to the vertical axis passing through the center of the circle.
[0240] In some embodiments, the processor 600 is further configured to read a program from the memory 620 and execute the following processes:
[0241] When the object's speed changes, the method for adjusting the camera's image acquisition frequency is executed again to adjust the camera's image acquisition frequency so that the camera can acquire images of the object using the adjusted image acquisition frequency.
[0242] In some embodiments, the apparatus provided in this application further includes a transceiver 610 for receiving and sending data under the control of a processor 600.
[0243] Among them, Figure 12 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 600) and memory (memory 620). The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 610 can be multiple elements, including a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.
[0244] In some embodiments, the image processing apparatus provided in this application further includes a user interface 630. The user interface 630 may be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.
[0245] The processor 600 is responsible for managing the bus architecture and general processing, while the memory 620 can store the data used by the processor 600 when performing operations.
[0246] In some embodiments, the processor 600 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
[0247] The computing device provided in this application embodiment can be the camera itself, or specifically a desktop computer, portable computer, smartphone, tablet computer, personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), memory, input / output devices, etc. Input devices may include a keyboard, mouse, touchscreen, etc., and output devices may include display devices such as liquid crystal displays (LCDs) and cathode ray tubes (CRTs).
[0248] The memory may include read-only memory (ROM) and random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In the embodiments of this application, the memory may be used to store the program of any of the methods provided in the embodiments of this application.
[0249] The processor executes any of the methods described in the embodiments of this application according to the program instructions stored in the memory.
[0250] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the methods described in the above embodiments. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0251] This application provides a computer-readable storage medium for storing computer program instructions used in the apparatus provided in the above-described embodiments, including a program for performing any of the methods provided in the above-described embodiments. The computer-readable storage medium may be a non-transitory computer-readable medium.
[0252] The computer-readable storage medium can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0253] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0254] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0255] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0256] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0257] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for adjusting the image acquisition frequency of a camera, characterized in that, The method includes: The camera captures images of a pre-set calibration object that moves at the same speed as the moving object. Determine multiple edge coordinates of the calibration object in the image, and calculate the ratio of the horizontal axis length to the vertical axis length of the calibration object based on the multiple edge coordinates to obtain the deformation coefficient of the calibration object in the image; The image acquisition frequency of the camera is adjusted according to the deformation coefficient; Specifically, adjusting the image acquisition frequency of the camera according to the deformation coefficient includes: Obtain information that characterizes the velocity of the moving object; Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted.
2. The method according to claim 1, characterized in that, If the speed of the object's movement is detected by a photoelectric encoder, then when the photoelectric encoder detects the object, the photoelectric encoder outputs a pulse signal to the camera; The information is the pulse signal; Using the information and the deformation coefficient, the image acquisition frequency of the camera is adjusted, specifically including: The speed of the object is determined by counting the number of pulse signals obtained. The object's velocity is multiplied by the deformation coefficient, and the resulting product is used as the adjusted image acquisition frequency of the camera.
3. The method according to claim 2, characterized in that, The pulse signal output by the photoelectric encoder is a pulse signal with a fixed high and low level duty cycle; The number of pulse signals obtained by the statistics specifically includes: The number of high or low levels in the pulse signal obtained by counting the counter in the camera is cnt_h; The adjusted image acquisition frequency of the camera is obtained using the following formula: cnt = cnt_h / duty cycle; T = (1 / camera system clock frequency) * cnt; f1 = 1 / T; f = K * f1; Where K = 1 / k, k is the deformation coefficient; and f represents the adjusted image acquisition frequency of the camera.
4. The method according to claim 3, characterized in that, When K is a non-integer, the method further includes: The image acquisition frequency of the camera is updated in the following manner: Adjusting K to a fraction, we get K = m / n; First, the frequency of f1 is multiplied by m to obtain the multiplier value f. 11 =mf1; Then, using the n, for the f 11 Frequency division processing is performed to obtain the updated image acquisition frequency of the camera, f = mf1 / n.
5. The method according to claim 4, characterized in that, When the counter in the camera counts to cnt_h / m, the frequency of f1 is multiplied by m to obtain the multiplied value f. 11 ; Every 2*n count values, for the f 11 Perform a frequency division process, dividing the frequency by 1 / n each time, for a total of n divisions.
6. An image acquisition method, characterized in that, The method includes: When the speed of an object changes, the image acquisition frequency of the camera is adjusted using the method described in claim 1. The object is imaged using the adjusted image acquisition frequency.
7. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method according to any one of claims 1 to 6.
8. A computer program product for use in a computer, characterized in that, Includes a software code portion that, when the product is run on the computer, is used to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Line frequency adjusting method and system for linear array camera
CN117768767A