Hydrangea fresh cut flower sorting method, system and computer-readable storage medium based on visual recognition
Through the visual recognition method, automatic identification and sorting of fresh hydrangea flowers is solved, and the problems of low efficiency and unstable quality control of traditional manual sorting are achieved, and efficient and stable automated sorting is achieved.
Patent Information
- Application Number
- CN202510027791.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-08
AI Technical Summary
The traditional hydrangea fresh cut flower sorting method relies on manual labor, resulting in low productivity and unstable quality control, and an automated sorting method is needed to escape human interference.
Using a visual recognition-based method, we collect freshly cut hydrangea flowers images, identify the target color (blue, pink and blue-pink mixed colors), pre-process the image to enhance the edge contour, calculate the flower head diameter, and determine the sorting results based on the color and diameter.
Automatic sorting of freshly cut hydrangea flowers is realized, improving sorting efficiency and quality control stability, and avoiding errors in manual judgment.
Smart Images

Figure CN119456469B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a hydrangea fresh cut flower sorting method, system and computer-readable storage medium based on visual recognition. Background Art
[0002] Hydrangea, also known as hydrangea, hydrangea, and pink flower, belongs to the shrub family. The mature hydrangeas are picked manually and are called hydrangea fresh cut flowers. In addition to their ornamental value, hydrangeas also have high medicinal value. For example, the roots of hydrangeas are rich in ingredients that can treat diabetes, autoimmune diseases, and other diseases; the flowers and leaves are rich in hydrangea glycosides that have antimalarial effects, which can also be used to treat diseases such as heart disease.
[0003] Traditionally, hydrangea fresh cut flowers are sorted manually, but the introduction of human factors often leads to defects such as limited productivity and unstable sorting quality control in large-scale production scenarios. Therefore, a hydrangea fresh cut flower sorting method is needed to complete the sorting of hydrangea fresh cut flowers through a hydrangea fresh cut flower sorting system, so as to get rid of the interference caused by human factors in the hydrangea fresh cut flower sorting process, thereby improving the sorting efficiency of hydrangea fresh cut flowers and ensuring the quality of hydrangea fresh cut flowers.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a hydrangea fresh cut flower sorting method based on visual recognition, aiming to solve the problem of how to get rid of the interference caused by human factors in the hydrangea fresh cut flower sorting process.
[0006] To achieve the above-mentioned purpose, the present application provides a method for sorting hydrangea fresh cut flowers based on visual recognition, the method comprising:
[0007] Collecting fresh cut hydrangea flowers to be sorted to obtain images of the fresh cut hydrangea flowers;
[0008] Identifying a target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image, wherein the target color includes blue, pink, and a mixture of blue and pink;
[0009] and, preprocessing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image;
[0010] Extracting the edge contour, and calculating the flower head diameter of the hydrangea fresh cut flowers to be sorted based on the edge contour;
[0011] The sorting result of the hydrangea fresh cut flowers to be sorted is determined according to the target color and the flower head diameter.
[0012] Optionally, the step of determining the sorting result of the hydrangea fresh cut flowers to be sorted according to the target color and the flower head diameter includes:
[0013] Determine the grade corresponding to the flower head diameter according to the grade interval of the flower head diameter, wherein the flower head diameter is positively correlated with the grade;
[0014] The target color and the grade are output as the sorting result of the hydrangea fresh cut flowers to be sorted.
[0015] Optionally, the step of preprocessing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image comprises:
[0016] Determine the hue channel image of the hydrangea fresh cut flower image in the HSV space, and perform binarization processing on the hue channel image to obtain a first processed image;
[0017] The first processed image is first subjected to image erosion processing and then to image dilation processing to obtain a second processed image after edge contour enhancement.
[0018] Optionally, the step of determining a hue channel image of the hydrangea fresh cut flower image in the HSV space, and performing binarization processing on the hue channel image to obtain a first processed image comprises:
[0019] Performing median filtering on the hydrangea fresh cut flower image, then transferring the image to the HSV space, selecting a hue channel, and obtaining the hue channel image;
[0020] The hue channel image is binarized.
[0021] Optionally, the step of first performing a first image erosion and image dilation process on the first processed image to remove the background, and then performing a second image dilation and image erosion process to fill the gaps in the image to obtain the second processed image comprises:
[0022] Performing a first iterative erosion operation and dilation operation on the first processed image according to a first preset kernel width using a morphological processing operator of the Vision Master software;
[0023] When the number of iterations meets the first preset number of iterations, adjusting the kernel width to a second preset kernel width to perform a second iterative erosion operation and dilation operation on the first processed image;
[0024] When the number of iterations meets the second preset number of iterations, the iteration is stopped.
[0025] Optionally, the contour of the hydrangea fresh cut flower is extracted by using an edge extraction operator in an image filtering operator in the Vision Master software.
[0026] Optionally, the step of calculating the flower head diameter of the hydrangea fresh cut flowers to be sorted based on the edge contour comprises:
[0027] Counting the number of pixels of the edge contour, and calculating the perimeter of the flower head according to the number of pixels;
[0028] The flower head diameter is determined according to the flower head circumference.
[0029] Optionally, before the step of identifying the target color of the hydrangea fresh cut flowers in the hydrangea fresh cut flower image, the step further includes:
[0030] Create a dataset of fresh cut hydrangea flowers in three colors: blue, pink, and blue-pink.
[0031] The hydrangea fresh cut flower image dataset is trained by using the Vision Master software deep learning classification algorithm platform, and the trained model is loaded into the classification operator in the visual scheme built by the Vision Master software;
[0032] The step of identifying the target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image comprises:
[0033] identifying color information in the hydrangea fresh cut flower image according to the classification operator;
[0034] The target color of the hydrangea fresh cut flower is determined according to the color information.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a hydrangea fresh cut flower sorting system, the hydrangea fresh cut flower sorting system comprising:
[0036] A visual detection device, comprising a camera module for collecting fresh cut hydrangea flowers to be sorted, and a host computer for sorting fresh cut hydrangea flowers based on the hydrangea fresh cut flower sorting method based on visual recognition as described in any one of the above items;
[0037] The sorting device comprises a sorting mechanism for moving the hydrangea fresh cut flowers to be sorted to a target sorting area according to the sorting results obtained by the host computer, a driving device for driving the sorting mechanism to move, and a PLC controller for controlling the driving device to operate according to target control parameters, wherein the target control parameters are control parameters that meet the requirements for moving the sorting mechanism to the target sorting area;
[0038] One or more collecting boxes are arranged corresponding to the target sorting area, and are used to collect the hydrangea fresh cut flowers in the target sorting area.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a hydrangea fresh cut flower sorting program based on visual recognition is stored. When the hydrangea fresh cut flower sorting program based on visual recognition is executed by a processor, the steps of the hydrangea fresh cut flower sorting method based on visual recognition as described in any of the above items are implemented.
[0040] This application has at least the following beneficial effects:
[0041] 1. The edge contour enhancement algorithm obtained by combining multiple algorithms is used to pre-process the hydrangea fresh cut flower image, and the edge contour of the hydrangea fresh cut flower in the image is enhanced to facilitate the accurate calculation of the flower head diameter of the hydrangea fresh cut flower;
[0042] 2. Sort fresh cut hydrangea flowers according to the identified color and flower head diameter. Accurately and stably identify the color of fresh cut hydrangea flowers and measure the diameter of the flower head, while avoiding incorrect sorting caused by color judgment errors due to visual fatigue of the staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a schematic diagram of the architecture of the hardware operating environment of the hydrangea fresh cut flower sorting system involved in the embodiment of the present application;
[0044] Figure 2 This is a flow chart of the first embodiment of the hydrangea fresh cut flower sorting method based on visual recognition of the present application;
[0045] Figure 3 This is a schematic diagram of the overall architecture of the hydrangea fresh cut flower sorting system involved in the embodiment of the present application;
[0046] Figure 4 Schematic diagram of the structure of the visual inspection device involved in the embodiment of the present application;
[0047] Figure 5 It is a structural schematic diagram of a sorting device involved in an embodiment of the present application;
[0048] Figure 6 It is a schematic diagram of the structure of the driving device involved in the embodiment of the present application.
[0049] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0051] As an implementation plan, Figure 1 This is a schematic diagram of the architecture of the hardware operating environment of the hydrangea fresh cut flower sorting system involved in the embodiment of the present application.
[0052] like Figure 1 As shown, the hydrangea fresh cut flower sorting system may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The architecture of the hydrangea fresh cut flower sorting system shown in the figure does not constitute a limitation on the hydrangea fresh cut flower sorting system, and the system may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a hydrangea fresh cut flower sorting program based on visual recognition. The operating system is a program that manages and controls the hardware and software resources of the hydrangea fresh cut flower sorting system, the hydrangea fresh cut flower sorting program based on visual recognition, and the operation of other software or programs.
[0055] exist Figure 1 In the hydrangea fresh cut flower sorting system shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005.
[0056] In this embodiment, the hydrangea fresh cut flower sorting system includes: a memory 1005, a processor 1001, and a hydrangea fresh cut flower sorting program based on visual recognition stored in the memory and executable on the processor, wherein:
[0057] When the processor 1001 calls the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005, the following operations are performed:
[0058] Collecting fresh cut hydrangea flowers to be sorted to obtain images of the fresh cut hydrangea flowers;
[0059] Identifying a target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image, wherein the target color includes blue, pink, and a mixture of blue and pink;
[0060] and, preprocessing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image;
[0061] Extracting edge contours from the preprocessed hydrangea fresh cut flower image, and calculating the flower head diameters of the hydrangea fresh cut flowers to be sorted based on the edge contours;
[0062] The sorting result of the hydrangea fresh cut flowers to be sorted is determined according to the target color and the flower head diameter.
[0063] When the processor 1001 calls the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005, the following operations are performed:
[0064] Determine the grade corresponding to the flower head diameter according to the grade interval of the flower head diameter, wherein the flower head diameter is positively correlated with the grade;
[0065] The target color and the grade are output as the sorting result of the hydrangea fresh cut flowers to be sorted.
[0066] When the processor 1001 calls the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005, the following operations are performed:
[0067] Performing a first iterative erosion operation and dilation operation on the first processed image according to a first preset kernel width using a morphological processing operator of the Vision Master software;
[0068] When the number of iterations meets the first preset number of iterations, adjusting the kernel width to a second preset kernel width to perform a second iterative erosion operation and dilation operation on the first processed image;
[0069] When the number of iterations meets the second preset number of iterations, the iteration is stopped.
[0070] When the processor 1001 calls the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005, the following operations are performed:
[0071] Counting the number of pixels of the edge contour, and calculating the perimeter of the flower head according to the number of pixels;
[0072] The flower head diameter is determined according to the flower head circumference.
[0073] When the processor 1001 calls the hydrangea fresh cut flower sorting program based on visual recognition stored in the memory 1005, the following operations are performed:
[0074] identifying color information in the hydrangea fresh cut flower image according to the classification operator;
[0075] The target color of the hydrangea fresh cut flower is determined according to the color information.
[0076] Based on the hardware architecture of the hydrangea fresh cut flower sorting system based on image processing technology, an embodiment of the hydrangea fresh cut flower sorting method based on visual recognition of the present application is proposed.
[0077] Reference Figure 2 In the first embodiment, the hydrangea fresh cut flower sorting method based on visual recognition comprises the following steps:
[0078] Step S10, collecting fresh cut hydrangea flowers to be sorted to obtain images of fresh cut hydrangea flowers;
[0079] In this embodiment, firstly, images of hydrangea fresh cut flowers to be sorted are collected.
[0080] Optionally, for the execution condition of the collection action, a trigger action can be executed by a photoelectric sensor, and when the photoelectric sensor senses that there are fresh cut hydrangea flowers in its sensing area, the collection action is executed.
[0081] Optionally, the acquisition device may use a high-resolution, high-sensitivity industrial camera for shooting.
[0082] In addition, in order to ensure the quality of the collected hydrangea fresh cut flower images, the collected hydrangea fresh cut flower images can be subjected to median filtering to smooth and reduce noise on the images.
[0083] Step S20, identifying the target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image, wherein the target color includes blue, pink, and a mixture of blue and pink;
[0084] Furthermore, the color of fresh cut hydrangea flowers is identified through the color recognition module of the system.
[0085] Optionally, the color of fresh cut hydrangea flowers can be identified by a color recognition module in the VisionMaster platform.
[0086] Specifically, before recognition, a dataset of hydrangea fresh cut flower images containing three colors: blue, pink, and blue-pink is pre-established;
[0087] The hydrangea fresh cut flower image data set is trained through the Vision Master software deep learning classification algorithm platform, and the trained model is loaded into the classification operator in the visual solution built by the Vision Master software.
[0088] When recognition is required, the color information in the hydrangea fresh cut flower image is identified according to the classification operator, and finally the target color of the hydrangea fresh cut flower is determined according to the color information.
[0089] Step S30, and pre-processing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image;
[0090] In this embodiment, in order to more accurately calculate the edge contour of the hydrangea fresh cut flower image, the system pre-processes the hydrangea fresh cut flower image through the onboard color conversion module and morphology module.
[0091] Optionally, first, a color conversion module determines a hue channel image of the hydrangea fresh cut flower image in the HSV space, and performs binarization processing on the hue channel image to obtain a first processed image;
[0092] Next, the morphological module performs image corrosion processing and then image dilation processing on the first processed image to obtain a second processed image with enhanced edge contours, which is used as the pre-processed hydrangea fresh cut flower image.
[0093] Specifically and optionally, the two preprocessing operations are:
[0094] Firstly, using the morphological processing operator of the Vision Master software, a first iterative erosion operation and a dilation operation are performed on the first processed image according to a first preset kernel width;
[0095] When the number of iterations meets the first preset number of iterations, adjusting the kernel width to a second preset kernel width to perform a second iterative erosion operation and dilation operation on the first processed image;
[0096] When the number of iterations meets the second preset number of iterations, the iteration is stopped.
[0097] Optionally, in some specific implementations, the first preset kernel width is set to 4, and the first preset number of iterations is 5; the second preset kernel width is set to 6, and the second preset number of iterations is 9.
[0098] It is understandable that step S20 and step S30 may be performed simultaneously, that is, the color and edge contour enhancement of the hydrangea in the hydrangea fresh cut flower image may be processed simultaneously; or they may be performed in a certain order, which is not limited in this embodiment.
[0099] Step S40, extracting edge contours from the preprocessed hydrangea fresh cut flower image, and calculating the flower head diameters of the hydrangea fresh cut flowers to be sorted based on the edge contours;
[0100] After completing the enhancement processing, the edge detection module is used to extract the edge of the image processed by the morphological module, and finally the edge contour of the hydrangea fresh cut flower is obtained. The pixel statistics module is used to calculate the edge contour pixel points to fit the circumference of the flower head, and then the variable calculation module is used to calculate the diameter of the flower head.
[0101] Optionally, the edge contour of the fresh cut hydrangea flower can be extracted by using an edge extraction operator in an image filtering operator in the Vision Master software.
[0102] Step S50, determining the sorting result of the hydrangea fresh cut flowers to be sorted according to the target color and the flower head diameter.
[0103] Specifically and optionally, the grade corresponding to the flower head diameter is determined according to the grade interval in which the flower head diameter is located, and the flower head diameter is positively correlated with the grade; the target color and the grade are output as the sorting result of the hydrangea fresh cut flowers to be sorted.
[0104] In some specific embodiments, each color of hydrangea fresh cut flowers is divided into four grades, with flower head diameters greater than or equal to 30 cm being grade A, greater than 25 cm and less than 30 cm being grade B, greater than 20 cm and less than or equal to 25 cm being grade C, and less than 20 cm being grade D, among which grade A is the best, followed by grades D, and the worst.
[0105] In the technical solution provided in this embodiment, a color recognition algorithm is first used to perform color recognition on the collected hydrangea fresh cut flower images, so that the hydrangea fresh cut flowers are sorted based on the color differences; at the same time, an edge contour enhancement algorithm obtained by combining multiple algorithms is used to pre-process the hydrangea fresh cut flower images, and the edge contours of the hydrangea fresh cut flowers in the images are enhanced to facilitate accurate calculation of the flower head diameters of the hydrangea fresh cut flowers; the hydrangea fresh cut flowers are sorted according to the recognized colors and flower head diameters, and the colors of the hydrangea fresh cut flowers and the diameters of the flower heads are accurately and stably recognized, while avoiding erroneous sorting caused by color judgment errors due to visual fatigue of the staff.
[0106] Second embodiment
[0107] Reference Figure 3-Figure 4 In this embodiment, a hydrangea fresh cut flower sorting system is provided, and the hydrangea fresh cut flower sorting system comprises:
[0108] A visual inspection device 1, comprising a camera module 1-4 for collecting fresh cut hydrangea flowers to be sorted, and a host computer 1-1 for sorting fresh cut hydrangea flowers based on the aforementioned visual recognition-based fresh cut hydrangea flower sorting method;
[0109] The sorting device 2 comprises a sorting mechanism 2-1 for moving the hydrangea fresh cut flowers to be sorted to a target sorting area according to the sorting results obtained by the host computer, a driving device 2-2 for driving the sorting mechanism to move, and a PLC controller 2-4 for controlling the driving device to operate according to target control parameters, wherein the target control parameters are control parameters that meet the requirements for moving the sorting mechanism to the target sorting area;
[0110] One or more collecting boxes 3 are arranged corresponding to the target sorting area, and are used to collect the hydrangea fresh cut flowers in the target sorting area.
[0111] Third embodiment
[0112] Reference Figure 3-Figure 5 Based on the structure of the system in the second embodiment, in this embodiment, the visual detection device 1 also includes: a strip light source 1-2, a hydrangea fresh cut flower sorting black box 1-3, a hydrangea fresh cut flower baffle 1-5 and a photoelectric sensor 1-6.
[0113] Among them, the host computer 1-1 establishes a connection with the PLC controller 2-4, and the PLC controller 2-4 establishes a connection with the motor 2-2-4. Optionally, the PLC control device uses at least 12 channels.
[0114] In this embodiment, the hydrangea fresh cut flowers to be sorted are placed on the hydrangea fresh cut flower baffle 1-5 in the hydrangea fresh cut flower sorting black box 1-3, and the hydrangea fresh cut flowers to be sorted at the hydrangea fresh cut flower baffle 1-5 are illuminated by the bar light source 1-2. When the photoelectric sensor 1-6 detects that the hydrangea fresh cut flowers to be sorted are placed on the hydrangea fresh cut flower baffle 1-5, the camera module 1-4 is triggered to capture the image.
[0115] Optionally, the number of the strip light sources 1-2 can be two;
[0116] Optionally, the hydrangea fresh cut flower sorting black box 1-3 is constructed of aluminum profiles, T-bolts, nuts, and black shade cloth.
[0117] In this embodiment, the sorting device 2 further includes a bracket 2-3, wherein the sorting mechanism 2-1 is connected to the driving device 2-2; the driving device 2-2 is fixed on the bracket 2-3; and the PLC control device is placed at the bottom of the bracket 2-3.
[0118] Optionally, the sorting mechanism 2-1 can be configured to be disc-shaped, and four baffles are provided on the sorting mechanism 2-1 to divide the sorting area into four target grading areas.
[0119] Fourth embodiment
[0120] Based on the third embodiment, refer to Figure 6 In this embodiment, the driving device 2-2 includes: a driving wheel 2-2-1, a first bearing seat 2-2-2, a driven wheel 2-2-3, a motor 2-2-4, a shaft 2-2-5, a second bearing seat 2-2-6, and a motor box 2-2-7;
[0121] Among them, the first bearing seat 2-2-2 and the second bearing seat 2-2-6 are connected to the shaft 2-2-5;
[0122] The motor 2-2-4 is placed in the motor box 2-2-7, the motor 2-2-4 is connected to the driving wheel 2-2-1, and the driving wheel 2-2-1 is connected to the driven wheel 2-2-3.
[0123] In addition, it can be understood by a person skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the hydrangea fresh cut flower sorting system to implement the process steps of the embodiment of the above method.
[0124] Therefore, the present application also provides a computer-readable storage medium, which stores a hydrangea fresh cut flower sorting program based on visual recognition. When the hydrangea fresh cut flower sorting program based on visual recognition is executed by a processor, the various steps of the hydrangea fresh cut flower sorting method based on visual recognition described in the above embodiment are implemented.
[0125] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0126] It should be noted that since the storage medium provided in the embodiment of the present application is the storage medium used to implement the method of the embodiment of the present application, based on the method introduced in the embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the method of the embodiment of the present application belong to the scope of protection of this application.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0131] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0132] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for sorting hydrangea fresh cut flowers based on visual recognition, characterized in that: Applied to the hydrangea fresh cut flower sorting system, the method comprises the following steps: Collecting fresh cut hydrangea flowers to be sorted to obtain images of the fresh cut hydrangea flowers; Identifying a target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image, wherein the target color includes blue, pink, and a mixture of blue and pink; and, preprocessing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image; Extracting edge contours from the preprocessed hydrangea fresh cut flower image, and calculating the flower head diameters of the hydrangea fresh cut flowers to be sorted based on the edge contours; Determining the sorting result of the hydrangea fresh cut flowers to be sorted according to the target color and the flower head diameter; Wherein, the step of preprocessing the hydrangea fresh cut flower image to enhance the edge contour of the hydrangea fresh cut flower in the image comprises: Determine the hue channel image of the hydrangea fresh cut flower image in the HSV space, and perform binarization processing on the hue channel image to obtain a first processed image; The first processed image is first subjected to image erosion processing and then to image dilation processing to obtain a second processed image after edge contour enhancement.
2. The method according to claim 1, characterized in that The step of determining the sorting result of the hydrangea fresh cut flowers to be sorted according to the target color and the flower head diameter comprises: Determine the grade corresponding to the flower head diameter according to the grade interval of the flower head diameter, wherein the flower head diameter is positively correlated with the grade; The target color and the grade are output as the sorting result of the hydrangea fresh cut flowers to be sorted.
3. The method according to claim 1, characterized in that The step of determining the hue channel image of the hydrangea fresh cut flower image in the HSV space, and performing binarization processing on the hue channel image to obtain a first processed image comprises: Performing median filtering on the hydrangea fresh cut flower image, then transferring the image to the HSV space, selecting a hue channel, and obtaining the hue channel image; The hue channel image is binarized.
4. The method according to claim 1, characterized in that The step of first performing a first image erosion and image dilation process on the first processed image to remove the background, and then performing a second image dilation and image erosion process to fill the gaps in the image to obtain the second processed image comprises: Performing a first iterative erosion operation and dilation operation on the first processed image according to a first preset kernel width using a morphological processing operator of the Vision Master software; When the number of iterations meets the first preset number of iterations, adjusting the kernel width to a second preset kernel width to perform a second iterative erosion operation and dilation operation on the first processed image; When the number of iterations meets the second preset number of iterations, the iteration is stopped.
5. The method according to claim 1, characterized in that The contour of fresh cut hydrangea flowers was extracted using the edge extraction operator in the image filtering operator in the Vision Master software.
6. The method according to claim 1, characterized in that The step of calculating the flower head diameter of the hydrangea fresh cut flowers to be sorted based on the edge contour comprises: Counting the number of pixel points of the edge contour, and calculating the perimeter of the flower head according to the number of pixel points; The flower head diameter is determined according to the flower head circumference.
7. The method according to claim 1, characterized in that Before the step of identifying the target color of the hydrangea fresh cut flowers in the hydrangea fresh cut flower image, the method further includes: Create a dataset of fresh cut hydrangea flowers in three colors: blue, pink, and blue-pink. The hydrangea fresh cut flower image dataset is trained by using the Vision Master software deep learning classification algorithm platform, and the trained model is loaded into the classification operator in the visual scheme built by the Vision Master software; The step of identifying the target color of the hydrangea fresh cut flower in the hydrangea fresh cut flower image comprises: identifying color information in the hydrangea fresh cut flower image according to the classification operator; The target color of the hydrangea fresh cut flower is determined according to the color information.
8. A hydrangea fresh cut flower sorting system, characterized in that: The hydrangea fresh cut flower sorting system comprises: A visual detection device, comprising a camera module for collecting fresh cut hydrangea flowers to be sorted, and a host computer for sorting fresh cut hydrangea flowers based on the hydrangea fresh cut flower sorting method based on visual recognition as described in any one of claims 1 to 7; The sorting device comprises a sorting mechanism for moving the hydrangea fresh cut flowers to be sorted to a target sorting area according to the sorting results obtained by the host computer, a driving device for driving the sorting mechanism to move, and a PLC controller for controlling the driving device to operate according to target control parameters, wherein the target control parameters are control parameters that meet the requirements for moving the sorting mechanism to the target sorting area; One or more collecting boxes are arranged corresponding to the target sorting area, and are used to collect the hydrangea fresh cut flowers in the target sorting area.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a hydrangea fresh cut flower sorting program based on visual recognition, and when the hydrangea fresh cut flower sorting program based on visual recognition is executed by the processor, the steps of the hydrangea fresh cut flower sorting method based on visual recognition as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Screening and grading system and method for fresh cut Chinese herbaceous peony flowers based on image recognition
CN118968117A
Visual imaging structure of fresh flower sorting equipment
CN218691716U