Self-adaptive exposure method, system and equipment of plant protection unmanned aerial vehicle camera and medium
By dynamically dividing the ROI and adjusting the exposure parameters using an adaptive exposure method, the problem of inaccurate exposure of agricultural drones in complex lighting environments was solved, improving the clarity of image acquisition and the accuracy of analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-17
AI Technical Summary
Wide-angle cameras on agricultural drones can cause inaccurate exposure in key areas during field operations due to extreme brightness differences and complex lighting environments, affecting the accuracy of pest and disease identification and crop growth assessment.
An adaptive exposure method is adopted, which divides the cropping area and the background area through a dynamic ROI update mechanism, and adjusts the exposure parameters in real time based on a preset weight allocation strategy and measured brightness values to ensure that the cropping area receives accurate exposure first.
It significantly improved the clarity of image acquisition, provided a high-quality data foundation, and laid the groundwork for intelligent diagnosis of pests and diseases and dynamic monitoring of crop growth.
Smart Images

Figure CN121691933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drone application technology, and in particular to an adaptive exposure method, system, device and medium for a plant protection drone camera. Background Technology
[0002] In smart agriculture field operations, plant protection drones equipped with wide-angle cameras (typically with a field of view > 120°) face the dual challenges of extreme brightness differences and complex lighting environments because they simultaneously cover both the sky and the ground. Field lighting is dynamically variable: strong midday sunlight causes crop leaves to reflect light highly, obscuring texture details; weak light in the early morning / evening makes pest and disease characteristics blurry and difficult to identify; different crop canopy structures (such as tall corn and low-growing vegetables) exacerbate uneven regional brightness.
[0003] Traditional image signal processors (ISPs) adjust exposure based on the average brightness of the entire fisheye image, neglecting the precise needs of local analysis areas (such as areas with high incidence of pests and diseases, and farmland boundaries). This results in "overexposure and loss of detail" or "underexposure and unclear features" in key areas, directly affecting the accuracy of intelligent analyses such as pest and disease identification and crop growth assessment, and reducing the effectiveness of field operation decisions. Therefore, there is an urgent need for an effective adaptive exposure method for agricultural drone cameras to solve the above problems. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide an adaptive exposure method, system, device and medium for plant protection drones that overcomes or at least partially solves the above problems.
[0005] To achieve the above and other related objectives, the present invention provides an adaptive exposure method for an agricultural drone camera, the method comprising:
[0006] The first image of the farmland operation scene was acquired using the initial exposure parameters, and the cropping area and background area of the first image were dynamically divided based on the dynamic ROI update mechanism.
[0007] Based on a preset weight allocation strategy, the cropped area and the background area are respectively assigned corresponding exposure reference weights, and the weighted brightness information of the first image is calculated by combining the measured brightness values of each area.
[0008] The image signal processor adjusts the initial exposure parameters in real time based on the weighted brightness information to ensure that the cropped area receives accurate exposure first.
[0009] Optionally, the dynamic division of the cropping region and background region of the first image based on the dynamic ROI update mechanism includes:
[0010] The first image is used to extract features using a target detection algorithm to determine the current job type and crop distribution characteristics;
[0011] Based on the current job type and the crop distribution characteristics, and combined with the vertical projection method and feature point clustering fitting algorithm, the ROI region in the first image is dynamically updated, and the first image is divided into a cropping region and a background region accordingly.
[0012] Optionally, the step of assigning corresponding exposure reference weights to the cropped area and the background area based on a preset weight allocation strategy includes:
[0013] Based on a preset weight allocation strategy, the first image is assigned differentiated weights; wherein, the cropped area is assigned a high exposure reference weight, the background area is assigned a low exposure reference weight, and the overall weight allocation satisfies normalization constraints.
[0014] Optionally, calculating the weighted brightness information of the first image by combining the measured brightness values of each region includes:
[0015] The measured brightness values of the cropped area and the background area are calculated separately, and weighted according to their respective exposure reference weights to obtain the weighted brightness information of the first image.
[0016] Optionally, the step of adjusting the initial exposure parameters in real time based on weighted brightness information using an image signal processor to ensure that the cropped area receives accurate exposure preferentially includes:
[0017] The image signal processor compares the weighted brightness information with the target brightness value to determine whether the first image is underexposed or overexposed; wherein the target brightness value is a preset ideal brightness reference.
[0018] If the first image is underexposed, the exposure time is increased to the hardware limit.
[0019] If the exposure time has reached the hardware limit and there is still underexposure, the gain is increased step by step in the order of priority: analog gain, digital gain, and ISP internal gain, until the brightness of the cropped area approaches the target brightness value.
[0020] Optionally, after the step of determining whether the first image is underexposed or overexposed, the method further includes:
[0021] If the first image is overexposed, the exposure time is reduced to the hardware lower limit first.
[0022] If the exposure time has reached the hardware lower limit and the image is still overexposed, the gain is reduced step by step in the order of priority: analog gain, digital gain, and ISP internal gain, until the brightness of the cropped area falls back to the target brightness value.
[0023] Secondly, the present invention also provides an adaptive exposure system for a plant protection drone camera, the system comprising:
[0024] The segmentation module is used to acquire the first image of the farmland operation scene using the initial exposure parameters, and dynamically segment the cropping area and background area of the first image based on the dynamic ROI update mechanism.
[0025] The calculation module is used to assign corresponding exposure reference weights to the cropped area and the background area respectively based on a preset weight allocation strategy, and calculate the weighted brightness information of the first image by combining the measured brightness values of each area.
[0026] The adjustment module is used to adjust the initial exposure parameters in real time based on the weighted brightness information through the image signal processor, so as to ensure that the cropped area is given priority for accurate exposure.
[0027] Thirdly, the present invention provides an electronic device comprising: a memory and a processor; the memory for storing a computer program; and the processor for executing the computer program stored in the memory to cause the electronic device to perform the steps of the adaptive exposure method for an agricultural drone camera as described above.
[0028] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by an electronic device, implements the steps of the adaptive exposure method for an agricultural drone camera as described above.
[0029] Fifthly, the present invention provides a computer program product, which includes computer program code, and when the computer program code is run on a computer, the computer implements the steps of the adaptive exposure method for agricultural drone cameras as described above.
[0030] The above-described one or more technical solutions provided by this invention can have the following advantages or at least achieve the following technical effects:
[0031] When dealing with complex lighting environments, the plant protection drone of this invention can ensure that the target area is always in the best exposure state by adjusting the exposure parameters in real time based on a dynamic weight allocation mechanism. This significantly improves the clarity of image acquisition and lays a high-quality data foundation for subsequent analysis tasks such as intelligent diagnosis of pests and diseases and dynamic monitoring of crop growth. Attached Figure Description
[0032] Figure 1 The diagram shows a flowchart of an adaptive exposure method for an agricultural drone according to an embodiment of the present invention.
[0033] Figure 2 The diagram shown is a schematic representation of a farm operation scenario according to an embodiment of the present invention;
[0034] Figure 3 The diagram shown is a schematic representation of an indoor workspace according to an embodiment of the present invention;
[0035] Figure 4 The diagram shows a functional module schematic of the adaptive exposure system of an agricultural drone in one embodiment of the present invention.
[0036] Figure 5 The diagram shown is a schematic representation of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0037] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0038] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0039] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0040] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0041] Unless otherwise stated, the term "multiple" means two or more.
[0042] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0043] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0044] The technical solutions of the present invention will now be described in detail with reference to the accompanying drawings.
[0045] Please see Figure 1 An embodiment of the present invention provides an adaptive exposure method for an agricultural drone camera, the method comprising the following steps S10 to S30:
[0046] Step S10: Acquire a first image of the farmland operation scene using initial exposure parameters, and dynamically divide the cropping area and background area of the first image based on the dynamic ROI update mechanism.
[0047] The initial exposure parameters represent the baseline exposure settings used by the agricultural drone camera when starting a new exposure adjustment cycle. It serves as the starting point for subsequent adaptive adjustments and includes parameters such as exposure time, aperture size, analog gain (AGain), digital gain (DGain), and ISP internal gain (ISPgain).
[0048] The dynamic ROI update mechanism is used to represent the dynamic adjustment of the position and size of the ROI (Region of Interest) during image sequence processing, based on the features of the current frame and changes in the target object, to adapt to the movement and changes of the target object.
[0049] The cropped area (ROI) is used to represent the critical region in the first image that is marked as requiring priority in ensuring exposure quality. It is the core of adaptive exposure, and its position, size, and shape are dynamically generated based on the "job type" and "crop distribution characteristics." Its ultimate goal is to ensure that the image details of the target subject (such as lesions in pest and disease monitoring, or leaves in a spraying task) are clear and accurately exposed.
[0050] The background area represents all parts of the first image outside the cropped area. Common background areas include the sky, field ridges, bare soil, distant trees or buildings, etc. Excessive brightness or darkness in these areas can interfere with traditional metering.
[0051] Please see Figure 2This image illustrates the impact of camera field of view and exposure strategy on image quality in a field operation scenario. The camera in the image has a large field of view, covering a wide area of both the sky and the ground. In this situation, if the camera's exposure strategy does not adaptively adjust but instead sets the exposure parameters based on the average brightness of the entire image, it may result in unsatisfactory exposure in localized areas. Specifically, when the sky is too bright or the ground is too dark, the camera may overexpose the sky or overexpose the ground, causing certain parts of the image to be either too bright or too dark, affecting the overall visual effect. This uneven exposure phenomenon will cause the user to see noticeable fluctuations in brightness in the image, impacting image quality and visual appeal.
[0052] In practice, the initial exposure parameters can be used to acquire the first image of the farmland scene, and the cropping area and background area of the first image can be determined and divided in real time using a dynamic ROI update mechanism. By adaptively adjusting the ROI, the efficiency and accuracy of image processing can be improved, while reducing the interference of background noise, thereby optimizing the subsequent image analysis process and better adapting to the complexity and dynamic changes of the farmland environment.
[0053] Step S20: Based on a preset weight allocation strategy, assign corresponding exposure reference weights to the cropped area and the background area respectively, and calculate the weighted brightness information of the first image by combining the measured brightness values of each area.
[0054] The weight allocation strategy defines the rules for allocating exposure reference weights to different regions of the image, guiding the image signal processor (ISP) to prioritize the cropped region through differentiated weight settings. Specifically, it includes the following aspects:
[0055] Region priority setting: Assign high weight (usually 0.7-0.9) to the cropping area (core working area) and low weight (usually 0.1-0.3) to the background area (such as sky, soil) to ensure that the exposure decision is dominated by the cropping area.
[0056] Dynamic adjustment mechanism: The weights are adjusted in real time based on differences in brightness, contrast, and the risk of overexposure / underexposure. For example, when there is strong light reflection in the background area (such as reflection on water or an overly bright sky), its weight is automatically reduced to avoid interfering with the exposure of the cropped area; when there are dark details in the cropped area (such as crop leaves in shadow), its weight is appropriately increased to increase the visibility of details.
[0057] Multi-level weighting structure: The background area can be further divided into multiple sub-metering zones (such as sky zone, shadow zone, and soil zone), and differentiated weights can be assigned to each sub-zone to achieve more precise exposure control. For example, the sky weight can be set to 0.05, and the soil weight to 0.15, to prioritize the exposure of the ground crop area.
[0058] In the implementation of agricultural drone applications, a dynamic weight matrix is constructed based on a weight allocation strategy and real-time scene analysis (operation type, crop distribution characteristics). For example, the image is divided into N×M grid cells (N and M can be dynamically adjusted according to scene complexity), and each grid cell is assigned an independent weight coefficient. High weights (e.g., 0.8) are assigned to densely cropped areas, while low weights (e.g., 0.2) are assigned to bare soil areas, guiding the ISP to prioritize the exposure accuracy of cropped areas (e.g., crop leaves, pest and disease areas).
[0059] Exposure reference weights are coefficients used to quantify the importance of different regions in an image, typically ranging from 0 to 1, ensuring the reasonable proportion of weight allocation across all regions. In practical applications, such as pest and disease monitoring, assigning high weights to leaf areas is crucial for ensuring the accuracy of subsequent image recognition algorithms. The weight threshold can be adaptively adjusted based on crop type and growth stage to ensure that cropped areas always receive preferential exposure.
[0060] Please see Figure 3 This image illustrates how a weighted distribution strategy can optimize exposure. The white grid is used for region division, and the red boxes mark the key cropped areas. Higher exposure weights are assigned to the cropped areas within the red boxes to ensure clear details in the working area; while lower exposure weights are assigned to the areas outside the red boxes to reduce background interference and improve image quality in the cropped areas.
[0061] The measured brightness value is a numerical value obtained by statistically analyzing the brightness of all pixels in the cropped or background area of the first image. It is usually the average brightness of this area.
[0062] Weighted brightness information is used to represent key data for comprehensively evaluating image brightness. It focuses on the brightness values of key areas of the crop (such as leaves and fruits) to ensure that these areas maintain appropriate exposure levels under various lighting conditions (such as strong light, shadow, and backlight).
[0063] In practical implementation, based on a preset weight allocation strategy, differentiated exposure reference weights can be assigned to the cropped area and the background area respectively to guide the ISP to prioritize the cropped area. Then, the measured brightness values of each area (obtained through YUV weighted average statistics) are combined to perform weighted calculations to obtain the weighted brightness information of the first image. Thus, the weighted brightness information can effectively suppress the interference of bright or dark backgrounds, ensuring that the brightness of the cropped area, as the main subject, is always maintained within an appropriate range, thereby improving the accuracy and efficiency of image processing.
[0064] Step S30: The image signal processor adjusts the initial exposure parameters in real time based on the weighted brightness information to ensure that the cropped area receives accurate exposure first.
[0065] In practical implementation, the image signal processor (ISP) can adjust the camera's initial exposure parameters (including exposure time, aperture size, analog gain (AGain), digital gain (DGain), and ISP internal gain (ISPgain) in real time based on the brightness information to ensure that the cropped area receives accurate exposure first. Specifically, if the camera aperture is adjustable, the aperture size is adjusted first, following the priority of "aperture priority → exposure time → gain". If the aperture is fixed, the exposure time is adjusted directly. When the brightness of the cropped area is lower than the target brightness value (a preset ideal brightness benchmark used to guide the ISP in adjusting exposure parameters to ensure that the cropped area in the first image reaches the ideal exposure level), the exposure time is increased first until the camera hardware limit is reached. When the exposure time reaches the limit, the analog gain, digital gain, and ISP internal gain are increased step by step to ensure that the cropped area is exposed to the standard. When the brightness of the cropped area is higher than the target brightness value, the exposure time is decreased first until the hardware lower limit is reached. When the exposure time reaches the lower limit, the analog gain, digital gain, and ISP internal gain are decreased step by step to avoid overexposure. By dynamically adjusting exposure parameters, the brightness of the cropped area is kept within a suitable range, effectively suppressing interference from bright or dark backgrounds. This makes it particularly suitable for scenes with complex or frequently changing lighting conditions.
[0066] Furthermore, in one embodiment, step S20 may include sub-step S201:
[0067] Sub-step S201: Based on a preset weight allocation strategy, differentiated weights are assigned to the first image; wherein, a high exposure reference weight is assigned to the cropped area, a low exposure reference weight is assigned to the background area, and the overall weight allocation satisfies the normalization constraint.
[0068] Among them, the high exposure reference weight is used to assign a lower weight value to the cropped area; in order to ensure that the details of the cropped area are clearly visible, its value must be significantly higher than that of the background area by 2 to 5 times (e.g., 0.7-0.9, corresponding to a low exposure reference weight of 0.1 to 0.3 for the background area), and the overall weight allocation must meet the normalization constraint.
[0069] Low exposure reference weight is used to indicate that a low weight value (such as 0.1-0.3) is assigned to the background area.
[0070] It should be noted that the specific weighting coefficients can be dynamically adjusted according to the complexity of the scene to ensure that the contrast and resolution of the cropped area (such as crop leaves and fruits) are improved first, while effectively suppressing the interference of the background (such as soil and sky).
[0071] In a specific embodiment, the first image can be differentiated according to a preset weight allocation strategy. To ensure that the details of the cropped area are clearly visible, a higher weight value (i.e., high exposure reference weight) can be assigned to the cropped area, while a lower weight value (i.e., low exposure reference weight) can be assigned to the background area (such as non-critical areas like soil and sky). Furthermore, the weight allocation must satisfy a normalization constraint, meaning that the sum of the weights of each area equals 1 after normalization, ensuring the balance and effectiveness of the weight allocation. This dynamic weight adjustment method prioritizes improving the image quality of the cropped area during exposure adjustment while suppressing noise interference from the background area, thereby improving the accuracy and processing efficiency of subsequent image analysis (such as pest and disease identification and growth status monitoring), and achieving a more intelligent agricultural image processing workflow.
[0072] Furthermore, in one embodiment, step S20 may further include sub-step S202:
[0073] Sub-step S202: Calculate the measured brightness values of the cropped area and the background area respectively, and perform weighted calculation based on their respective exposure reference weights to obtain the weighted brightness information of the first image.
[0074] In a specific embodiment, following sub-step S201, after determining the exposure reference weights of the cropped area and the background area, the measured brightness values of the cropped area and the background area can be calculated separately. Then, based on the high exposure reference weight and the low exposure reference weight, the measured brightness values of the two areas are weighted and fused to obtain the weighted brightness information of the first image (e.g., weighted brightness = (ROI weight × ROI measured brightness) + (background weight × background measured brightness)). This process, through weighted summation, can prioritize reflecting the impact of ROI brightness on the overall exposure decision, suppress background interference, and ensure that the ISP adjusts parameters (such as gain) based on the actual brightness of the ROI, thereby improving the exposure accuracy and dynamic range of key areas of the image.
[0075] In this embodiment, when dealing with complex lighting environments, the agricultural drone can ensure that the target area is always in the best exposure state by adjusting the exposure parameters in real time based on the dynamic weight allocation mechanism. This significantly improves the clarity of image acquisition and lays a high-quality data foundation for subsequent analysis tasks such as intelligent diagnosis of pests and diseases and dynamic monitoring of crop growth.
[0076] Based on the foregoing embodiments, a second embodiment of the adaptive exposure method for agricultural drone cameras of the present invention is proposed. In this embodiment, step S10 may include the following sub-steps S101 to S102:
[0077] Sub-step S101: Use a target detection algorithm to extract features from the first image to determine the current job type and crop distribution characteristics.
[0078] Among them, object detection algorithms refer to a class of algorithms that automatically identify and locate the position and category of target objects in images or videos. Examples include YOLO (You Only Look Once) or Faster R-CNN.
[0079] The task type indicates the specific task category currently being performed by the agricultural drone, including but not limited to pesticide spraying, pest and disease monitoring, and growth monitoring.
[0080] It's important to note that different job types have fundamentally different focuses when it comes to images, allowing for dynamic adjustments to cropping areas and weighting. For example, during pesticide spraying, the lower and middle leaves of the crop should be exposed to observe where pests are hiding. During pest and disease monitoring, priority should be given to exposing areas with abnormal color or shape to clearly show lesions or pest characteristics. Growth monitoring, on the other hand, requires uniform exposure of the entire crop canopy to assess growth.
[0081] Crop distribution characteristics represent objective visual information about crops and their growing environment extracted from the first image. This primarily includes spatial distribution (row spacing, plant spacing, canopy coverage, and the presence of bare soil), physical characteristics (crop color, texture, and height), growth status (uniformity of growth, presence of areas with significant water or fertilizer deficiencies), and vegetation indices (such as NDVI analysis). Complementing the "Operation Type," this is another crucial basis for dynamically dividing ROI regions.
[0082] In this embodiment, a target detection algorithm (such as YOLO or Faster R-CNN) can be used to extract features from the first image to determine the current operation type (spraying, sowing, etc.) and crop distribution characteristics (location, density, morphology, etc.).
[0083] Sub-step S102: Based on the current job type and the crop distribution characteristics, and combining the vertical projection method and the feature point clustering fitting algorithm, dynamically update the ROI region in the first image, and divide the first image into a cropping region and a background region accordingly.
[0084] The ROI region is used to represent a specific part of the first image that is selected for further analysis or processing.
[0085] In practical implementation, based on the current job type and crop distribution characteristics, and combined with the vertical projection method to analyze the grayscale changes along the column direction of the first image, the boundaries and spacing of crop rows can be located to generate an initial ROI region (preliminarily defining the approximate range of the crops). Subsequently, within the initial ROI region, a feature point clustering fitting algorithm can be used to fit the crop row identification lines, and the position and size of the ROI region can be dynamically adjusted according to the crop row identification lines to ensure that the ROI closely matches the actual distribution pattern of the crops. Finally, through the dynamically updated ROI region, the first image is divided into a cropping region and a background region. Thus, by adaptively adjusting the ROI, the efficiency and accuracy of image processing can be improved, while reducing the interference of background noise.
[0086] In this embodiment, based on a preset weighting strategy, corresponding exposure reference weights are assigned to the cropped region and the background region, respectively. Combined with the measured brightness values of each region, the weighted brightness information of the first image is calculated. The image signal processor then adjusts the initial exposure parameters in real time based on the weighted brightness information to ensure that the cropped region receives accurate exposure first. Thus, by adaptively adjusting the ROI, the efficiency and accuracy of image processing can be improved, while reducing background noise interference.
[0087] Based on the foregoing embodiments, a third embodiment of the adaptive exposure method for agricultural drone cameras of the present invention is proposed. In this embodiment, step S30 may include the following sub-steps S301 to S303:
[0088] In sub-step S301, the weighted brightness information is compared with the target brightness value by the image signal processor to determine whether the first image is underexposed or overexposed; wherein the target brightness value is the preset ideal brightness.
[0089] The target brightness value represents the pre-set ideal brightness reference, which guides the ISP to adjust exposure parameters (exposure time, analog gain, digital gain, and ISP internal gain, etc.) to ensure that the cropped area achieves the ideal exposure effect.
[0090] Underexposure state indicates that the weighted brightness information of the first image is lower than the target brightness value.
[0091] Overexposure state indicates that the weighted brightness information of the first image is higher than the target brightness value.
[0092] In this embodiment, the weighted brightness information can be compared with the target brightness value by an image signal processor (ISP) to determine whether the first image is underexposed or overexposed, so as to dynamically adjust the initial exposure parameters and ensure accurate exposure of the cropped area.
[0093] In sub-step S302, if the first image is underexposed, the exposure time is increased to the hardware limit.
[0094] In this embodiment, when it is determined that the first image is underexposed, the exposure time can be increased first until the camera hardware limit is reached.
[0095] In sub-step S303, if the exposure time has reached the hardware limit and is still underexposed, the gain is increased step by step in the priority order of analog gain, digital gain and ISP internal gain until the brightness of the cropped area approaches the target brightness value.
[0096] In this embodiment, if the exposure time has reached the hardware limit but there is still underexposure, the gain can be increased step by step in the order of analog gain (AGain) → digital gain (DGain) → ISP internal gain (ISPgain) until the brightness of the cropped area approaches the target brightness value, ensuring that the exposure of the cropped area meets the standard.
[0097] In addition, if the camera supports a variable aperture, the aperture size is adjusted first instead of the exposure time, following the priority of "aperture → exposure time → gain (analog gain → digital gain → ISP internal gain)"; if the aperture is fixed, the exposure time is adjusted (i.e., see sub-steps S301 to S303 above).
[0098] It should be noted that if the exposure of multiple consecutive frames still fails to meet the standard, a fault tolerance mechanism can be activated, including redrawing the cropped area (ROI), adjusting the exposure reference weight of each area, or resetting the target brightness value to adapt to complex and changing lighting and hardware conditions.
[0099] Furthermore, in one embodiment, after sub-step S301, sub-steps S304 to S305 may also be included:
[0100] Sub-step S304: If the first image is overexposed, the exposure time is shortened to the hardware lower limit.
[0101] In sub-step S305, if the exposure time has reached the hardware lower limit and the image is still overexposed, the gain is gradually reduced in the order of priority of analog gain, digital gain and ISP internal gain until the brightness of the cropped area falls back to the target brightness value.
[0102] In practice, when it is determined that the first image is overexposed, the exposure time can be shortened first until the lower limit of the camera hardware is reached. Then, if the exposure time has reached the lower limit of the hardware and it is still overexposed, the gain can be reduced step by step in the order of analog gain (AGain) → digital gain (DGain) → ISP internal gain (ISPgain) until the brightness of the cropped area falls back to the target brightness value.
[0103] In this embodiment, the image signal processor adjusts the exposure parameters in real time based on the deviation between the weighted brightness information and the target brightness value, prioritizing the adjustment of physical parameters such as exposure time, and adjusting the gain step by step, thereby ensuring that the cropped area receives accurate exposure first, while suppressing background interference to adapt to changes in complex scenes.
[0104] Based on the same inventive concept, the fourth embodiment of this invention also provides an adaptive exposure system for an agricultural drone camera, corresponding to the adaptive exposure method for the agricultural drone camera in the foregoing embodiments. Since the principle of the system in the fourth embodiment of this invention is similar to the adaptive exposure method for the agricultural drone camera in the foregoing embodiments, the implementation of the system can be referred to the implementation of the method, and repeated details will not be elaborated further. Please refer to... Figure 4 The present invention relates to an adaptive exposure system for an agricultural drone camera, the system comprising:
[0105] The segmentation module 10 is used to acquire a first image of a farmland operation scene using initial exposure parameters, and dynamically segment the cropping region and background region of the first image based on a dynamic ROI update mechanism.
[0106] The calculation module 20 is used to assign corresponding exposure reference weights to the cropped area and the background area respectively based on a preset weight allocation strategy, and calculate the weighted brightness information of the first image by combining the measured brightness values of each area.
[0107] The adjustment module 30 is used to adjust the initial exposure parameters in real time based on the weighted brightness information through the image signal processor, so as to ensure that the cropped area is given priority for accurate exposure.
[0108] In addition, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described adaptive exposure method for agricultural drone cameras.
[0109] Figure 5 This is a schematic block diagram of the electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device includes at least one processor 401, a memory 402, at least one network interface 403, and a user interface 405. The various components in the electronic device are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 5 The general will label all buses as bus systems.
[0110] The user interface 405 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.
[0111] It is understood that memory 402 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.
[0112] In this embodiment of the invention, the memory 402 is used to store various types of data to support the operation of the electronic device 400. Examples of this data include: any executable program for operation on the electronic device 400, such as the operating system 4021 and application program 4022; the operating system 4021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 4022 may contain various applications, such as media players, browsers, etc., for implementing various application services. The adaptive exposure method for the agricultural drone camera provided in this embodiment of the invention can be included in the application program 4022.
[0113] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 401 may be a microprocessor or any conventional processor, etc. The steps of the adaptive exposure method for agricultural drone cameras provided in the embodiments of the present invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.
[0114] In an exemplary embodiment, the electronic device 400 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to perform the aforementioned method.
[0115] In summary, the agricultural drone of this invention, when dealing with complex lighting environments, can ensure that the target area is always in the best exposure state by adjusting the exposure parameters in real time through a dynamic weight allocation mechanism. This significantly improves the clarity of image acquisition and lays a high-quality data foundation for subsequent analysis tasks such as intelligent diagnosis of pests and diseases and dynamic monitoring of crop growth.
[0116] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for adaptive exposure of a camera of an agricultural unmanned aerial vehicle, characterized in that, The method comprises: acquiring a first image of a farmland operation scene using initial exposure parameters, and dynamically dividing a cropped region and a background region of the first image based on a dynamic ROI updating mechanism; assigning respective exposure reference weights to the cropped region and the background region based on a preset weight distribution strategy, and calculating weighted brightness information of the first image in combination with measured brightness values of the regions; real-time adjusting the initial exposure parameters by an image signal processor according to the weighted brightness information, to ensure that the cropped region preferentially obtains accurate exposure.
2. The method of claim 1, wherein, The dynamic division of the cropped region and the background region of the first image based on the dynamic ROI updating mechanism comprises: performing feature extraction on the first image by using a target detection algorithm, to determine a current operation type and crop distribution characteristics; dynamically updating an ROI region in the first image according to the current operation type and the crop distribution characteristics, and combining a vertical projection method and a feature point clustering fitting algorithm, and dividing the first image into the cropped region and the background region according to the ROI region.
3. The method of claim 1, wherein, The assignment of respective exposure reference weights to the cropped region and the background region based on the preset weight distribution strategy comprises: differentially assigning weights to the first image according to the preset weight distribution strategy; wherein high exposure reference weights are assigned to the cropped region, low exposure reference weights are assigned to the background region, and the overall weight distribution satisfies a normalization constraint.
4. The method according to claim 1 or 3, characterized in that, The calculation of the weighted brightness information of the first image in combination with the measured brightness values of the regions comprises: respectively calculating the measured brightness values of the cropped region and the background region, and performing weighted calculation according to the respective corresponding exposure reference weights, to obtain the weighted brightness information of the first image.
5. The method of claim 1, wherein, The real-time adjustment of the initial exposure parameters by the image signal processor according to the weighted brightness information, to ensure that the cropped region preferentially obtains accurate exposure, comprises: comparing the weighted brightness information and a target brightness value by the image signal processor, to determine whether the first image is underexposed or overexposed; wherein the target brightness value is a pre-set ideal brightness reference; if the first image is underexposed, preferentially increasing exposure time to a hardware upper limit; if the exposure time has reached the hardware upper limit but is still underexposed, gradually increasing gains in a priority order of an analog gain, a digital gain and an ISP internal gain, until the brightness of the cropped region approaches the target brightness value.
6. The method of claim 5, wherein, The method further comprises: if the first image is overexposed, preferentially shortening the exposure time to a hardware lower limit; if the exposure time has reached the hardware lower limit but is still overexposed, gradually decreasing the gains in the priority order of the analog gain, the digital gain and the ISP internal gain, until the brightness of the cropped region falls back to the target brightness value.
7. An adaptive exposure system for a plant protection unmanned aerial vehicle camera, characterized in that, The system comprises: a division module configured to acquire a first image of a farmland operation scene using initial exposure parameters, and dynamically divide a cropped region and a background region of the first image based on a dynamic ROI updating mechanism; The computing module is configured to assign respective exposure reference weights to the cropped region and the background region based on a preset weight distribution strategy, and to calculate weighted brightness information of the first image based on the respective exposure reference weights and measured brightness values of the regions. The adjusting module is configured to adjust the initial exposure parameter in real time based on the weighted brightness information by an image signal processor, so as to ensure that the cropped region is preferentially exposed accurately.
8. An electronic device, comprising: The electronic device comprises a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so that the processor executes the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program is configured to execute the steps of the method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterised in that, The computer readable storage medium stores a program, and the program is configured to execute the steps of the method according to any one of claims 1 to 6 when executed.