Supernatant extraction method, device, electronic equipment and storage medium
By using image processing and automated robotic arm operation, the fat layer in the triangular flask can be accurately identified and extracted, solving the error problem caused by manual identification and improving the accuracy and efficiency of supernatant acquisition and fat detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 蒙牛乳业(宁夏)有限公司
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-05
AI Technical Summary
In existing methods, the extraction of the supernatant relies on manual identification and pouring, which can easily lead to the residue of the lower layer liquid, affecting the accuracy of the test results.
Image processing technology is used to identify the layered structure of the liquid in the triangular flask. A robotic arm and a liquid suction system are used to operate automatically, accurately locate the dividing line and suck up the fat liquid layer, avoiding human error.
This improved the precision of supernatant acquisition and the accuracy of fat detection in milk, achieving efficient and standardized liquid separation and processing.
Smart Images

Figure CN122156235A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method, apparatus, electronic device, and storage medium for extracting supernatant. Background Technology
[0002] Using solvents such as petroleum ether and diethyl ether, it is possible to extract fats from milk and then perform subsequent analysis based on the extracted fats. When a solvent is added to milk, it separates into layers; the solvent that dissolves the milk fat remains in the supernatant.
[0003] In existing methods, the extraction of supernatant generally relies on manual identification and pouring. This method may result in some of the lower layer liquid being poured out, or the target liquid not being completely poured out, thus affecting the detection results and leading to inaccurate results. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for extracting supernatant, which improves the accuracy of obtaining supernatant containing dissolved fat from milk, thereby improving the accuracy of detecting fat in milk.
[0005] This invention provides a method for extracting supernatant, comprising the following steps: The layered liquid in the Erlenmeyer flask is captured as an image, and the dividing line between the upper and lower liquid layers in the layered liquid image is identified. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined; Based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
[0006] According to a method for extracting supernatant provided by the present invention, the step of identifying the dividing line between the upper and lower layers of liquid in the layered liquid image includes: The layered liquid image is converted from the RGB color space to the HSV color space, and a first color mask and a second color mask in the layered liquid image are determined. Based on the edge detection algorithm, the boundary between the first color mask and the second color mask is determined, and based on the boundary, the dividing line between the upper liquid layer and the lower liquid layer is determined.
[0007] According to a method for extracting supernatant provided by the present invention, determining the coordinate information of the segmentation line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system includes: The camera's parameter information and the image coordinates of the dividing line in the layered liquid image are obtained, and the camera is fixedly configured to acquire the layered liquid image; Based on the image coordinates and the camera's parameter information, the image coordinates are converted into coordinate information of the dividing line in the three-dimensional world coordinate system using a back projection method.
[0008] According to a method for extracting supernatant provided by the present invention, determining the aspiration trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular flask includes: Based on the position information of the triangular bottle, the horizontal distance that the robotic arm moves to the center of the bottle mouth is determined; Based on the coordinate information, the vertical distance by which the robotic arm moves downward along the Z-axis to aspirate liquid is determined. The absorption trajectory of the fat fluid layer is determined based on the horizontal and vertical distances.
[0009] The method for extracting supernatant according to the present invention further includes: After the robotic arm's injection pump has completed its aspiration, an image of the liquid in the triangular flask is acquired, and the liquid image is identified to determine whether it contains stratified liquid.
[0010] According to a method for extracting supernatant provided by the present invention, after recognizing the liquid image, the method further includes: If it is determined that there is no stratified liquid, a return message is sent to the liquid aspiration system so that after receiving the return message, the liquid aspiration system controls the robotic arm to return to the initial position.
[0011] The present invention also provides a device for extracting supernatant, comprising the following modules: The recognition module is used to acquire an image of the layered liquid in the Erlenmeyer flask and to identify the dividing line between the upper and lower layers of liquid in the image. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. The conversion module is used to determine the coordinate information of the dividing line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system; The extraction module is used to determine the aspiration trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular flask, and send the aspiration trajectory to the aspiration system so that after receiving the aspiration trajectory, the aspiration system controls the robotic arm with an injection pump to aspirate the fat liquid layer in the triangular flask.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the supernatant extraction method as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the supernatant extraction method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the supernatant extraction method as described above.
[0015] The method, apparatus, electronic device, and storage medium for extracting supernatant provided by this invention, through image processing technology, can accurately identify the layered structure of liquid in a triangular flask, thereby avoiding errors that may occur in traditional manual identification and improving the accuracy of obtaining supernatant from milk fat. Automated image processing can provide high-resolution image analysis results, which helps to accurately locate the boundary line, thus ensuring the effective separation and processing of layered liquids. Because the liquid aspiration system operates automatically according to a defined trajectory, it can maintain consistent operating standards in different times and situations. This high-precision standardized operation not only improves processing efficiency but also enhances the detection accuracy of fat in milk. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a schematic flowchart of the supernatant extraction method provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the absorption process provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the supernatant extraction device provided by the present invention.
[0020] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] Figure 1 This is a schematic flowchart of the supernatant extraction method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 110: Obtain an image of the layered liquid in the Erlenmeyer flask and identify the dividing line between the upper and lower layers of liquid in the image. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. Step 120: Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, determine the coordinate information of the dividing line in the three-dimensional world coordinate system; Step 130: Based on the coordinate information and the position information of the triangular flask, determine the suction trajectory of the fat liquid layer, and send the suction trajectory to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suction the fat liquid layer in the triangular flask.
[0023] The supernatant extraction method provided by this invention can be performed by an electronic device, a component within an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), or personal computer (PC), etc. This invention does not impose specific limitations.
[0024] The following describes the technical solution of the present invention in detail using a computer-executed supernatant extraction method provided by the present invention as an example.
[0025] In step 110, an image of the layered liquid in the Erlenmeyer flask is acquired, and the dividing line between the upper and lower layers of liquid in the image is identified. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat layer and a lower water-soluble solution layer.
[0026] The liquid in an Erlenmeyer flask is a two-layered liquid structure formed by mixing a nonpolar solvent (such as an oil) with milk and allowing them to come into full contact. The fat and water molecules in the milk form two separate liquid layers due to their different physical properties (polarity versus nonpolarity): the upper layer is a fat layer, and the lower layer is a water-soluble solution layer.
[0027] First, an image of the layered liquids in the Erlenmeyer flask needs to be acquired using a camera or other optical equipment. This image needs to be clear enough and have sufficient resolution to accurately identify the boundary between the upper and lower layers of liquid.
[0028] The acquired images can be preprocessed, such as denoising and sharpening, to improve the accuracy of subsequent image analysis. During this process, edge detection algorithms (such as Canny edge detection) and segmentation algorithms (such as thresholding and region growing) can be used to distinguish between the upper and lower liquid layers.
[0029] Image segmentation methods can accurately identify the boundary between the upper and lower liquid layers. This boundary line separates the fat layer from the water-soluble solution layer, representing the interface between the two liquids.
[0030] In step 120, based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined.
[0031] To map two-dimensional image coordinates to three-dimensional world coordinates, camera calibration is the first step. The calibration process involves photographing a calibration board (such as a checkerboard) of known size and location to obtain the camera's intrinsic and extrinsic parameters. Intrinsic parameters include focal length and principal point coordinates, while extrinsic parameters include the camera's position and orientation in the world coordinate system.
[0032] Based on the calibration results, perspective transformations (such as homography matrix or projection transformations) can be used to map the two-dimensional coordinates in the image to a three-dimensional coordinate system. By mapping the boundary lines identified in the image to three-dimensional space, the location of the boundary lines in the real world can be determined.
[0033] In step 130, based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
[0034] After obtaining the location of the boundary line in three-dimensional world coordinates, the next step is to determine the operating trajectory of the suction system so that the robotic arm can accurately suck up the upper fat fluid layer.
[0035] The suction trajectory refers to the path the syringe pump should follow when the robotic arm performs a suction task. Since the goal is to suction the upper fat layer, the suction trajectory is usually a section of liquid above the boundary line, and the suction operation is performed along this trajectory.
[0036] Based on the position of the boundary line in the three-dimensional coordinate system and the geometric characteristics of the triangular flask, the liquid aspiration trajectory is calculated. Specifically, this involves planning a suitable path to avoid disturbing the lower layer of liquid while ensuring that the upper layer is completely aspirated. The liquid aspiration trajectory can be calculated using path planning algorithms such as linear programming and spline interpolation.
[0037] After calculating the aspiration trajectory, this information is sent to the aspiration system. The aspiration system typically consists of a robotic arm equipped with a syringe pump. The syringe pump controls the amount of liquid aspirated, while the robotic arm handles precise positioning and manipulation. The control system adjusts the robotic arm's movement based on the aspiration trajectory information, ensuring it performs the aspiration operation along the predetermined path.
[0038] The syringe pump is responsible for drawing the supernatant liquid into a designated container. The pump's control is adjusted based on real-time feedback of the aspiration trajectory to ensure a smooth and precise aspiration process.
[0039] The supernatant extraction method provided by this invention, through image processing technology, can accurately identify the layered structure of the liquid in the Erlenmeyer flask, thereby avoiding errors that may occur in traditional manual identification and improving the accuracy of obtaining the supernatant of milk fat. Automated image processing can provide high-resolution image analysis results, which helps to accurately locate the boundary line, thus ensuring the effective separation and processing of layered liquids. Since the liquid aspiration system operates automatically according to a defined trajectory, it can maintain consistent operating standards in different times and situations. This high-precision standardized operation not only improves processing efficiency but also enhances the detection accuracy of milk fat.
[0040] In one embodiment, identifying the dividing line between the upper and lower liquid layers in the layered liquid image includes: converting the layered liquid image from RGB color space to HSV color space; determining a first color mask and a second color mask in the layered liquid image; determining the boundary between the first color mask and the second color mask based on an edge detection algorithm; and determining the dividing line between the upper and lower liquid layers based on the boundary.
[0041] The RGB (Red, Green, Blue) color space is a color representation method based on the additive color mixing principle. It expresses color information through three channels: Red (R), Green (G), and Blue (B). The HSV color space is a color model that is more in line with human visual perception, describing color through Hue (H), Saturation (S), and Lightness (V). The conversion from RGB to HSV makes the color information in an image more intuitive and consistent with human visual perception, making it suitable for color recognition and separation tasks.
[0042] Color masks are a commonly used binarization tool in image processing, used to extract regions of a specific color range from an image. In the HSV color space, mask generation can more accurately filter based on color information, especially in liquid layering problems, where different liquid layers exhibit significant color differences in the HSV space.
[0043] The fat layer appears as a specific color in the image (e.g., milky white, light yellow, or creamy white). This color region can be extracted by setting threshold ranges for hue (H), saturation (S), and lightness (V).
[0044] Water-soluble liquid layers typically exhibit different color characteristics, potentially appearing as transparent, light blue, or light green. By setting different HSV thresholds, regions of the water-soluble liquid layer can be extracted.
[0045] After extracting the upper liquid (fatty liquid layer) and the lower liquid (water-soluble liquid layer) using color masks, the next step is to determine the boundary between the two liquid layers.
[0046] In layered liquid images, the boundary line is usually represented by a sudden change in color or an interface. When applying edge detection algorithms, the mask image is first processed (e.g., Canny edge detection), extracting edge information by calculating changes in brightness and color in the image. After edge detection is completed, the edge between the first color mask and the second color mask is the boundary line between the two liquid layers.
[0047] In one embodiment, determining the coordinate information of the dividing line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system includes: acquiring the parameter information of the camera and the image coordinates of the dividing line in the layered liquid image, wherein the camera is fixedly configured to acquire the layered liquid image; and converting the image coordinates into the coordinate information of the dividing line in the three-dimensional world coordinate system based on the image coordinates and the parameter information of the camera, according to the back projection method.
[0048] The camera's parameter information includes intrinsic and extrinsic parameters. Intrinsic parameters describe the camera's internal properties, including focal length, principal point, and distortion coefficients. Extrinsic parameters describe the camera's relative position and orientation to the world coordinate system.
[0049] Camera imaging is a perspective projection process, and the relationship between two-dimensional image coordinates and three-dimensional world coordinates can usually be determined based on projection equations.
[0050] The purpose of back projection is to reverse-map known image coordinates into a three-dimensional world coordinate system. This process involves transforming the image coordinates into three-dimensional space using the camera's intrinsic and extrinsic parameters, thereby determining the coordinate information of the dividing line in the three-dimensional world coordinate system, thus realizing the determination of the dividing line's coordinate information in the three-dimensional world coordinate system.
[0051] In one embodiment, determining the suction trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular bottle includes: determining the horizontal distance from which the robotic arm moves to the center of the mouth of the triangular bottle based on the position information of the triangular bottle; determining the vertical distance from which the robotic arm moves downward along the Z-axis to suction liquid based on the coordinate information; and determining the suction trajectory of the fat liquid layer based on the horizontal distance and the vertical distance.
[0052] The robotic arm needs to calculate the horizontal distance required to move the triangular bottle to the center of its opening, based on the bottle's position. This distance is determined by the bottle's position in three-dimensional space, the coordinates of the dividing line obtained by the camera, and the robotic arm's starting position.
[0053] Horizontal distance refers to the distance the robotic arm needs to move in the horizontal direction. Horizontal distance reflects the amount of horizontal translation the robotic arm makes from its current coordinates to the center of the mouth of the triangular bottle.
[0054] The robotic arm can move horizontally to the center of the bottle opening. Once the robotic arm reaches the center of the bottle opening, the next step is to determine the vertical movement distance of the robotic arm along the Z-axis based on the position of the dividing line, in order to accurately extract the fat liquid layer.
[0055] Based on the coordinate information, the height of the dividing line can be determined, and the vertical distance that the robotic arm moves downward along the Z-axis to aspirate liquid can be further determined.
[0056] The suction trajectory of the fat liquid layer is the path taken by the robotic arm during its suction operation along the Z-axis. This path needs to take into account both horizontal and vertical movements to ensure that the robotic arm can accurately suction the fat liquid layer without accidentally suctioning water-soluble liquid layers or causing liquid mixing.
[0057] The specific absorption process can be as follows: Figure 2 The schematic diagram of the aspiration process provided by this invention is shown. The extraction station receives the aspiration trajectory, controls the movement of the robotic arm, and descends along the Z-axis. After the sensor detects the supernatant, injection is initiated. After aspiration is complete, the system returns to its initial position and the robotic arm retracts.
[0058] In one embodiment, the method further includes: after determining that the injection pump of the robotic arm has completed aspiration, acquiring an image of the liquid in the triangular flask, identifying the liquid image, and determining whether it contains stratified liquid.
[0059] If it is determined that there is no stratified liquid, a return message is sent to the liquid aspiration system so that after receiving the return message, the liquid aspiration system controls the robotic arm to return to the initial position.
[0060] After the liquid aspiration is completed, it is necessary to acquire liquid images again to confirm whether the target liquid layer has been successfully aspirated and to verify whether there is still layered liquid in the bottle.
[0061] Images of the liquid in the Erlenmeyer flask are captured by a fixed camera. Since the liquid aspiration operation has already been performed, the camera can determine whether there is any remaining stratified liquid by monitoring changes in the images.
[0062] After acquiring the liquid image, the next step is to analyze the image to determine whether the liquid inside the bottle still exhibits a layered state. Layered liquids are typically formed by two liquids (such as milk and a non-polar solvent), with an upper layer of fat and a lower layer of water-soluble liquid. Image recognition methods can be used to determine whether a layered state exists.
[0063] By processing and analyzing the image, it can be determined whether there is a layered liquid. If the liquid layers in the image do not have obvious boundaries or color differences, and the thickness of the fat layer is close to zero, then it can be determined that the liquid has been completely absorbed.
[0064] After determining that the liquid no longer contains stratified liquid, a return message is sent, instructing the liquid aspiration system to complete the task and requesting the robotic arm to return to the initial position to complete one liquid aspiration process.
[0065] The robotic arm's initial position is usually preset; this position is the robotic arm's "standby position" or the position before the task begins. A control algorithm moves the robotic arm back from its current position (i.e., the liquid suction position) to the initial position.
[0066] The robotic arm needs to plan its path based on the distance between its current position and its initial position. Typically, the robotic arm can use the same path planning algorithm during the return process as it did during task execution.
[0067] The supernatant extraction method provided by this invention achieves automated liquid aspiration task completion, task status confirmation, and automatic return of the robotic arm. By using image recognition technology to determine the presence of stratified liquid and controlling the robotic arm to return to its initial position based on feedback information, the efficiency and accuracy of the automated system can be greatly improved. The return message mechanism ensures that the system can dynamically respond to the status of the liquid aspiration task and adjust the working mode and position of the robotic arm according to the actual situation, further optimizing the entire liquid aspiration operation process.
[0068] The supernatant extraction apparatus provided by the present invention will be described below. The supernatant extraction apparatus described below can be referred to in correspondence with the supernatant extraction method described above.
[0069] like Figure 3 As shown, the device includes: The recognition module 310 is used to acquire an image of the layered liquid in the Erlenmeyer flask and to identify the dividing line between the upper and lower layers of liquid in the image of the layered liquid. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. The conversion module 320 is used to determine the coordinate information of the dividing line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system; The extraction module 330 is used to determine the aspiration trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular flask, and send the aspiration trajectory to the aspiration system so that after receiving the aspiration trajectory, the aspiration system controls the robotic arm with an injection pump to aspirate the fat liquid layer in the triangular flask.
[0070] The supernatant extraction device provided by this invention, through image processing technology, can accurately identify the layered structure of liquid in a triangular flask, thereby avoiding errors that may occur in traditional manual identification and improving the accuracy of obtaining the supernatant from milk fat. Automated image processing can provide high-resolution image analysis results, which helps to accurately locate the boundary line, thus ensuring the effective separation and processing of layered liquids. Because the liquid aspiration system operates automatically according to a defined trajectory, it can maintain consistent operating standards in different times and situations. This high-precision standardized operation not only improves processing efficiency but also enhances the detection accuracy of fat in milk.
[0071] In one embodiment, the identification module 310 is specifically used for: The process of identifying the dividing line between the upper and lower layers of liquid in the layered liquid image includes: The layered liquid image is converted from the RGB color space to the HSV color space, and a first color mask and a second color mask in the layered liquid image are determined. Based on the edge detection algorithm, the boundary between the first color mask and the second color mask is determined, and based on the boundary, the dividing line between the upper liquid layer and the lower liquid layer is determined.
[0072] In one embodiment, the conversion module 320 is specifically used for: The step of determining the coordinate information of the segmentation line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system includes: The camera's parameter information and the image coordinates of the dividing line in the layered liquid image are obtained, and the camera is fixedly configured to acquire the layered liquid image; Based on the image coordinates and the camera's parameter information, the image coordinates are converted into coordinate information of the dividing line in the three-dimensional world coordinate system using a back projection method.
[0073] In one embodiment, the extraction module 330 is specifically used for: Based on the coordinate information and the position information of the triangular flask, the absorption trajectory of the fat liquid layer is determined, including: Based on the position information of the triangular bottle, the horizontal distance that the robotic arm moves to the center of the bottle mouth is determined; Based on the coordinate information, the vertical distance by which the robotic arm moves downward along the Z-axis to aspirate liquid is determined. The absorption trajectory of the fat fluid layer is determined based on the horizontal and vertical distances.
[0074] In one embodiment, the identification module 310 is further configured to: After the robotic arm's injection pump has completed its aspiration, an image of the liquid in the triangular flask is acquired, and the liquid image is identified to determine whether it contains stratified liquid.
[0075] In one embodiment, the extraction module 330 is further configured to: After recognizing the liquid image, the process further includes: If it is determined that there is no stratified liquid, a return message is sent to the liquid aspiration system so that after receiving the return message, the liquid aspiration system controls the robotic arm to return to the initial position.
[0076] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for extracting the supernatant. This method includes: acquiring an image of the layered liquid in a triangular flask, and identifying the dividing line between the upper and lower layers of liquid in the image. The layered liquid in the triangular flask is obtained by adding a non-polar solvent to milk and ensuring sufficient contact. The layered liquid includes an upper fat layer and a lower water-soluble solution layer. Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined; Based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
[0077] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0078] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the supernatant extraction method provided by the above methods. The method includes: acquiring a layered liquid image in a triangular flask and identifying the dividing line between the upper liquid and the lower liquid in the layered liquid image. The layered liquid in the triangular flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined; Based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
[0079] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for extracting supernatant provided by the methods described above. The method includes: acquiring an image of layered liquid in a triangular flask and identifying the dividing line between the upper and lower layers of liquid in the image of layered liquid, wherein the layered liquid in the triangular flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact, and the layered liquid includes an upper fat layer and a lower water-soluble solution layer. Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined; Based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting supernatant, characterized in that, include: The layered liquid in the Erlenmeyer flask is captured as an image, and the dividing line between the upper and lower liquid layers in the layered liquid image is identified. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. Based on the correspondence between the layered liquid image and the three-dimensional world coordinate system, the coordinate information of the dividing line in the three-dimensional world coordinate system is determined; Based on the coordinate information and the position information of the triangular flask, the suction trajectory of the fat liquid layer is determined, and the suction trajectory is sent to the suction system so that after receiving the suction trajectory, the suction system controls the robotic arm with an injection pump to suck up the fat liquid layer in the triangular flask.
2. The method for extracting the supernatant according to claim 1, characterized in that, The process of identifying the dividing line between the upper and lower layers of liquid in the layered liquid image includes: The layered liquid image is converted from the RGB color space to the HSV color space, and a first color mask and a second color mask in the layered liquid image are determined. Based on the edge detection algorithm, the boundary between the first color mask and the second color mask is determined, and based on the boundary, the dividing line between the upper liquid layer and the lower liquid layer is determined.
3. The method for extracting the supernatant according to claim 1, characterized in that, The step of determining the coordinate information of the segmentation line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system includes: The camera's parameter information and the image coordinates of the dividing line in the layered liquid image are obtained, and the camera is fixedly configured to acquire the layered liquid image; Based on the image coordinates and the camera's parameter information, the image coordinates are converted into coordinate information of the dividing line in the three-dimensional world coordinate system using a back projection method.
4. The method for extracting the supernatant according to claim 1, characterized in that, Determining the aspiration trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular flask includes: Based on the position information of the triangular bottle, the horizontal distance that the robotic arm moves to the center of the bottle mouth is determined; Based on the coordinate information, the vertical distance by which the robotic arm moves downward along the Z-axis to aspirate liquid is determined. The absorption trajectory of the fat fluid layer is determined based on the horizontal and vertical distances.
5. The method for extracting the supernatant according to claim 1, characterized in that, Also includes: After the robotic arm's injection pump has completed its aspiration, an image of the liquid in the triangular flask is acquired, and the liquid image is identified to determine whether it contains stratified liquid.
6. The method for extracting the supernatant according to claim 5, characterized in that, After recognizing the liquid image, the process further includes: If it is determined that there is no stratified liquid, a return message is sent to the liquid aspiration system so that after receiving the return message, the liquid aspiration system controls the robotic arm to return to the initial position.
7. An apparatus for extracting supernatant, characterized in that, include: The recognition module is used to acquire an image of the layered liquid in the Erlenmeyer flask and to identify the dividing line between the upper and lower layers of liquid in the image. The layered liquid in the Erlenmeyer flask is obtained by adding a non-polar solvent to milk and allowing it to come into full contact. The layered liquid includes an upper fat liquid layer and a lower water-soluble solution layer. The conversion module is used to determine the coordinate information of the dividing line in the three-dimensional world coordinate system based on the correspondence between the layered liquid image and the three-dimensional world coordinate system; The extraction module is used to determine the aspiration trajectory of the fat liquid layer based on the coordinate information and the position information of the triangular flask, and send the aspiration trajectory to the aspiration system so that after receiving the aspiration trajectory, the aspiration system controls the robotic arm with an injection pump to aspirate the fat liquid layer in the triangular flask.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the method for extracting the supernatant as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for extracting the supernatant as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for extracting the supernatant as described in any one of claims 1 to 6.