Leaf vein detection
The use of a density map and search boxes for leaf vein identification addresses the processing power limitations of deep learning, enabling efficient and robust vein segmentation for industrial applications.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- 4CCARE BV
- Filing Date
- 2025-07-28
- Publication Date
- 2026-07-30
AI Technical Summary
Existing deep learning-based methods for leaf vein identification require substantial processing power, which can hinder throughput in industrial applications.
A method and device using a density map and search boxes to identify leaf veins, reducing data input and processor resources by strategically positioning search boxes perpendicular to vein ends, allowing for faster and more efficient vein segmentation.
The method and device enable faster and more efficient leaf vein identification with reduced processor requirements, effectively handling leaf defects and curvatures, and facilitating applications like leaf processing and cutting.
Smart Images

Figure EP2025071663_30072026_PF_FP_ABST
Abstract
Description
[0001] Leaf Vein Identification
[0002] 1
[0003] Leaf vein identification device and a method for identifying a vein within a leaf.
[0004] The invention relates to a method for identifying a vein of a leaf, the leaf comprising a petiole, a midrib, and one or more veins, the method comprising the steps of:
[0005] - obtaining an image of the leaf, the leaf image comprising a set of image elements,
[0006] - determining a leaf density value for each image element of the set of image elements,
[0007] - creating a density map of the leaf from the leaf density values of the set of image elements, - identifying a first section of a vein based on a set of consecutively adjacent image elements having leaf density values above a threshold, the set of consecutively adjacent image elements forming an elongated structure within the leaf image.
[0008] Background.
[0009] Leaf vein morphometric is currently used for plant species classification using Deep learning as disclosed by Jing Wei Tan et al. in "Deep Learning for Plant Species Classification Using Leaf Vein Morphometric", IEEE / ACM TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. 17, NO. 1, JANUARY / FEBRUARY 2020, where an automated plant species identification system is disclosed that could help botanists and layman in identifying plant species rapidly. According to this article, deep learning is robust for feature extraction as it is superior in providing deeper information of images. A new CNN-based method named D-Leaf was proposed. The leaf images were pre-processed and the features were extracted by using three different Convolutional Neural Network (CNN) models namely pre-trained AlexNet, fine-tune AlexNet, and D-Leaf. These features were then classified by using fie machine learning techniques, namely, Support Vector Machine (SVM), Artificial Neural Network (ANN),
[0010] k-Nearest-Neighbor (k-NN), Naive-Bayes (NB), and CNN. A conventional morphometric method computed the morphological measurements based on the Sobel segmented veins was employed for benchmarking purposes.
[0011] Although the application of Deep learning has many advantages, it is not optimal for industrial applications as it requires substantial processing power of the processor performing the feature extraction, which can be detrimental to the throughput of the industrial devices processing the leaves.Leaf Vein Identification
[0012] 2
[0013] Summary of the invention.
[0014] In order to overcome this disadvantage the method for identifying a vein of a leaf is characterized in that the method further comprises the step of identifying further sections of the vein by:
[0015] - establishing a first search box having a first midpoint of a first side of the search box at a first end of a first elongated structure at and a further side of the search box at a second end of the first elongated structure, the first side of the search box being perpendicular to the elongated structure at the first end of the first elongated structure,
[0016] and steps repeatedly executed of identifying further sections of the vein by:
[0017] - establishing a further search box at the second end of the previous elongated structure, a mid-point of a first side of the further search box being at the second end of the previous elongated structure, the first side of the second search box being perpendicular to the previous elongated structure at the second end of the previous elongated structure,
[0018] - identifying a further section of the vein based on a further set of adjacent image elements having leaf density values above a threshold within the further search box, the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure having a first end at the midpoint of the first side of the further search box and a second end at a further side of the further search box.
[0019] The use of the density map of the leaf that is derived from the leaf density values of the set of image elements of the image of the leaf reduces the amount of input data, while the use of search boxes to identify vein segments removes the need for Deep learning. The method thus can be executed much faster and with less processor resources than a method employing Deep learning as disclosed by Tan et al. .
[0020] Vein segments are subsequently identified by only processing a search box that is positioned at the end of a previously detected vein segment. The search box is positioned such that on side of the search box is perpendicular to the previously detected vein segment end and such that the end of the previously detected vein segment is at the midpoint of the search box. The method then identifies an elongated structure formed by a set of adjacent image elements having leaf density values above a threshold within the search box. This newly identified elongated structure is another vein segment of the vein that is being identified. The method subsequently repeats by positioning another search box at the newly identified elongated structure etc.
[0021] If no elongated structure can be identified within a search box the end of a vein is reached and the method stops as the vein has been identified.Leaf Vein Identification
[0022] 3
[0023] The method can then be repeated for other veins of the leaf until a desired level of vein detection has been achieved that is suitable for the further processing of the leaf.
[0024] The set of subsequently identified vein sections together form a vein.
[0025] In an embodiment of the method, a size of the search box is adjusted such that the elongated structure within the box only comprises consecutively adjacent image elements connecting the first end of the elongated structure to the second end of the elongated structure.
[0026] Instead of having a fixed size search box, the size of the search box can be adjusted to cover an area of the leaf where only a single elongated structure is included in the search box. This can for instance be done by sizing the search box so that a previously identified vein, such as an adjacent vein that was previously identified, is not comprised in the search box. The size of the search box can also be chosen such that leaf defects in the leaf are not included on the search box. Having previously identified veins or leaf defect in the search box complicates the detection of elongated structure and thus excluding them improves the identification of the previously not identified leaf segments.
[0027] In another embodiment of the method, when the leaf comprises a defect, the method comprises the steps of
[0028] - identifying areas without density as defects,
[0029] - when a search box reaches an edge of a defect:
[0030] - follow an edge of the defect by establishing search boxes along the edge of the defect,
[0031] - identifying a continuation section of the vein based on a set of adjacent image elements having leaf density values above a threshold, the continuation set of adjacent image elements forming a continuation elongated structure within the leaf image, the continuation elongating structure having a first end at the edge of the defect and a second end,
[0032] - establishing a continuation search box at the second end of the continuation elongated structure, a mid-point of a first side of the continuation search box being at the second end of the continuation elongated structure, the first side of the continuation search box being perpendicular to the continuation elongated structure at the second end of the continuation elongated structure, - continuing identifying further sections of the vein using the continuation search box as a further search box.
[0033] A leaf vein can be interrupted by a leaf defect. It is desirable to still be able to identify the sections of the interrupted vein as belonging to a single vein. For this the method skips the defect by followingLeaf Vein Identification
[0034] 4
[0035] the edge of the defect and placing further search boxes along the edge of the defect until an elongated structure departing from the edge of the defect has been found within one of the search boxes. This search box is replaced by a continuation search box in order to optimally position the search box with respect to the elongated structure. From this continuation search box the identification of vein segments will continue using the normal placement of further search boxes. In another embodiment a section of the midrib is identified and used as the first section of a vein. Identifying the midrib using this method facilitates the identification of the first vein segment and placement of the first search box for the veins of the leaf as they all originate from the midrib.
[0036] Sections of the midrib that have side branches from the elongated structure that is the midrib itself can be used as search box for the vein originating from the midrib within that section of the midrib.
[0037] In another embodiment a section of the petiole is identified and used as the first section of a vein. By identifying the petiole, the midrib is subsequently easily identified as it forms a continuation of the petiole but comprised in the blade of the leaf.
[0038] A vein identifier device for identifying a vein of a leaf, the leaf comprising a petiole, a midrib, and one or more veins, comprises:
[0039] - a camera arranged to obtaining an image of the leaf, the leaf image comprising a set of image elements,
[0040] - a processor arranged to receive the leaf image and to determine a leaf density value for each image element of the set of image elements,
[0041] - a memory for storing a density map of the leaf from the leaf density values of the set of image elements as created by the processor,
[0042] - an image processor arranged to identify a first section of a vein based on a set of consecutively adjacent image elements having leaf density values above a threshold, the set of consecutively adjacent image elements forming an elongated structure within the leaf image,
[0043] characterized in that the image processor is arranged to identify further sections of the vein by: - establishing a first search box having a first midpoint of a first side of the search box at a first end of a first elongated structure at and a further side of the search box at a second end of the first elongated structure, the first side of the search box being perpendicular to the elongated structure at the first end of the first elongated structure,
[0044] and to repeatedly identify further sections of the vein by:
[0045] - establishing a further search box at the second end of the previous elongated structure, a mid-pointLeaf Vein Identification
[0046] 5
[0047] of a first side of the further search box being at the second end of the previous elongated structure, the first side of the second search box being perpendicular to the previous elongated structure at the second end of the previous elongated structure,
[0048] - identifying a further section of the vein based on a further set of adjacent image elements having leaf density values above a threshold within the further search box, the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure having a first end at the midpoint of the first side of the further search box and a second end at a further side of the further search box.
[0049] In order for a vein identifying device to be able to identify veins of a leaf is needs a camera for obtaining an image of the leaf from which the veins can be identified. The image is provided to a processor. The processor can be a general-purpose processor. The processor determines the density value for each of the image elements of the image of the leaf and creates a leaf density map. The petiole, the midrib and the veins have higher densities than the rest of the leaf. By applying a threshold to the leaf density values of the leaf density map, elongated structures can be identified by the image processor. The image processor may be implemented as a hardware block or its function can be implemented in software and executed by the processor.
[0050] Vein segments of a vein can subsequently be identified using search boxes.
[0051] In an embodiment of the vein identifier device a size of the search box is adjusted such that the elongated structure within the box only comprises consecutively adjacent image elements connecting the first end of the elongated structure to the second end of the elongated structure. Instead of having a fixed size search box, the size of the search box can be adjusted to cover an area of the leaf where only a single elongated structure is included in the search box. This can for instance be done by the image processor by sizing the search box so that a previously identified vein, such as an adjacent vein that was previously identified, is not comprised in the search box. The size of the search box can also be chosen such that leaf defects in the leaf are not included on the search box. Having previously identified veins or leaf defect in the search box complicates the detection of elongated structure by the image processor and thus excluding them improves the identification of the previously not identified leaf segments.
[0052] In a further embodiment of the vein identifier device, when the leaf comprises a defect, the defect interrupting a vein of the leaf,
[0053] the image processor is arranged to:Leaf Vein Identification
[0054] 6
[0055] - identify areas without density as defects,
[0056] - when a search box reaches an edge of a defect:
[0057] - identify a continuation section of the vein based on a set of adjacent image elements having leaf density values above a threshold, the continuation set of adjacent image elements forming a continuation elongated structure within the leaf image, the continuation elongating structure having a first end at the edge of the defect,
[0058] - establish a continuation search box at the first end of the continuation elongated structure, a midpoint of a first side of the continuation search box being at the first end of the continuation elongated structure, the first side of the second search box being perpendicular to the third elongated structure at the first end of the third elongated structure,
[0059] - continue identifying further sections of the vein using the continuation search box as a further search box.
[0060] A leaf defect is easily identified as, contrary to any part of the leaf, it is a gap in the leaf and it there for has no density. The leaf defect however possible interrupts a vein, i.e. it causes a single vein to be split into two vein parts that are not interconnected, however belong to the same vein and a s such it is beneficial to assign both vein parts to the same vein.
[0061] In order to achieve this is image processor skips the defect by following the edge of the defect and placing further search boxes along the edge of the defect until an elongated structure departing from the edge of the defect has been found within one of the search boxes . This search box is replaced by a continuation search box in order to optimally position the search box with respect to the elongated structure. From this continuation search box the identification of vein segments will continue using the normal placement of further search boxes.
[0062] In a further embodiment of the vein identifier device the image processor is arranged to identify a section of the midrib and use the identified section of the midrib as the first section of a vein.
[0063] Identifying the midrib by the image processor facilitates the identification of the first vein segment and placement of the first search box for the veins of the leaf as they all originate from the midrib. Sections of the midrib that have side branches from the elongated structure that is the midrib itself can be used as search box for the vein originating from the midrib within that section of the midrib.
[0064] In a further embodiment of the vein identifier device the image processor is arranged to identify a section of the petiole use the identified section of the petiole as the first section of the midrib.Leaf Vein Identification
[0065] 7
[0066] By identifying the petiole, the midrib is subsequently easily identified by the image processor as it forms a continuation of the petiole but comprised in the blade of the leaf.
[0067] A leaf processing device beneficially comprises comprising a vein identifier device described above as it allows the leaf processing device to optimally treat the leaf, for instance by being able to know where the veins are the robustness of the leaf can be determined and the transportation of the leaf through the leaf processing device can be adjusted to the determined robustness.
[0068] A leaf processing device where the leaf processing device is a tobacco leaf stretcher benefits from a vein identifying device according to the invention because it wants to maximize the useable area of the leaf by stretching the leaf and can determine optimal stretching forces and stretching directions based on the location and direction of the veins in the leaf.
[0069] A tobacco leaf cutter benefits from a vein identifying device according to the invention because it wants to maximize the quality of the cut-outs from the leaf by minimizing the veins in the cut-outs and thus benefits from knowing the location of the veins.
[0070] Description of the figures.
[0071] Figure 1 shows the structure of a leaf.
[0072] Figure 2 shows a density map of the leaf.
[0073] Figure 3 shows the elements of a vein identification device.
[0074] Figure 4 shows an enlarged section of a vein and a first search box.
[0075] Figure 5 shows an enlarged section of a vein and further search boxes.
[0076] Figure 6 shows a defect separating a vein into two vein parts.
[0077] Figure 7 shows search boxes varying in size.
[0078] Figure 8 shows a flow chart of the method to identify vein segments using search boxes.Leaf Vein Identification
[0079] 8
[0080] Detailed description.
[0081] Figure 1 shows the structure of a leaf.
[0082] The leaf 1 has a petiole 1, a midrib 3 and one or more veins 4. Some leaves 1 also have a defect 5. Shown in figure 1 is a defect 5 that separates a vein 6 into a first vein part 6a and a second vein part 6b.
[0083] Figure 2 shows a density map of the leaf.
[0084] The leaf density map 20 is derived from the density values of the image elements of the image of the leaf 1. An image element 21, 22, 23 comprising a section of a vein 4, a section of the midrib 3 or a section of the petiole 2 will capture a part of the leaf 1 having a higher density than an image element 24 that only contains a blade section 4 of the leaf. An easy way of obtaining the density values is by determining the translucency of the leaf per image element. This is achieved by placing a light source on one side of the plane of the leaf and obtaining the leaf image from the other side of the plane of the leaf. The amount of light received by each image element of the camera represents the translucency of the leaf at that image element, and thus inversely indicates the density of the leaf at the image element. For example, the amount of light received by the image element of the camera can vary between 0 and 255 for an 8 bit digitized image element, where a low value indicates a high density, as a high density area of the leaf will allow little light to pass through the leaf at that image element while a blade section between the veins will allow a high amount of light to pass through the leaf at the image element. A defect will typically result in a very high amount of light passed through and thus a high value digitized close or equal to 255 in this example as there is no leaf density that reduces the amount of light passing. As such, the density of the leaf at a particular element can be derived from the amount of light received by each image element, where veins 4, the midrib 3 and the petiole 2 will cause the corresponding image elements 21, 22, 23 to receive an amount of light in the lower part of the digitizing range. This allows the processor to create a density map 20 and store this density map 20 in a memory to be used for subsequent identifying the veins 4, the midrib 3 and or the petiole 2. The density map can have the same value granularity as the values representing the amount of light received, but can also be binned into ranges such as "high density", "low density" and "no density" and thus comprise a contrast enhanced density map which can facilitate the subsequent identification of the veins. Defects can particularly easily be identified this way.
[0085] Figure 3 shows the elements of a vein identification device.
[0086] The vein identification device 30 comprises a camera 31 arranged to obtaining an image of the leaf, the leaf image produced by the camera 31 comprises a set of image elements. This leaf image isLeaf Vein Identification
[0087] 9
[0088] provided to a processor 32 which is arranged to determine a leaf density value for each image element of the set of image elements as described in figure 2.
[0089] The processor 32 is coupled to a memory 33 for storing the density map of the leaf that the processor 32 created based on the leaf density values of the set of image elements.
[0090] The vein identification device 30 further comprises an image processor 34. The image processor 34 is arranged to identify sections of a vein based on a set of consecutively adjacent image elements having leaf density values above a threshold. To detect a vein segment the image processor 34 identifies a set of consecutively adjacent image elements forming an elongated structure within a search box within the leaf image. As the identification of vein segments progresses the image processor 34 also repeatedly defines search boxes in order to limit the leaf area to be processed. By strategically placing the search boxes the amount of data to be processed by the image processor 34 will be reduced, as well as the risk of the image processor 34 falsely identifying vein segments of adjacent veins to belong to the vein presently being identified. The image processor 34 can provide the vein identification results via an output 35 of the vein identification device 30 to a external device or machine that is in need of this information, such as a leaf stretcher or a leaf cutter.
[0091] Alternatively, not shown, the image processor 34 provides the results to the processor 32 and the processor 32 provides the vein identification results via the output 35 of the vein identification device 30 to the external device.
[0092] Figure 4 shows an enlarged section of a vein and a first search box.
[0093] In order to identify a vein segment 41 of a vein 4, the image processor establishes a first search box 40. The first search box 40 is placed such that a first midpoint 42 of a first side 43 of the search box 40 is positioned at a first end 44 of a first elongated structure 41 and a further side 45 of the search box 40 is at a second end 46 of the first elongated structure 41 , the first side 43 of the search box being perpendicular to the elongated structure 41 at the first end 44 of the first elongated structure 41.
[0094] The elongated structure 41 is then identified as a vein segment 41 of the vein 4.
[0095] After establishing this first search box 40 the process is repeated to identify further sections of the vein as explained in figure 5.
[0096] Figure 5 shows an enlarged section of a vein and further search boxes.
[0097] After establishing a first search box 40 and identifying a first vein segment 41 within this search box 40, further search boxes are subsequently used to identify subsequent vein segments 51, 59. ForLeaf Vein Identification
[0098] 10
[0099] this, the image processor repeatedly establishes a further search box 50, 58 at the second end 46, 56 of the previous identified elongated structure 41, 51, such that a mid-point 52, 54 of a first side 53, 55 of the further search box 50, 58 is at the second end 46, 56 of the previously identified elongated structure 41, 51, the first side 53, 56 of the further search box 50, 58 being perpendicular to the previous elongated structure 41, 51 at the second end 46, 56 of the previous elongated structure 41, 51.
[0100] The image processor then identifies a further section of the vein 51, 59 based on a further set of adjacent image elements having leaf density values above a threshold within the further search box 50, 58 , the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure 51, 59 having a first end 57a, 57b at the midpoint 52, 54 of the first side 53, 55 of the further search box 50, 58 and a second end at a further side of the further search box 50, 58 where the further elongate structure 51, 59 exits the corresponding search box 50, 58.
[0101] Choosing the position of the search box 40, 50, 58 such that the first end of the elongated structure 44, 57a, 57b is at the midpoint of the first side 43, 53, 55 and the first side being perpendicular to the elongated structure at the end of the previously identified vein segment 41, 51, 59 ensures optimal alignment of the search box, thus optimally accommodating possible curvatures in the vein segment within the search box. The search box size in this way can be chosen larger compared to a situation where the search boxes have a fixed orientation, for instance aligned with the raster of the image elements.
[0102] Figure 6 shows a defect separating a vein into two vein parts.
[0103] When a defect 5 separating a vein into two vein parts 6a, 6b is encountered , it is no longer possible for the image processor to continue to follow the vein as the further search box based on the location of the second end of the elongated structure in the previous search box 61 would only contain the defect 5 and no longer would comprise a vein segment. The identification of the first part of the vein 6a would stop, which is undesirable as the remaining part 6b of the vein would not be identified as part of the vein. In order to overcome this, the image processor, when arriving at a defect 5, defines further search boxes 62a....62z but no longer uses the second end of a previously identified vein segment, but instead uses the edge 63 of the defect 60. The image processor sequentially progresses along the edge 63 of the defect 60 until, within a further search box 62z, an elongated structure 64 is identified. This elongated structure 64 is a continuation section of the vein 6b and is identified based on a set of adjacent image elements having leaf density values above a threshold, the set of adjacent image elements forming a continuation elongated structure 64 withinLeaf Vein Identification
[0104] 11
[0105] the leaf image and within the further search box 62z, the continuation elongated structure 64 having a first end 65 at the edge 63 of the defect 60. As such a vein segment 64 can be identified that is a continuation of the vein that was being identified before the defect was reached.
[0106] Based on this continuation vein segment 64 a continuation search box 67 is defined at the second end 66 of the continuation elongated structure 64, a mid-point 68 of a first side of the continuation search box 67 being at the second end 66 of the continuation elongated structure 64 , the first side of the continuation search box 67 being perpendicular to the continuation elongated structure 64 at the second end 66 of the continuation elongated structure 64.
[0107] Using the continuation search box 67 as a further search box, further search boxes 69a, 69b, 69c are subsequently defined and the corresponding vein segments of the remaining part 6b of the vein within these search boxes 69a, 69b, 69c can be identified.
[0108] Figure 7 shows search boxes varying in size.
[0109] Advantageously the size of the search boxes 72, 73, 74 can be varied.
[0110] When identifying vein segments 72a, 73a, 74a of a first vein 4, if the size of a search box is chosen too large, vein segments of an adjacent second vein 71 can become included in the search box 72, 73, 74 leading to difficulties for the image processor to identify the segment 72a, 73a, 74a, of the first vein 4.
[0111] When the adjacent second vein 71 has previously identified the image processor knows its location and can consequently adjust size the search boxes 72, 73, 74 used to identify the segments 72a, 73a, 74a, of the first vein 4 such that the search boxes 72, 73, 74 do not comprise vein segments of the adjacent second vein 71. As shown in figure 7 some search boxes 72, 74 can be relatively large in size without comprising vein segments of the adjacent second vein 71, while other search boxes 73 have to be relatively small in size to avoid comprising vein segments of the adjacent second vein 71. Using larger search boxes allows the image processor to more rapidly progress along the vein 4 as larger vein segments 72a, 74a are identified per search box 72, 74.
[0112] Figure 8 shows a flow chart of the method to identify vein segments using search boxes.
[0113] In a first step 81, an image of the leaf is obtained, the leaf image comprising a set of image elements. In a second step 82 a leaf density value is determined for each image element of the set of image elements,
[0114] In a third step 83 a density map of the leaf is created from the leaf density values of the set of image elements,Leaf Vein Identification
[0115] 12
[0116] In a fourth step 84 a first section of a vein is identified based on a set of consecutively adjacent image elements having leaf density values above a threshold, the set of consecutively adjacent image elements forming an elongated structure within the leaf image,
[0117] In a fifth step 85 a first search box is established, the first search box having a first midpoint of a first side of the search box at a first end of a first elongated structure at and a further side of the search box at a second end of the first elongated structure, the first side of the search box being perpendicular to the elongated structure at the first end of the first elongated structure.
[0118] In a repeated manner further sections of the vein are identified by:
[0119] in a sixth step 86 establishing a further search box at the second end of the previous elongated structure, a mid-point of a first side of the further search box being at the second end of the previous elongated structure, the first side of the further search box being perpendicular to the previous elongated structure at the second end of the previous elongated structure, and
[0120] in a seventh step 87 identifying a further section of the vein based on a further set of adjacent image elements having leaf density values above a threshold within the further search box, the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure having a first end at the midpoint of the first side of the further search box and a second end at a further side of the further search box.
[0121] In an eighth step 88 it is determined whether a further elongated structure was found in the further search box.
[0122] When no elongated structure can be found in a further search box the complete vein has been detected and the method ends.
[0123] If an elongated structure was found, the sixth and seventh step are repeated to identify yet a further vein segment.
[0124] The method can of course be repeated if desired to identify further veins of the leaf.
[0125] It should be noted that in the description of the figures vein segments and elongated structures bear the same reference numerals as an elongated structure once identified is being defined to be a vein segment. A set of connected vein segments form a vein. The processor can store the vein segments and the vein in the memory and provides them to the leaf processing devices that can then process the leaves using the vein information as provided by the vein identifying device.
Claims
Leaf Vein Identification13Claims:
1. A method for identifying a vein of a leaf, the leaf comprising a petiole, a midrib, and one or more veins, the method comprising the steps of:- obtaining an image of the leaf, the leaf image comprising a set of image elements,- determining a leaf density value for each image element of the set of image elements,- creating a density map of the leaf from the leaf density values of the set of image elements, - identifying a first section of a vein based on a set of consecutively adjacent image elements having leaf density values above a threshold, the set of consecutively adjacent image elements forming an elongated structure within the leaf image,characterized in that the method further comprises the step of identifying further sections of the vein by:- establishing a first search box having a first midpoint of a first side of the search box at a first end of a first elongated structure at and a further side of the search box at a second end of the first elongated structure, the first side of the search box being perpendicular to the elongated structure at the first end of the first elongated structure,and steps repeatedly executed of identifying further sections of the vein by:- establishing a further search box at the second end of the previous elongated structure, a mid-point of a first side of the further search box being at the second end of the previous elongated structure, the first side of the further search box being perpendicular to the previous elongated structure at the second end of the previous elongated structure,- identifying a further section of the vein based on a further set of adjacent image elements having leaf density values above a threshold within the further search box, the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure having a first end at the midpoint of the first side of the further search box and a second end at a further side of the further search box.
2. A method as claimed in claim 1,where a size of the search box is adjusted such that the elongated structure within the box only comprises consecutively adjacent image elements connecting the first end of the elongated structure to the second end of the elongated structure.Leaf Vein Identification143. A method as claimed in claim 1 or 2,where the leaf further comprises a defect, the defect interrupting a vein of the leaf,the method comprising the steps of:- identifying areas without density as defects,- when a search box reaches an edge of a defect:- follow an edge of the defect by establishing search boxes along the edge of the defect,- identifying a continuation section of the vein based on a set of adjacent image elements having leaf density values above a threshold, the continuation set of adjacent image elements forming a continuation elongated structure within the leaf image, the continuation elongating structure having a first end at the edge of the defect and a second end,- establishing a continuation search box at the second end of the continuation elongated structure, a mid-point of a first side of the continuation search box being at the second end of the continuation elongated structure, the first side of the continuation search box being perpendicular to the continuation elongated structure at the second end of the continuation elongated structure, - continuing identifying further sections of the vein using the continuation search box as a further search box.
4. A method as claimed in any one of the claims 1 to 3,where a section of the midrib is identified and used as the first section of a vein.
5. A method as claimed in any one of the claims 1 to 3,where a section of the petiole is identified and used as the first section of a vein.6 A vein identifier device for identifying a vein of a leaf, the leaf comprising a petiole, a midrib, and one or more veins, the device comprising:- a camera arranged to obtaining an image of the leaf, the leaf image comprising a set of image elements,- a processor arranged to receive the leaf image and to determine a leaf density value for each image element of the set of image elements,Leaf Vein Identification15- a memory for storing a density map of the leaf from the leaf density values of the set of image elements as created by the processor,- an image processor arranged to identify a first section of a vein based on a set of consecutively adjacent image elements having leaf density values above a threshold, the set of consecutively adjacent image elements forming an elongated structure within the leaf image,characterized in that the image processor is arranged to identify further sections of the vein by: - establishing a first search box having a first midpoint of a first side of the search box at a first end of a first elongated structure at and a further side of the search box at a second end of the first elongated structure, the first side of the search box being perpendicular to the elongated structure at the first end of the first elongated structure,and to repeatedly identify further sections of the vein by:- establishing a further search box at the second end of the previous elongated structure, a mid-point of a first side of the further search box being at the second end of the previous elongated structure, the first side of the second search box being perpendicular to the previous elongated structure at the second end of the previous elongated structure,- identifying a further section of the vein based on a further set of adjacent image elements having leaf density values above a threshold within the further search box, the further set of adjacent image elements forming a further elongated structure within the leaf image, the further elongating structure having a first end at the midpoint of the first side of the further search box and a second end at a further side of the further search box.
7. A vein identifier device as claimed in claim 6,where a size of the search box is adjusted such that the elongated structure within the box only comprises consecutively adjacent image elements connecting the first end of the elongated structure to the second end of the elongated structure.
8. A vein identifier device as claimed in claim 6 or 7,where when the leaf further comprises a defect, the defect interrupting a vein of the leaf, the image processor is arranged to:- identify areas without density as defects,- when a search box reaches an edge of a defect:- identify a continuation section of the vein based on a set of adjacent image elements having leaf density values above a threshold, the continuation set of adjacent image elements forming aLeaf Vein Identification16continuation elongated structure within the leaf image, the continuation elongating structure having a first end at the edge of the defect,- establish a continuation search box at the first end of the continuation elongated structure, a midpoint of a first side of the continuation search box being at the first end of the continuation elongated structure, the first side of the second search box being perpendicular to the third elongated structure at the first end of the third elongated structure,- continue identifying further sections of the vein using the continuation search box as a further search box.
9. A vein identifier device as claimed in any one of the claims 6 to 8,where the image processor is arranged to identify a section of the midrib and use the identified section of the midrib as the first section of a vein.
10. A vein identifier device as claimed in any one of the claims 6 to 8,where the image processor is arranged to identify a section of the petiole use the identified section of the petiole as the first section of the midrib.
11. A leaf processing device comprising a vein identifier device as claimed in any one of the claims 6 to 10.12 A leaf processing device as claimed in claim 11 where the leaf processing device is a tobacco leaf stretcher.13 A leaf processing device as claimed in claim 11 where the leaf processing device is a tobacco leaf cutter.