Translation machine linear motion method, system and equipment based on image recognition and medium

By installing an image recognition device on the translation machine, using image recognition algorithm and edge detection technology, the problem of unstable translation machine motion caused by GPS positioning errors is solved, and high-precision linear motion and data monitoring are achieved.

CN120339400AInactive Publication Date: 2025-07-18TIANJIN KERUISIQI INTELLIGENT CONTROL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510798311.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the translation machine has large GPS positioning errors due to lack of network support, resulting in insufficient position and attitude control accuracy of the translation machine in the ditch, affecting the working accuracy.

Method used

The high-definition image recognition device is installed on the body of the translation machine. The position of the computer body relative to the ditch is real-time through the image recognition algorithm, and edge detection and fitting is performed using the canny algorithm and the least squares method to adjust the movement of the translation machine to maintain linear motion.

Benefits of technology

It realizes high-precision linear motion of the translation machine without network support, ensures the accuracy and stability of the operation, reduces costs and improves data value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339400A_ABST
    Figure CN120339400A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and provides a translation machine linear motion method, system and device based on image recognition and a medium, and the method comprises the steps: obtaining a trench image through an image recognition device on a translation machine; preprocessing the channel image; performing edge detection on the preprocessed image through a canny algorithm to obtain a channel edge point set; performing screening and linear fitting on the ditch edge point set to obtain a left side ditch boundary straight line and a right side ditch boundary straight line; superposing the left-side ditch boundary straight line and the right-side ditch boundary straight line with the ditch image to obtain a translation machine left-side motion straight line and a translation machine right-side motion straight line; and adjusting the movement of the translation machine according to the translation machine left-side movement straight line and the translation machine right-side movement straight line. The image recognition device is installed at the high position of the translation machine, the position of the machine body of the translation machine relative to the ditch is calculated in real time, movement of the translation machine is adjusted according to the threshold value, and the purpose of linear movement of the translation machine is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a linear motion method, system, device and medium of a translation machine based on image recognition. Background Art

[0002] The translation machine straddles the water intake ditch and has a huge fuselage. At present, two high-precision GPSs are used by the translation machine to obtain positioning information, collect the current positions of each GPS, and calculate the motion straight lines of the two GPSs. Hardware requires two differential GPSs to provide high-precision positioning. If there is no network, the correction information of the differential GPS cannot be obtained through conventional network transmission. Even if the two GPS devices work normally, without the support of real-time differential data, the error will increase significantly, especially when controlling the position and attitude of the translation machine, seriously affecting the operation accuracy. The error accumulation may be more significant during long-term operation. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the related art. For this reason, the present invention provides a linear motion method, system, device and medium of a translation machine based on image recognition, which realizes installing a high-definition image recognition device at a high position of the translation machine fuselage. According to the image recognition algorithm, the position of the translation machine fuselage relative to the ditch is calculated in real time. Once it is found that the angle between the fuselage and the ditch exceeds a preset threshold, it is determined as abnormal, and the motion of the translation machine is adjusted to achieve the purpose of the linear motion of the translation machine and ensure the normal operation of the translation machine. The image recognition device will transmit the real-time working image data of the translation machine to the cloud platform for monitoring.

[0004] The present invention provides a linear motion method of a translation machine based on image recognition, including: S1: Obtain the ditch image through the image recognition device on the translation machine; S2: Preprocess the ditch image to obtain a preprocessed image; S3: Perform edge detection on the preprocessed image through the canny algorithm to obtain a ditch edge point set; S4: Screen and linearly fit the ditch edge point set to obtain the left ditch boundary straight line and the right ditch boundary straight line; S5: Superimpose the left ditch boundary straight line and the right ditch boundary straight line on the ditch image to obtain the left motion straight line of the translation machine and the right motion straight line of the translation machine; S6: Adjust the motion of the translation machine according to the left motion straight line of the translation machine and the right motion straight line of the translation machine.

[0005] According to the linear motion method of a translation machine based on image recognition provided by the present invention, the image recognition device is also installed at the middle position of the translation machine, and both sides of the ditch are located on the left and right sides of the image recognition device respectively.

[0006] A linear motion method of a translation machine based on image recognition provided by the present invention further includes the S2 step, which includes: S21: Convert the ditch image into a binary image; Obtain the gray threshold of the ditch image by using the Otsu method, set the pixels greater than or equal to the gray threshold to black, and set the pixels less than the gray threshold to white; S22: Perform erosion processing and dilation processing on the binary image to obtain a preprocessed image; Set the size of the erosion kernel, perform convolution processing on the binary image in the erosion kernel to obtain an eroded image; Set the size of the dilation kernel, perform convolution processing on the eroded image in the dilation kernel to obtain a preprocessed image.

[0007] A linear motion method of a translation machine based on image recognition provided by the present invention further includes the S4 step, S41: Set screening conditions, and the screening conditions include the tangent direction angle threshold and the edge point distance; Set the left tangent direction angle threshold, the right tangent direction angle threshold, and the edge point distance according to empirical data; S42: Calculate the tangent direction angle of the points in the ditch edge point set through the Sobel operator; screen the tangent direction angle through the left tangent direction angle threshold to obtain the initial left ditch initial straight line; screen the tangent direction angle through the right tangent direction angle threshold to obtain the right ditch initial straight line; S43: Calculate the distance from the points in the ditch edge point set to the initial left ditch straight line, and compare it with the edge point distance, and screen out the points with a distance less than the edge point distance to obtain the left fitting edge point set; S44: Calculate the distance from the points in the ditch edge point set to the initial right ditch straight line, and compare it with the edge point distance, and screen out the points with a distance less than the edge point distance to obtain the right fitting edge point set; S45: Perform linear fitting on the left fitting edge point set by the least squares method to obtain the left ditch boundary straight line, and perform linear fitting on the right fitting edge point set by the least squares method to obtain the right ditch boundary straight line.

[0008] A linear motion method of a translation machine based on image recognition provided by the present invention further includes the S5 step, S51: Select the intersection point of the left ditch boundary straight line and the upper edge of the ditch image and the intersection point of the left ditch boundary straight line and the lower edge of the ditch image to form the left moving straight line L1 of the translation machine; S52: Select the intersection point of the right ditch boundary line and the upper edge of the ditch image, and the intersection point of the right ditch boundary line and the lower edge of the ditch image to form the right movement line L2 of the transplanter. S53: Calculate the intersection point of L1 and L2.

[0009] According to a straight-line movement method of a transplanter based on image recognition provided by the present invention, in step S6, When the intersection point of L1 and L2 is not within the threshold range, set the speeds of the side wheels on both sides of the transplanter according to the offset direction of the intersection point. When the intersection point of L1 and L2 is within the threshold range, drive the wheels on both sides of the transplanter to move at the same speed and in the same direction.

[0010] According to a straight-line movement method of a transplanter based on image recognition provided by the present invention, in step S6, set the threshold range according to the terrain and the condition of the equipment itself. When the intersection point of L1 and L2 is not within the threshold range and is on the left side, the speed of the right wheel is too fast, and set the driving speed of the left wheel to twice the original speed; obtain the ditch image in real time. When the intersection point of L1 and L2 is within the threshold range, the driving speed of the left wheel resumes to the original speed. When the intersection point of L1 and L2 is not within the threshold range and is on the right side, the speed of the left wheel is too fast, and set the driving speed of the right wheel to twice the original speed. Obtain the ditch image in real time. When the intersection point of L1 and L2 is within the threshold range, the driving speed of the right wheel resumes to the original speed.

[0011] The present invention also provides a straight-line movement system of a transplanter based on image recognition for executing any one of the above-mentioned straight-line movement methods of a transplanter based on image recognition, including: an image acquisition module, which acquires a ditch image through an image recognition device on the transplanter; A preprocessing module, which preprocesses the ditch image to obtain a preprocessed image; An edge detection module, which performs edge detection on the preprocessed image through the canny algorithm to obtain a ditch edge point set; A screening and fitting module, which screens and linearly fits the ditch edge point set to obtain a left ditch boundary line and a right ditch boundary line; An overlay module, which overlays the left ditch boundary line and the right ditch boundary line with the ditch image to obtain a left movement line of the transplanter and a right movement line of the transplanter; An adjustment module, which adjusts the movement of the transplanter according to the left movement line of the transplanter and the right movement line of the transplanter.

[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of any one of the above-mentioned linear motion methods of a translation machine based on image recognition are implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned linear motion methods of a translation machine based on image recognition are implemented.

[0014] One or more of the above technical solutions in the embodiments of the present invention have at least one of the following technical effects: A linear motion method, system, device, and medium of a translation machine based on image recognition provided by the present invention install a high-definition image recognition device at a high position of the translation machine body. According to the image recognition algorithm, the position of the translation machine body relative to the ditch is calculated in real time. Once it is found that the angle between the machine body and the ditch exceeds a preset threshold, it is determined as abnormal, and the movement of the translation machine is adjusted to achieve the purpose of linear motion of the translation machine, ensuring the normal operation of the translation machine. The image recognition device will transmit the real-time working image data of the translation machine to the cloud platform for monitoring. It has the characteristics of high efficiency, real-time, accuracy, automation, and intelligence, can save costs, and improve data value.

[0015] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 is a schematic flowchart of a linear motion method of a translation machine based on image recognition provided by the present invention.

[0018] Figure 2 is a ditch image of an embodiment of a linear motion method of a translation machine based on image recognition provided by the present invention.

[0019] Figure 3 is a binary image of an embodiment of a linear motion method of a translation machine based on image recognition provided by the present invention.

[0020] Figure 4It is the preprocessed image of an embodiment of the linear motion method of a translation machine based on image recognition provided by the present invention.

[0021] Figure 5 It is the edge detection image of an embodiment of the linear motion method of a translation machine based on image recognition provided by the present invention.

[0022] Figure 6 It is the ditch boundary image of an embodiment of the linear motion method of a translation machine based on image recognition provided by the present invention.

[0023] Figure 7 It is the superimposed image of an embodiment of the linear motion method of a translation machine based on image recognition provided by the present invention.

[0024] Figure 8 It is the structural schematic diagram of a linear motion system of a translation machine based on image recognition provided by the present invention.

[0025] Figure 9 The structural schematic diagram of the electronic device provided by the present invention.

[0026] Reference signs: 101, image acquisition module; 102, preprocessing module; 103, edge detection module; 104, screening and fitting module; 105, superimposing module; 106, adjustment module; 201, processor; 202, communication bus; 203, communication interface; 204, memory. Detailed implementation manners

[0027] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present invention fall within the protection scope of the present invention. The following embodiments are used to illustrate the present invention but cannot be used to limit the scope of the present invention.

[0028] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without conflict, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0029] The following will combine with Figures 1 to 9 to describe a linear motion method, system, device and medium of a translation machine based on image recognition according to the present invention.

[0030] As Figure 1 shown, a linear motion method of a translation machine based on image recognition includes: S1: Obtain a ditch image through an image recognition device on the translation machine; The image recognition device is installed at the middle position of the translation machine. The two sides of the ditch are respectively located on the left and right sides of the image recognition device. The image recognition device includes a photosensitive camera, a photosensitive camera lens dust remover, an image sensor, a main control core CPU, a data storage unit and a network transmission unit.

[0031] A true-color image of the ditch can be obtained through the image recognition device. The ditch image is as Figure 2 shown. The image recognition device transmits the real-time working image data of the translation machine to the cloud platform for monitoring.

[0032] S2: Preprocess the ditch image to obtain a preprocessed image; S21: Convert the ditch image into a binary image; the binary image is as Figure 3 shown; Obtain the gray threshold of the ditch image by using the Otsu method. Set the pixels greater than or equal to the gray threshold to black, and set the pixels less than the gray threshold to white; The Otsu method assumes that the image pixels can be divided into two parts, background and objects, according to the global threshold, and calculates the optimal threshold to distinguish these two types of pixels, so that the distinction between the two types of pixels is the largest. The Otsu method threshold adopts the principle of maximum between-class variance and is suitable for the situation where the overall gray distribution of the image presents "double peaks". The Otsu method will automatically find a threshold to make the between-class variance of the two divided parts the largest.

[0033] S22: Perform erosion processing and dilation processing on the binary image to obtain a preprocessed image; Set the size of the erosion kernel, and perform convolution processing on the binary image in the erosion kernel to obtain an erosion image; In some specific embodiments of the present invention, take the minimum value in the 3×3 area of the binary image, that is, take 0 (black). As long as there is black in the 3×3 range of the original picture, this pixel point is black.

[0034] Erosion processing erodes the boundaries of foreground objects and removes small-scale details from the image. However, it also reduces the size of the region of interest. Convolving an odd-sized convolutional kernel of any shape in the image, if all the pixels under the kernel are 1, the pixel (1 or 0) in the original image is considered 1; otherwise, it is eroded and set to zero. Therefore, depending on the size of the kernel, all pixels near the boundary are discarded, thus reducing the thickness or size of the foreground object or the white area in the image.

[0035] Set the size of the dilation kernel and perform convolution processing on the eroded image in the dilation kernel to obtain a preprocessed image; the preprocessed image is as Figure 4 shown.

[0036] In some specific embodiments of the present invention, a matrix with a specified range of 3×3 is designated, and the dilation kernel is designated as a 3×3 matrix with all values being 1. After convolution calculation, the value of the pixel point is equal to the maximum value within the 3×3 range centered on this pixel point. As long as the surrounding white part is included, it becomes white.

[0037] Dilation processing usually uses a structuring element to detect and expand the shapes contained in the input image. Dilation processing is the opposite of erosion processing. In dilation processing, an odd-sized convolutional kernel of any shape in the image is convolved. If at least one pixel under the kernel is 1, then this pixel element is 1. To remove noise, dilation processing is performed after erosion processing.

[0038] S3: Perform edge detection on the preprocessed image through the canny algorithm to obtain a set of ditch edge points; Use the Sobel operator to calculate the gradient values of the grayscale image in the horizontal and vertical directions, thereby obtaining the gradient intensity and direction of each pixel point.

[0039] For each pixel point, compare the gradient values of the two adjacent pixel points in its gradient direction, and only retain the pixel point with a maximum gradient value in the gradient direction, which helps to eliminate the blurring effect on the edge.

[0040] The pixel points are divided into three categories: strong edges, weak edges, and non-edges. When the gradient value of a pixel point is higher than a higher threshold, it is classified as a strong edge. When the gradient value of a pixel point is lower than a lower threshold, it is classified as a non-edge. When the gradient value of a pixel point is between the higher and lower thresholds, it is classified as a weak edge.

[0041] Connect the weak edges and the surrounding strong edges to form a complete edge; the pixel points located inside the edge constitute the set of ditch edge points; the edge detection image is as Figure 5 shown.

[0042] S4: Obtain the left ditch boundary line and the right ditch boundary line by screening and linear fitting of the ditch edge point set; S41: Set the screening conditions, which include the tangent direction angle threshold and the edge point distance; Set the left tangent direction angle threshold, the left tangent direction angle threshold, and the edge point distance according to empirical data; S42: Calculate the tangent direction angle of the points in the ditch edge point set through the Sobel operator; Screen the tangent direction angle through the left tangent direction angle threshold to obtain the initial left ditch initial line; Screen the tangent direction angle through the right tangent direction angle threshold to obtain the initial right ditch line; The Sobel operator is mainly used to calculate the gradients of the image in the horizontal and vertical directions. Specifically, two convolution kernels are used to calculate the gradients in the horizontal and vertical directions respectively; The convolution kernel in the horizontal direction : The convolution kernel in the vertical direction : Perform a convolution operation on the image to obtain the gradient value of each pixel point and For each point in the ditch edge point set , calculate the gradient magnitude : The tangent direction angle is the gradient direction of this point, that is, the inclination angle of the edge, The calculation expression of the sine value is: The calculation expression of the cosine value is: The calculation expression of the tangent direction angle is: S43: Calculate the distance from the points in the ditch edge point set to the initial left ditch line, and compare it with the edge point distance to screen out the points with a distance less than the edge point distance to obtain the left fitting edge point set; S44: Calculate the distance from the points in the ditch edge point set to the initial right ditch line, and compare it with the edge point distance to screen out the points with a distance less than the edge point distance to obtain the right fitting edge point set; S45: Linearly fit the left - hand side fitting edge point set by the least - squares method to obtain the left - hand side ditch boundary line, and linearly fit the right - hand side fitting edge point set by the least - squares method to obtain the right - hand side ditch boundary line; the ditch boundary image is as Figure 6 shown.

[0043] S5: Superimpose the left - hand side ditch boundary line and the right - hand side ditch boundary line on the ditch image to obtain the left - hand side moving line of the transplanter and the right - hand side moving line of the transplanter. The superimposed image is as Figure 7 shown; S51: Select the intersection point of the left - hand side ditch boundary line and the upper edge of the ditch image and the intersection point of the left - hand side ditch boundary line and the lower edge of the ditch image to form the left - hand side moving line L1 of the transplanter; S52: Select the intersection point of the right - hand side ditch boundary line and the upper edge of the ditch image and the intersection point of the right - hand side ditch boundary line and the lower edge of the ditch image to form the right - hand side moving line L2 of the transplanter; S53: Calculate the intersection point of L1 and L2.

[0044] S6: Adjust the movement of the transplanter according to the left - hand side moving line of the transplanter and the right - hand side moving line of the transplanter.

[0045] When the intersection point of L1 and L2 is not within the threshold range, set the speeds and directions of the side wheels on both sides of the transplanter according to the offset direction of the intersection point; Set the threshold range according to the terrain and the condition of the equipment itself; If the intersection point of L1 and L2 is not within the threshold range and is on the left side, the speed of the right wheel is too fast, and set the driving speed of the left wheel to twice the original speed; obtain the ditch image in real - time. When the intersection point of L1 and L2 is within the threshold range, the driving speed of the left wheel resumes to the original speed; If the intersection point of L1 and L2 is not within the threshold range and is on the right side, the speed of the left wheel is too fast, and set the driving speed of the right wheel to twice the original speed. Obtain the ditch image in real - time. When the intersection point of L1 and L2 is within the threshold range, the driving speed of the right wheel resumes to the original speed; If the intersection point of L1 and L2 is within the threshold range, drive the wheels on both sides of the transplanter at the same speed and in the same direction.

[0046] Since the moving speed of the transplanter is very slow, through the above - mentioned adjustment, ensure that the intersection point of L1 and L2 is within the threshold range, ensuring the straight - line movement of the transplanter.

[0047] Set the threshold range according to the terrain and the condition of the equipment itself.

[0048] In some specific embodiments of the present invention, set the threshold range by observation according to the terrain, such as the width of the ditch, and the condition of the equipment itself, such as the width between the two wheels of the transplanter and the installation height of the image recognition device.

[0049] As Figure 8 shown, a linear motion system of a transplanter based on image recognition is used to execute the above-mentioned linear motion method of a transplanter based on image recognition, and includes: The image acquisition module 101 acquires the ditch image through the image recognition device on the transplanter; The preprocessing module 102 preprocesses the ditch image to obtain a preprocessed image; The edge detection module 103 performs edge detection on the preprocessed image through the canny algorithm to obtain a ditch edge point set; The screening and fitting module 104 screens and linearly fits the ditch edge point set to obtain the left ditch boundary line and the right ditch boundary line; The superposition module 105 superposes the left ditch boundary line and the right ditch boundary line with the ditch image to obtain the left moving line of the transplanter and the right moving line of the transplanter; The adjustment module 106 adjusts the movement of the transplanter according to the left moving line of the transplanter and the right moving line of the transplanter.

[0050] Through the collaborative work of the above modules, a high-definition image recognition device is installed at a high position of the transplanter body. According to the image recognition algorithm, the position of the transplanter body relative to the ditch is calculated in real time. Once it is found that the angle between the body and the ditch exceeds a preset threshold, it is determined as abnormal, and the movement of the transplanter is adjusted to achieve the purpose of the linear movement of the transplanter, ensuring the normal operation of the transplanter. The image recognition device will transmit the real-time working image data of the transplanter to the cloud platform for monitoring. It has the characteristics of high efficiency, real-time, accuracy, automation and intelligence, can save costs and improve data value.

[0051] Figure 9 An example of a block diagram of an electronic device is shown, as Figure 9 shown, the electronic device may include: a processor 201 (processor), a communication interface 203 (Communications Interface), a memory 204 (memory), and a communication bus 202. Among them, the processor 201, the communication interface 203, and the memory 204 complete mutual communication through the communication bus 202. The processor 201 can call the logical instructions in the memory 204 to execute a linear motion method of a transplanter based on image recognition.

[0052] In addition, when the logical instructions in the above-mentioned memory 204 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0053] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a linear motion method of a translation machine based on image recognition provided by the above-mentioned various methods.

[0054] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a linear motion method of a translation machine based on image recognition provided by the above-mentioned various methods.

[0055] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.

[0056] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disks, optical discs, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A linear motion method of a translation machine based on image recognition, characterized in that, Including: S1: Obtain the ditch image through the image recognition device on the translation machine; S2: Preprocess the ditch image to obtain a preprocessed image; S3: Perform edge detection on the preprocessed image through the canny algorithm to obtain a set of ditch edge points; S4: Obtain the left ditch boundary line and the right ditch boundary line by screening and linear fitting of the set of ditch edge points; S5: Superimpose the left ditch boundary line and the right ditch boundary line on the ditch image to obtain the left movement line of the translation machine and the right movement line of the translation machine; S6: Adjust the movement of the translation machine according to the left movement line of the translation machine and the right movement line of the translation machine.

2. The linear motion method of a translation machine based on image recognition according to claim 1, wherein The image recognition device is installed at the middle position of the translation machine, and both sides of the ditch are located on the left and right sides of the image recognition device respectively.

3. A linear motion method of a translation machine based on image recognition according to claim 1, characterized in that, Step S2 includes: S21: Convert the ditch image into a binary image; Obtain the gray threshold of the ditch image by the Otsu method, set the pixels greater than or equal to the gray threshold to black, and set the pixels less than the gray threshold to white; S22: Perform erosion processing and dilation processing on the binary image to obtain a preprocessed image; Set the size of the erosion kernel, perform convolution processing on the binary image in the erosion kernel to obtain an eroded image; Set the size of the dilation kernel, perform convolution processing on the eroded image in the dilation kernel to obtain a preprocessed image.

4. A linear motion method of a translation machine based on image recognition according to claim 1, characterized in that, In step S4, S41: Set screening conditions, and the screening conditions include the tangent direction angle threshold and the edge point distance; Set the left tangent direction angle threshold, the right tangent direction angle threshold and the edge point distance according to empirical data; S42: Calculate the tangent direction angle of the points in the set of ditch edge points through the Sobel operator; screen the tangent direction angle through the left tangent direction angle threshold to obtain the initial left ditch initial line; screen the tangent direction angle through the right tangent direction angle threshold to obtain the right ditch initial line; S43: Calculate the distance from the points in the set of ditch edge points to the left ditch initial line, and compare it with the edge point distance to screen out the points with a distance less than the edge point distance to obtain the left fitting edge point set; S44: Calculate the distance from the points in the set of ditch edge points to the right ditch initial line, and compare it with the edge point distance to screen out the points with a distance less than the edge point distance to obtain the right fitting edge point set; S45: Perform linear fitting on the left fitting edge point set by the least squares method to obtain the left ditch boundary line, and perform linear fitting on the right fitting edge point set by the least squares method to obtain the right ditch boundary line.

5. A linear motion method of a translation machine based on image recognition according to claim 1, characterized in that, In step S5, S51: Select the intersection point of the left ditch boundary line and the upper edge of the ditch image and the intersection point of the left ditch boundary line and the lower edge of the ditch image to form the left movement line L1 of the translation machine; S52: Select the intersection point of the right ditch boundary line and the upper edge of the ditch image and the intersection point of the right ditch boundary line and the lower edge of the ditch image to form the right movement line L2 of the translation machine; S53: Calculate the intersection point of L1 and L2.

6. The linear motion method of a translation machine based on image recognition according to claim 5, characterized in that, In step S6, When the intersection point of L1 and L2 is not within the threshold range, set the speeds of the side wheels on both sides of the translation machine according to the offset direction of the intersection point position. When the intersection of L1 and L2 is within the threshold range, the wheels on both sides of the translation machine are driven to move at the same speed and in the same direction.

7. A linear motion method of a translation machine based on image recognition according to claim 6, characterized in that In step S6, Set the threshold range according to the terrain and the condition of the equipment itself; If the intersection of L1 and L2 is not within the threshold range and is on the left side, the speed of the right wheel is too fast. Set the driving speed of the left wheel to twice the original speed, and obtain the ditch image in real time. When the intersection of L1 and L2 is within the threshold range, the driving speed of the left wheel returns to the original speed; If the intersection of L1 and L2 is not within the threshold range and is on the right side, the speed of the left wheel is too fast. Set the driving speed of the right wheel to twice the original speed, and obtain the ditch image in real time. When the intersection of L1 and L2 is within the threshold range, the driving speed of the right wheel returns to the original speed.

8. A linear motion system of a translation machine based on image recognition, characterized in that, For executing a straight-line motion method of a translation machine based on image recognition according to any one of claims 1 to 7, including: An image acquisition module, which acquires the ditch image through an image recognition device on the translation machine; A preprocessing module, which preprocesses the ditch image to obtain a preprocessed image; An edge detection module, which performs edge detection on the preprocessed image through the canny algorithm to obtain a ditch edge point set; A screening and fitting module, which screens and linearly fits the ditch edge point set to obtain the left ditch boundary line and the right ditch boundary line; An overlay module, which overlays the left ditch boundary line and the right ditch boundary line with the ditch image to obtain the left moving line of the translation machine and the right moving line of the translation machine; An adjustment module, which adjusts the movement of the translation machine according to the left moving line of the translation machine and the right moving line of the translation machine.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of a straight-line motion method of a translation machine based on image recognition according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of a straight-line motion method of a translation machine based on image recognition according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Agricultural park scene lane departure early warning control method and system based on end-to-end convolutional neural network

    CN111439259A

  • Floor slab reinforcing steel bar acceptance method and system based on machine vision

    CN116468703A

  • Inland river channel ship automatic detection method based on unmanned aerial vehicle

    CN117876904A

  • Image content recognition system based on deep learning

    CN119273998A

  • Edge detection

    US20070052845A1