Tobacco leaf image processing method, device, storage medium and electronic device
By collecting tobacco leaf images on standard light sources and purple, extracting and combining leaf vein areas, generating vein images and performing feature extraction, the problem of inaccurate feature extraction of tobacco leaf in the prior art is solved, and the accuracy and comprehensiveness of feature extraction are improved.
Patent Information
- Application Number
- CN202411990418.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing tobacco leaf feature extraction methods have shortcomings in the accuracy and comprehensiveness of feature acquisition, especially affected by lighting conditions and shooting angles, resulting in deviations or distortion of feature information such as leaf veins.
A tobacco leaf image processing method is adopted. By obtaining the tobacco leaf images collected under standard light sources and ultraviolet light sources, the main leaf vein area is extracted and combined to obtain the main vein contour image; then the target branch vein image area is selected in the branch vein image area, superimposed on the main vein contour image, generate a pulse image map, and finally feature extraction of the pulse image map.
It improves the accuracy and comprehensiveness of tobacco leaf feature extraction, reduces the impact of lighting conditions and shooting angle on feature extraction, and enhances the reliability of subsequent feature analysis and grading.
Smart Images

Figure CN119785041A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a tobacco leaf image processing method, device, storage medium and electronic device. Background Art
[0002] In the field of tobacco leaf grading and quality control, accurate and comprehensive extraction of tobacco leaf features is of great significance for evaluating tobacco leaf quality, guiding production and trading. However, existing tobacco leaf feature extraction methods have obvious shortcomings, especially in terms of accuracy and comprehensiveness of feature acquisition.
[0003] At present, the mainstream tobacco leaf feature extraction method mainly relies on collecting tobacco leaf images under a single light source and then extracting features from the image. Although this method can achieve preliminary feature extraction to a certain extent, its limitations are also very obvious.
[0004] Since image acquisition under a single light source is easily affected by factors such as lighting conditions and shooting angle, feature information such as leaf veins in the image may be biased or distorted. This deviation not only affects the accuracy of feature extraction, but also makes subsequent feature analysis and classification more difficult. Summary of the invention
[0005] The technical problem to be solved by this application is to provide a tobacco leaf image processing method, device, storage medium and electronic device, which can improve the accuracy of tobacco leaf feature extraction. The specific solution is as follows:
[0006] A tobacco leaf image processing method, comprising:
[0007] Acquire a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when a standard light source is used to illuminate the tobacco leaf to be processed; the second tobacco leaf image is acquired by the image acquisition device when an ultraviolet light source is used to illuminate the tobacco leaf to be processed;
[0008] Extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image;
[0009] Merging the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed;
[0010] Extracting each branch vein image region in the second tobacco leaf image;
[0011] Selecting a target branch vein image region from each of the branch vein image regions according to the main vein contour image;
[0012] Superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed;
[0013] Feature extraction is performed on the pulse image to obtain the pulse features of the tobacco leaves to be processed.
[0014] In the above method, optionally, extracting the main vein area in the first tobacco leaf image and the second tobacco leaf image includes:
[0015] registering the first tobacco leaf image and the second tobacco leaf image;
[0016] An image segmentation algorithm is used to extract the main vein region of the first tobacco leaf image after registration and the main vein region of the second tobacco leaf image after registration.
[0017] In the above method, optionally, selecting a target branch vein image region from each branch vein image region according to the main vein contour image includes:
[0018] Taking the main vein contour image as a reference, a target branch vein image region matching the main vein contour image is determined in each branch vein image.
[0019] In the above method, optionally, the step of extracting features from the pulse image to obtain pulse feature information of the tobacco leaves to be processed comprises:
[0020] Determine the angle between each branch pulse and the main pulse in the pulse diagram;
[0021] The angle between each branch vein and the main vein is used as the pulse characteristic information of the tobacco leaves to be processed.
[0022] The above method, optionally, after obtaining the pulse characteristics of the tobacco leaves to be processed, further comprises:
[0023] Extracting image features of the first tobacco leaf image and the second tobacco leaf image respectively, the image features comprising at least one of a color feature and a size feature;
[0024] The image features of the first tobacco leaf image, the image features of the second tobacco leaf image and the pulse features are stored.
[0025] The above method, optionally, storing the extracted color features, size features and pulse features, comprises:
[0026] Performing label recognition on the first tobacco leaf image of the tobacco leaf to be identified to obtain label information in the identity label carried by the tobacco leaf to be identified;
[0027] The label information, the color feature, the size feature and the pulse feature are stored in association.
[0028] In the above method, optionally, the wavelength of light output by the ultraviolet light source is 365 nm.
[0029] A tobacco leaf image processing device, comprising:
[0030] an acquisition unit, used to acquire a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when the tobacco leaf to be processed is irradiated by a standard light source; the second tobacco leaf image is acquired by the image acquisition device when the tobacco leaf to be processed is irradiated by an ultraviolet light source;
[0031] A first extraction unit, used for extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image;
[0032] a merging unit, configured to merge the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed;
[0033] A second extraction unit, used to extract each branch vein image area in the second tobacco leaf image;
[0034] A selection unit, configured to select a target branch vein image region from each of the branch vein image regions according to the main vein contour image;
[0035] A superimposing unit, used for superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed;
[0036] The feature extraction unit is used to extract features from the pulse image to obtain the pulse features of the tobacco leaves to be processed.
[0037] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the tobacco leaf image processing method as described above.
[0038] An electronic device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors as the above-mentioned tobacco leaf image processing method.
[0039] The present application implements a tobacco leaf image processing method, device, storage medium and electronic device, the method comprising: obtaining a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when a standard light source is irradiated on the tobacco leaf to be processed; the second tobacco leaf image is acquired by the image acquisition device when an ultraviolet light source is irradiated on the tobacco leaf to be processed; extracting the main vein area in the first tobacco leaf image and the second tobacco leaf image; merging the main vein area in the first tobacco leaf image with the main vein area in the second tobacco leaf image to obtain the main vein contour image of the tobacco leaf to be processed; extracting each branch vein image area in the second tobacco leaf image; selecting a target branch vein image area from each branch vein image area according to the main vein contour image; superimposing the target branch vein image area on the main vein contour image to obtain a pulse image of the tobacco leaf to be processed; extracting features from the pulse image to obtain the pulse features of the tobacco leaf to be processed. The method provided in the embodiment of the present application can improve the accuracy of tobacco leaf feature extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0041] Figure 1 A method flow chart of a tobacco leaf image processing method provided in this application;
[0042] Figure 2 A flowchart of a process for extracting a main vein region in a first tobacco leaf image and a second tobacco leaf image provided by the present application;
[0043] Figure 3 A schematic diagram of the structure of an image acquisition module provided in this application;
[0044] Figure 4 A tobacco leaf image processing flow chart provided for this application;
[0045] Figure 5 An example diagram of a first tobacco leaf image provided in this application;
[0046] Figure 6 An example diagram of a second tobacco leaf image provided in this application;
[0047] Figure 7 An example diagram of a tobacco leaf pulse diagram provided in this application;
[0048] Figure 8 An example diagram of a feature storage structure provided for this application;
[0049] Fig. 9 A schematic diagram of the structure of a tobacco leaf image processing device provided in this application;
[0050] Fig.10 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0053] The embodiment of the present application provides a tobacco leaf image processing method, which can be applied to electronic devices, and the electronic devices can be smart phones, tablet devices, smart wearable devices, etc. The method flow chart of the method is as follows Figure 1 As shown, specifically including:
[0054] S101: Acquire a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when a standard light source is used to illuminate the tobacco leaf to be processed; the second tobacco leaf image is acquired by the image acquisition device when an ultraviolet light source is used to illuminate the tobacco leaf to be processed;
[0055] In this embodiment, the wavelength of the light output by the ultraviolet light source is 365 nm; the standard light source may be a D50 high color accuracy light source.
[0056] Optionally, the tobacco leaves to be processed carry an identity tag, which records the identification information of the tobacco leaves to be processed.
[0057] S102: Extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image.
[0058] In this embodiment, the main vein region includes image data of the main veins of the tobacco leaf to be processed, and the main vein region in the first tobacco leaf image and the main vein region in the second tobacco leaf image can be extracted.
[0059] S103: Merging the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed.
[0060] In this embodiment, the main vein regions of the tobacco leaf images collected under two light sources may be combined to obtain the main vein contour image of the tobacco leaf to be processed.
[0061] S104: extracting each branch vein image region in the second tobacco leaf image.
[0062] In this embodiment, an image segmentation algorithm may be used to extract each branch vein image region in the second tobacco leaf image.
[0063] S105: Selecting a target branch vein image region from each of the branch vein image regions according to the main vein contour image.
[0064] In this embodiment, the main vein contour image may be taken as a starting point, and then the branch vein image region matching the starting point may be taken as a target branch vein image region.
[0065] S106: superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed.
[0066] In this embodiment, the target branch vein image area can be superimposed on the main vein contour image according to the branch vein starting point in the target branch vein image area to obtain the pulse image of the tobacco leaf to be processed.
[0067] S107: Extracting features from the pulse image to obtain pulse features of the tobacco leaves to be processed.
[0068] In this embodiment, the first feature in the first tobacco leaf image and the second feature in the second tobacco leaf image can also be extracted, and the first feature, the second feature and the pulse feature can be stored. The first feature and the second feature can both include color features, size features, etc.
[0069] In an embodiment provided in the present application, based on the above solution, optionally, the process of extracting the main vein area in the first tobacco leaf image and the second tobacco leaf image is as follows: Figure 2 As shown, including:
[0070] S201: registering the first tobacco leaf image and the second tobacco leaf image.
[0071] In this embodiment, feature points in the first tobacco leaf image and the second tobacco leaf image may be extracted first, and the feature points may include corner points, high curvature points, straight line segments, edges, contours, etc. Then, the matching feature points in the first tobacco leaf image and the second tobacco leaf image are determined by a similarity measurement algorithm; the spatial coordinate transformation parameters are determined by using the matching feature point pairs in the first tobacco leaf image and the second tobacco leaf image, and the spatial coordinate transformation parameters are used to transform one of the first tobacco leaf image and the second tobacco leaf image into the coordinate system of the other to achieve spatial alignment of the two images. According to the spatial coordinate transformation parameters, one of the images is transformed and adjusted to achieve registration of the two images.
[0072] S202: Using an image segmentation algorithm to extract the main vein region of the first tobacco leaf image after registration and the main vein region of the second tobacco leaf image after registration.
[0073] In this embodiment, the registered first tobacco leaf image and the second tobacco leaf image are in the same coordinate system.
[0074] In an embodiment provided by the present application, based on the above solution, optionally, selecting a target branch vein image area from each branch vein image area according to the main vein contour image includes:
[0075] Taking the main vein contour image as a reference, a target branch vein image region matching the main vein contour image is determined in each branch vein image.
[0076] In this embodiment, the branch vein image region where the starting point of the branch vein is located on the main vein contour image can be determined as the target branch vein image region matching the main vein contour image.
[0077] In an embodiment provided in the present application, based on the above scheme, optionally, the feature extraction of the pulse image to obtain the pulse feature information of the tobacco leaf to be processed includes:
[0078] Determine the angle between each branch pulse and the main pulse in the pulse diagram.
[0079] The angle between each branch vein and the main vein is used as the pulse characteristic information of the tobacco leaves to be processed.
[0080] In an embodiment provided in the present application, based on the above scheme, optionally, after obtaining the pulse characteristics of the tobacco leaves to be processed, the method further includes:
[0081] Extracting image features of the first tobacco leaf image and the second tobacco leaf image respectively, the image features comprising at least one of a color feature and a size feature;
[0082] The image features of the first tobacco leaf image, the image features of the second tobacco leaf image and the pulse features are stored.
[0083] In an embodiment provided in the present application, based on the above scheme, optionally, the extracted color features, size features and pulse features are stored, including:
[0084] Performing label recognition on the first tobacco leaf image of the tobacco leaf to be identified to obtain label information in the identity label carried by the tobacco leaf to be identified;
[0085] The label information, the color feature, the size feature and the pulse feature are stored in association.
[0086] In this embodiment, the label information may include at least one type of information such as the identity, category, and source of the tobacco leaves to be processed.
[0087] The embodiment of the present application also provides a tobacco leaf image processing system, which includes an image acquisition module and an image processing module. The image acquisition module is as follows: Figure 3 As shown, it includes a color matching light box 1, a light box bracket 2, an image acquisition device 3 and a shooting workbench 4. The image processing module can be a computer, a smart phone, a tablet device or a smart wearable device.
[0088] After the tobacco leaves to be tested have been pre-processed and flattened, the operator places them face up on the shooting table 4 in the color matching light box 1. The surface of the shooting table 4 is marked with scales and symbols indicating the placement of the tobacco leaves. The label paper with barcodes and text information attached to the tobacco leaves is placed at the designated position (the position is also marked). Close the box door.
[0089] The operator turns on the light source required for shooting through the human-machine interface display 5. The light source includes a D50 high color accuracy light source (standard light source) and a 365nm wavelength ultraviolet light source. The D50 high color accuracy light source is used to simulate natural light. When the tobacco leaf veins are irradiated by the 365nm wavelength ultraviolet light source, fluorescence is generated to distinguish them from the tobacco leaf parts. The two light sources are used alternately according to the features to be extracted.
[0090] After the front-facing shot is completed, turn off the light source, open the box door, place the tobacco leaf with the back side facing up in the designated position, then close the box door and repeat the previous shooting steps.
[0091] After the front and back sides of the tobacco leaves are photographed, the image processing module will process the captured images through a built-in algorithm to extract the required features.
[0092] The image processing module can be used to identify and extract the label information attached to the tobacco leaves to complete tobacco leaf classification and traceability.
[0093] After the tobacco leaves are pre-treated and flattened, some of them are tough and difficult to flatten. At this time, the negative pressure mode of the workbench can be activated to adsorb the tobacco leaves on the workbench to achieve the purpose of flattening and fixing the tobacco leaves.
[0094] See also Figure 4 , the image processing module can obtain tobacco leaf images to be processed under different light sources from the image acquisition module, such as Figure 5 As shown in FIG. 1 , the image is obtained when the tobacco leaves to be processed are illuminated by a tobacco leaf standard light source; Figure 6 As shown, the data is collected when the tobacco leaves to be processed are irradiated by ultraviolet light. After obtaining the tobacco leaf images under different light sources, the dual-light source images are processed using an image segmentation algorithm to extract the tobacco leaf areas corresponding to the images.
[0095] Since there is a slight difference in the imaging position of the tobacco leaves under the two light sources, an image registration algorithm is used to register the tobacco leaf areas under the two light sources.
[0096] The image segmentation algorithm is used to extract the main vein area of the tobacco leaf image under the D50 light source. For areas where the main vein features are not obvious under the D50 light source (such as the tip of the tobacco leaf), the corresponding image area under the 365nm light source is analyzed to extract the corresponding main vein area. The main vein areas of the two light sources are combined to form the main vein area of the tobacco leaf.
[0097] The image segmentation algorithm is used to extract the candidate branch vein area of the 365nm tobacco leaf image. Because the extracted branch veins are based on the main vein area, the branch vein area of the tobacco leaf is screened out with this feature to obtain the pulse image. Figure 7 shown.
[0098] The color, size and other features of the tobacco leaf images under the two light sources are calculated respectively. The left and right branch vein angle features are calculated for the extracted vein phase area and these features are stored in the local database. The stored features are as follows: Figure 8 shown.
[0099] and Figure 1 Corresponding to the method, the embodiment of the present application also provides a tobacco leaf image processing device for Figure 1 The specific implementation of the method is shown in the following diagram: Fig. 9 As shown, including:
[0100] The acquisition unit 901 is used to acquire a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when the tobacco leaf to be processed is irradiated by a standard light source; the second tobacco leaf image is acquired by the image acquisition device when the tobacco leaf to be processed is irradiated by an ultraviolet light source;
[0101] A first extraction unit 902, configured to extract main vein regions in the first tobacco leaf image and the second tobacco leaf image;
[0102] A merging unit 903 is used to merge the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed;
[0103] A second extraction unit 904, configured to extract each branch vein image region in the second tobacco leaf image;
[0104] A selection unit 905 is used to select a target branch vein image region from each of the branch vein image regions according to the main vein contour image;
[0105] A superimposition unit 906 is used to superimpose the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed;
[0106] The feature extraction unit 907 is used to extract features from the pulse image to obtain the pulse features of the tobacco leaves to be processed.
[0107] In an embodiment provided in the present application, based on the above solution, optionally, the first extraction unit 902 is configured as follows:
[0108] registering the first tobacco leaf image and the second tobacco leaf image;
[0109] An image segmentation algorithm is used to extract the main vein region of the first tobacco leaf image after registration and the main vein region of the second tobacco leaf image after registration.
[0110] In an embodiment provided in the present application, based on the above solution, optionally, the selection unit 905 is configured as follows:
[0111] Taking the main vein contour image as a reference, a target branch vein image region matching the main vein contour image is determined in each branch vein image.
[0112] In an embodiment provided by the present application, based on the above solution, optionally, the feature extraction unit 907 is configured as follows:
[0113] Determine the angle between each branch pulse and the main pulse in the pulse diagram;
[0114] The angle between each branch vein and the main vein is used as the pulse characteristic information of the tobacco leaves to be processed.
[0115] In an embodiment provided in the present application, based on the above solution, optionally, the tobacco leaf image processing device further includes:
[0116] An extraction unit, used to extract image features of the first tobacco leaf image and the second tobacco leaf image respectively, wherein the image features include at least one of color features and size features;
[0117] A storage unit is used to store the image features of the first tobacco leaf image, the image features of the second tobacco leaf image and the pulse features.
[0118] In an embodiment provided in the present application, based on the above solution, optionally, the storage unit is configured as follows:
[0119] Performing label recognition on the first tobacco leaf image of the tobacco leaf to be identified to obtain label information in the identity label carried by the tobacco leaf to be identified;
[0120] The label information, the color feature, the size feature and the pulse feature are stored in association.
[0121] In an embodiment provided in the present application, based on the above-mentioned solution, optionally, the wavelength of the light output by the ultraviolet light source is 365 nm.
[0122] The specific principles and execution processes of each unit and module in the tobacco leaf image processing device disclosed in the above-mentioned embodiment of the present application are the same as those of the tobacco leaf image processing method disclosed in the above-mentioned embodiment of the present application. Please refer to the corresponding parts of the tobacco leaf image processing method provided in the above-mentioned embodiment of the present application, and will not be repeated here.
[0123] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned tobacco leaf image processing method.
[0124] The present application also provides an electronic device, whose structural diagram is as follows: Fig.10 As shown, it specifically includes a memory 1001 and one or more instructions 1002, wherein the one or more instructions 1002 are stored in the memory 1001 and are configured to be executed by one or more processors 1003 to perform the following operations:
[0125] Acquire a first tobacco leaf image and a second tobacco leaf image of a tobacco leaf to be processed; the first tobacco leaf image is acquired by an image acquisition device when a standard light source is used to illuminate the tobacco leaf to be processed; the second tobacco leaf image is acquired by the image acquisition device when an ultraviolet light source is used to illuminate the tobacco leaf to be processed;
[0126] Extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image;
[0127] Merging the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed;
[0128] Extracting each branch vein image region in the second tobacco leaf image;
[0129] Selecting a target branch vein image region from each of the branch vein image regions according to the main vein contour image;
[0130] Superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed;
[0131] Feature extraction is performed on the pulse image to obtain the pulse features of the tobacco leaves to be processed.
[0132] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0134] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0135] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0136] The above is a detailed introduction to a tobacco leaf image processing method provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A tobacco leaf image processing method, characterized in that: include: Acquire a first tobacco leaf image and a second tobacco leaf image of the tobacco leaves to be processed; The first tobacco leaf image is acquired by an image acquisition device when a standard light source is used to illuminate the tobacco leaf to be processed; The second tobacco leaf image is acquired by the image acquisition device when the tobacco leaf to be processed is irradiated by an ultraviolet light source; Extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image; Merging the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed; Extracting each branch vein image region in the second tobacco leaf image; Selecting a target branch vein image region from each of the branch vein image regions according to the main vein contour image; Superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed; Feature extraction is performed on the pulse image to obtain the pulse features of the tobacco leaves to be processed.
2. The method according to claim 1, characterized in that The extracting the main vein area in the first tobacco leaf image and the second tobacco leaf image includes: registering the first tobacco leaf image and the second tobacco leaf image; An image segmentation algorithm is used to extract the main vein region of the first tobacco leaf image after registration and the main vein region of the second tobacco leaf image after registration.
3. The method according to claim 1, characterized in that The step of selecting a target branch vein image region from each of the branch vein image regions according to the main vein contour image comprises: Taking the main vein contour image as a reference, a target branch vein image region matching the main vein contour image is determined in each branch vein image.
4. The method according to claim 1, characterized in that: The step of extracting features from the pulse image to obtain pulse feature information of the tobacco leaves to be processed comprises: Determine the angle between each branch pulse and the main pulse in the pulse diagram; The angle between each branch vein and the main vein is used as the pulse characteristic information of the tobacco leaves to be processed.
5. The method according to claim 1, characterized in that After obtaining the pulse characteristics of the tobacco leaves to be processed, the method further comprises: Extracting image features of the first tobacco leaf image and the second tobacco leaf image respectively, the image features comprising at least one of a color feature and a size feature; The image features of the first tobacco leaf image, the image features of the second tobacco leaf image and the pulse features are stored.
6. The method according to claim 5, characterized in that The extracted color features, size features and pulse features are stored, including: Performing label recognition on the first tobacco leaf image of the tobacco leaf to be identified to obtain label information in the identity label carried by the tobacco leaf to be identified; The label information, the color feature, the size feature and the pulse feature are stored in association.
7. The method according to claim 1, characterized in that The wavelength of the light output by the ultraviolet light source is 365nm.
8. A tobacco leaf image processing device, characterized in that: include: An acquisition unit, used for acquiring a first tobacco leaf image and a second tobacco leaf image of the tobacco leaf to be processed; The first tobacco leaf image is acquired by an image acquisition device when a standard light source is used to illuminate the tobacco leaf to be processed; The second tobacco leaf image is acquired by the image acquisition device when the tobacco leaf to be processed is irradiated by an ultraviolet light source; A first extraction unit, used for extracting main vein regions in the first tobacco leaf image and the second tobacco leaf image; a merging unit, configured to merge the main vein region of the first tobacco leaf image with the main vein region of the second tobacco leaf image to obtain a main vein contour image of the tobacco leaf to be processed; A second extraction unit, used to extract each branch vein image area in the second tobacco leaf image; A selection unit, configured to select a target branch vein image region from each of the branch vein image regions according to the main vein contour image; A superimposing unit, used for superimposing the target branch vein image area onto the main vein contour image to obtain a vein image of the tobacco leaf to be processed; The feature extraction unit is used to extract features from the pulse image to obtain the pulse features of the tobacco leaves to be processed.
9. A storage medium, characterized in that: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the tobacco leaf image processing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the tobacco leaf image processing method as described in any one of claims 1 to 7.