EP4256777A1 - Method and apparatus for calibrating a camera and camera - Google Patents

Method and apparatus for calibrating a camera and camera

Info

Publication number
EP4256777A1
EP4256777A1 EP21802222.6A EP21802222A EP4256777A1 EP 4256777 A1 EP4256777 A1 EP 4256777A1 EP 21802222 A EP21802222 A EP 21802222A EP 4256777 A1 EP4256777 A1 EP 4256777A1
Authority
EP
European Patent Office
Prior art keywords
gain
exposure
new
threshold
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
EP21802222.6A
Other languages
German (de)
French (fr)
Inventor
Andreas Weimer
Farid Khani
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Robert Bosch GmbH
Original Assignee
Robert Bosch GmbH
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Robert Bosch GmbH filed Critical Robert Bosch GmbH
Publication of EP4256777A1 publication Critical patent/EP4256777A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/72Combination of two or more compensation controls

Definitions

  • Most digital cameras have automatic exposure tracking which, depending on the average brightness of the image, either adjusts the amplification, also known as “gain”, or the exposure, also known as “exposure”, of the camera.
  • the mean value of a gray value histogram of the image is calculated.
  • the camera keeps the average gray value in the image within a defined gray value range by means of appropriate parameterization. All color values in the image are used to calculate the histogram, so that the histogram contains all spectral information.
  • a method for calibrating a camera is presented.
  • the procedure has the following steps:
  • Reading in a raw camera image the raw camera image having a plurality of pixels, each pixel having a gray value from a plurality of gray values;
  • This method can be implemented, for example, in software or hardware or in a mixed form of software and hardware, for example in a control unit or a device.
  • the first frequency may represent an upper frequency bound for the first set.
  • the frequency cap can set a value of 0.1 percent. So the new gain can be set if more than or Exactly 0.1 percent of the gray values of the pixels exceed the maximum gray limit in order to ensure better plant detection.
  • a percentage comparison of the second set of gray values above a minimum gray threshold of the pixels having the second frequency can be performed.
  • the second frequency may represent a lower frequency bound for the second set.
  • the lower frequency limit can set a value of 95 percent. This allows the new exposure to be set when less than or equal to 95 percent of the pixel gray values exceed the minimum gray threshold to ensure better crop detection.
  • the maximum gray threshold can be 4000, for example, and/or the minimum gray threshold can be 3000, for example.
  • the values for the maximum gray limit value, minimum gray limit value, the first frequency and/or second frequency can be changed as desired.
  • the method may further comprise a step of comparing in response to the step of adjusting the current gain to the new gain, wherein in the step of comparing the new gain is compared to a gain threshold value, and/or a step of maintaining the new gain if the new gain does not fall below the gain threshold or have a step of setting the new gain to the gain threshold and a step of setting the current exposure to another new exposure if the new gain falls below the gain threshold.
  • the gain threshold may be 1, for example. This prevents the gain from being less than 1.
  • the method may also include a step of comparing in response to the step of adjusting the current exposure to the new exposure, wherein the step of comparing compares the further new exposure to an exposure minimum threshold, and a step of maintaining the further new exposure if the further new exposure does not fall below the minimum exposure threshold or a comprise the step of setting the further new exposure to the minimum exposure threshold if the further new exposure falls below the minimum exposure threshold. In this way it can be ensured that the exposure does not fall below a minimum threshold value.
  • the current exposure may be adjusted down to the further new exposure using a correction factor. In this way, the exposure can be reduced.
  • the method may comprise a step of comparing in response to the step of adjusting the current exposure to the new exposure, wherein in the step of comparing the new exposure is compared to an exposure maximum threshold, and a step of maintaining the new exposure if the new exposure does not exceed the exposure maximum threshold or have a step of setting the new exposure to the exposure maximum threshold and a step of setting the current gain to another new gain if the new exposure exceeds the exposure maximum threshold. It can thus be ensured that a maximum exposure threshold value is not exceeded.
  • the method has a step of comparing in response to the step of adjusting the current gain to the further new gain, wherein in the step of comparing the further new gain is compared with a gain maximum threshold value, and a step of maintaining the further new gain if the further new gain does not exceed the gain maximum threshold or comprises a step of setting the further new gain to the gain maximum threshold if the further new gain exceeds the gain maximum threshold.
  • the current gain may be adjusted up to the further new gain using a correction factor. In this way, the gain can be increased.
  • the method can also have a step of creating a histogram over all gray values of the pixels of the raw camera image and a step of reading out the first set and the second set from the histogram.
  • the creating and reading steps can be performed before the reading step.
  • Such a histogram provides a simple way of providing the first set and second set.
  • the method has a step of capturing the raw camera image using an image sensor that has a plurality of red pixels for sensing the gray values.
  • the red pixels can sense/provide a mixed light signal made up of red light and infrared light. It is advantageous to look at the red pixels, since red color values and gray near-infrared color values reflected by the plants are relevant for plant detection.
  • the current gain may be adjusted downward to the new gain using a correction factor, in particular where the downward correction factor cannot exceed a value of 20%. In this way, the gain can be reduced.
  • the current gain can be adjusted down to the new gain using the correction factor if a third set of pixel gray values above the maximum gray threshold does not exceed a maximum overexposure pixel set, or in a further step of adjusting the current gain using a maximum correction factor down to another new gain if the third set of gray values of the pixels above the maximum gray threshold the exceeds the maximum overexposure pixel amount, where the maximum downward correction factor is greater than the downward correction factor.
  • the maximum correction factor can be lowered in order to bring about a particularly strong reduction in exposure.
  • the maximum downward correction factor can have a value of 2, for example, and/or the downward correction factor can have a value of 1.1.
  • the current exposure may be adjusted upwards to the new exposure using a correction factor, in particular where the upward correction factor cannot exceed a value of 20%. This allows the exposure to be increased.
  • the method may further comprise a step of generating the upward correction factor using the maximum gray threshold, the minimum gray threshold and/or a third frequency of highest gray values in the raw camera image.
  • a correction factor can thus be generated which adjusts the exposure or amplification particularly quickly, for example directly in the next camera image, to a known target value between the maximum gray limit value and the minimum gray limit value.
  • the third frequency of the highest gray values describes a variable of how many percent of the highest gray values in the image should be ignored. This is necessary so that outliers or noise do not lead to incorrect results. With a third highest gray value frequency of, for example, 5%, the top 5% of the highest gray values in the image are ignored.
  • the method according to one embodiment also has a step of receiving a further raw camera image from the camera, wherein the steps of the method are repeated in response to the receiving step using the further raw camera image be performed. This can ensure that multiple camera raw images can be used to calibrate the camera.
  • the additional raw camera image received can be a raw camera image that directly follows the raw camera image or a raw camera image that follows after a defined sequence number.
  • the approach presented here also creates a device that is designed to carry out, control or implement the steps of a variant of a method presented here in corresponding devices.
  • the task on which the approach is based can also be solved quickly and efficiently by this embodiment variant of the approach in the form of a device.
  • the device can have at least one computing unit for processing signals or data, at least one memory unit for storing signals or data, at least one interface to a sensor or an actuator for reading in sensor signals from the sensor or for outputting data or control signals to the Have actuator and / or at least one communication interface for reading or outputting data that are embedded in a communication protocol.
  • the arithmetic unit can be, for example, a signal processor, a microcontroller or the like, with the memory unit being able to be a flash memory, an EEPROM or a magnetic memory unit.
  • the communication interface can be designed to read in or output data wirelessly and/or by wire, wherein a communication interface that can read in or output wire-bound data can, for example, read this data electrically or optically from a corresponding data transmission line or can output it to a corresponding data transmission line.
  • a device can be understood to mean an electrical device that processes sensor signals and, depending on them, controls and/or outputs data signals.
  • the device can have an interface that can be configured as hardware and/or software.
  • the interfaces can be part of a so-called system ASIC, for example, which contains a wide variety of functions of the device.
  • the interfaces can be separate integrated circuits or to consist at least partially of discrete components.
  • the interfaces can be software modules which are present, for example, on a microcontroller alongside other software modules.
  • a camera with the device presented above and an image sensor for capturing the raw camera image is also presented.
  • Such a camera is suitable for plant detection, with overexposure and underexposure advantageously being able to be avoided.
  • FIG. 1 shows a schematic representation of a camera with a device for calibrating the camera and an image sensor according to an embodiment
  • FIG. 2 shows a schematic representation of a histogram over all gray values of the pixels of a raw camera image of a camera according to an embodiment
  • FIG. 3 shows a flowchart of a method for calibrating a camera according to an embodiment
  • FIG. 4 shows a flow chart of a method for calibrating a camera according to an embodiment
  • FIG. 5 shows an application example of a method for calibrating a camera according to an embodiment.
  • the same or similar reference symbols are used for the elements which are shown in the various figures and have a similar effect, with a repeated description of these elements being dispensed with.
  • FIG. 1 shows a schematic representation of a camera 100 with a device 105 for calibrating the camera 100 and an image sensor 110 according to an exemplary embodiment.
  • the image sensor 110 is designed to capture a raw camera image 115 .
  • the device 105 has a reading device 120 , a comparison device 125 and a setting device 130 .
  • the reading device 120 is designed to read in the raw camera image 115, which has a plurality of pixels, each pixel having a gray value from a plurality of gray values.
  • the raw camera image 115 has a plurality of red pixels R as the pixels, each red pixel R having a gray value from the plurality of gray values.
  • the comparison device 125 is designed to compare a first quantity of gray values of the pixels lying above a maximum gray limit value MaT with a first frequency UbP.
  • the setting device 130 is designed to set a current gain 135 of the camera 100 to a new gain 140 when the first quantity exceeds the first frequency UbP.
  • the comparison device 125 is also designed to compare a second set of gray values of the pixels lying above a minimum gray threshold MiT with a second frequency LbP if the first set does not exceed the first frequency UbP.
  • the setting device 130 is designed to maintain the current gain 135 and a current exposure 145 of the camera 100 if the second quantity does not fall below the second frequency LbP.
  • the setting device 130 is designed to set the current exposure 145 to a new exposure 150 if the second quantity falls below the second frequency LbP.
  • the first frequency UbP is a frequency upper limit for the first set. At the second frequency LbP according to this exemplary embodiment, this is a lower frequency limit for the second set.
  • values for the maximum gray limit value MaT, the first frequency UbP, the minimum gray limit value MiT and/or the second frequency LbP are stored in a memory device of the device 105 or can be read in by the device 105 .
  • the device 105 presented here advantageously enables automatic exposure and gain tracking, “AEGC” for short (Automatic Exposure and Gain Control) of a camera 100 in the form of a digital camera for the spectral range that is required for plant detection.
  • AEGC automatic exposure and gain tracking
  • the image sensor 110 specifically the red pixels R, are designed to sense light in the red and near-infrared spectral range.
  • the device 105 presented here enables an AEGC specifically required for plant detection on agricultural land. In this case, the exposure is increased by the device 105 with priority over the gain, or the gain is always reduced with priority over the exposure. Thus, the noise in the picture is always kept to a minimum.
  • Another possible exposure tracking which could be based on a mean value of a gray value histogram, is not suitable for plant detection for two reasons:
  • the image sensor 110 is a normal RGB color camera in which an IR cut filter is removed and replaced by a dual band filter for transmitting red light and near-infrared light, “NIR” for short, and/or a green cut filter for blocking green light and/or a blue cut filter to block blue light was replaced. Since each pixel on the RGB camera chip is almost equally sensitive in the infrared, an RGB camera becomes an “R+NIR, NIR, NIR” camera. The information R+NIR is therefore located in the red pixel R of the camera 100 . As a result, these pixels are always brighter than all other pixels. According to this exemplary embodiment, therefore, only the red pixels R are relevant for the exposure correction.
  • the device 105 presented here creates a suitable AEGC that is not only tailored to a new camera architecture, but is also specifically suitable for the environmental conditions given for plant detection in the field. Under no circumstances should plant objects be overexposed or underexposed, even if they only take up a fraction of the area in the picture, often in the per thousand range.
  • the image sensor 110 supplies raw camera images 115 in a 12-bit raw format. This is a gray value image in which a Bayer pattern is encoded as a gray value. Each pixel in this image represents a color value.
  • device 105 in response to the reading in of raw camera image 115 via reading device 120 , device 105 generates a histogram from raw camera image 115 for all gray values of all red pixels R of raw camera image 115 . Such a histogram is shown in FIG.
  • FIG. 2 shows a schematic representation of a histogram 200 over all gray values R+NIR of the pixels of a raw camera image of a camera according to a example. This can be the raw camera image described in FIG. 1 .
  • the histogram 200 shows all gray values R+NIR of the red pixels of the raw camera image.
  • a maximum gray value that may occur, in the form of the maximum gray value MaT The gray values R+NIR must not exceed this value.
  • a minimum gray value that may occur, in the form of the minimum gray value MiT The gray values R+NIR must at least reach this limit.
  • Percentage permitted number of gray values in the form of the first frequency UbP Percentage % of the pixels may exceed the MaT limit.
  • a minimum percentage of gray values required in the form of the second frequency LbP This percentage % of the pixels must at least exceed the second frequency LbP/minimum gray threshold value MiT.
  • the first frequency UbP always has priority over the second frequency LbP.
  • the camera always regulates down first when the first frequency UbP is reached.
  • the device regulates the exposure or gain up until approx. 0.1% of the pixels in the image have reached the gray value 4000 or at least 95% of the pixels have reached the gray value 3000 occupies the largest area in the picture, this AEGC is always inclined to regulate the picture up so that the 95% >3000 is reached. This happens until 0.1% of the pixels have reached the gray value 4000.
  • the first frequency UbP always has priority over the second frequency LbP, it is regulated down immediately. Next the device wants to get back to 95% at 3000 and ramps up again. This leads to the tracking oscillating between the maximum gray limit value MaT and the minimum gray limit value MiT.
  • the device corrects the exposure according to one embodiment only in small steps.
  • two further control parameters are stored for this purpose, which are described in more detail in FIG. 3: an upward correction factor, a downward correction factor
  • the exposure or gain is corrected downwards or upwards by this value. According to one exemplary embodiment, this value is not more than 20%.
  • two parameters are stored or applicable that define the minimum or maximum permissible exposure of the camera, and/or according to one embodiment, a parameter is stored or applicable that defines the maximum permissible gain: a maximum permissible exposure in a minimum allowable exposure in the form of a minimum exposure threshold a maximum allowable gain in the form of a maximum gain threshold
  • a further parameter “Repeat” defines whether the AEGC described here and presented here is used in every raw camera image, or alternatively in every xth raw camera image.
  • the method described which can be carried out by the device, can be used for the tracking of the images in the case of plant detection, in order, for example, to enable selective application of herbicides.
  • FIG. 3 shows a flowchart of a method 300 for calibrating a camera according to an embodiment. This can be a method 300 that can be carried out or controlled by the device described in FIG. 1 or 2 .
  • the method 300 comprises a step 305 of reading, a step 315 of comparing a first set, a step 320 of setting a current gain, a step 325 of comparing a second set, a step 330 of maintaining and a step 335 of setting the current exposure up.
  • step 305 of reading in a raw camera image is read in from the camera, the raw camera image having a plurality of pixels, each pixel having a gray value from a plurality of gray values.
  • step 315 of comparison a first set of gray values of the pixels that are above a maximum gray threshold value are compared with a first frequency.
  • step 320 of adjusting a current gain of the camera is adjusted to a new gain when the first amount exceeds the first frequency.
  • step 325 of comparing a second set of gray values of pixels above a minimum gray threshold is compared at a second frequency if the first set does not exceed the first frequency.
  • step 330 of maintaining the current gain and a current exposure of the camera are maintained if the second amount is not less than the second frequency.
  • step 225 of setting the current exposure set to a new exposure when the second amount is less than the second frequency.
  • step 320 of adjusting the current gain is adjusted to the new gain using a downward correction factor, wherein according to this exemplary embodiment, the downward correction factor does not exceed a value of 20%.
  • the new gain is calculated by dividing the current gain down by the correction factor.
  • step 335 of adjusting the current exposure is adjusted to the new exposure using an upward correction factor, which according to this exemplary embodiment, the upward correction factor does not exceed a value of 20%.
  • the new exposure is calculated by multiplying the current exposure down by the correction factor.
  • the method 300 also has a step 340 of comparing, a step 345 of retaining, a step 350 of setting, a step 355 of setting, a step 360 of comparing, a step 365 of retaining, a step 370 of setting, a step 375 of comparing, a step 380 of keeping, a step 385 of setting, a step 390 of setting, a step 392 of comparing, a step 395 of keeping, a step 396 of setting, a step 397 of making, a step 398 of detecting and/or a step 399 of receiving.
  • the comparing step 340 is performed in response to the adjusting the current gain to the new gain step 320, wherein the comparing step 340 compares the new gain to a gain threshold and/or the maintaining step 345 maintaining the new gain , if the new gain does not fall below the gain threshold value, or in step 350 of setting the new gain is set to the gain threshold value and in step 355 of setting the current exposure to a further new one Exposure adjusted when the new gain falls below the gain threshold.
  • the new gain is compared to the gain threshold, which is equal to one.
  • step 350 of setting the downward correction factor is also reset by dividing the value 1 by the new gain in order to obtain a new downward correction factor.
  • the comparing step 360 is performed in response to the setting the current exposure to the new exposure step 355, wherein the comparing step 360 compares the further new exposure to a minimum exposure threshold and the maintaining step 365 maintains the further new exposure , if the further new exposure does not fall below the exposure minimum threshold value, or in step 370 of setting the further new exposure is set to the exposure minimum threshold value if the further new exposure falls below the exposure minimum threshold value.
  • step 355 of adjusting the current exposure to the new exposure the current exposure is reduced down to the further new exposure using a correction factor.
  • the new exposure is calculated by dividing the current exposure down by the new correction factor.
  • the comparing step 375 is performed in response to the setting the current exposure to the new exposure step 335, wherein the comparing step 375 compares the new exposure to a maximum exposure threshold and the maintaining step 380 maintaining the new exposure if the new exposure does not exceed the maximum exposure threshold, or in the setting step 385 the new exposure is set to the maximum exposure threshold and in the setting step 390 the current gain is set to one further new gain set if the new exposure exceeds the maximum exposure threshold.
  • step 385 of setting the correction factor is also reset upwards by dividing the new exposure by the maximum exposure threshold value to obtain a new upward correction factor.
  • step 390 of adjusting the current gain is adjusted up to the further new gain using the new correction factor.
  • the comparing step 392 is performed in response to the step 390 of setting the current gain to the further new gain, wherein in the comparing step 392 the further new gain is compared to a gain maximum threshold and in the maintaining step 395 the further new gain is retained if the further new gain does not exceed the gain maximum threshold value or in step 396 of setting the further new gain is set to the gain maximum threshold value if the further new gain exceeds the gain maximum threshold value.
  • step 397 of creating a histogram is created for all gray values of the pixels of the raw camera image, and in a reading step, the first set and the second set are read out of the histogram.
  • steps 397 of creating and reading out are carried out before or in response to step 305 of reading in.
  • step 398 of capturing the raw camera image is captured using an image sensor that has a plurality of red pixels for sensing the gray values.
  • step 398 of detecting is carried out before step 305 of reading in.
  • steps 330, 365, 370, 380, 395 and/or 396 each lead to an end E of the method 300.
  • the method 300 also has, after the end E of the method 300, the step 399 of receiving, in which a further raw camera image is received by the camera, with the steps 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398 of the method 300 can be repeatedly performed in response to the step 399 of receiving using the further raw camera image.
  • the further raw camera image received in step 399 of receiving is a raw camera image that follows the raw camera image directly, or a raw camera image that follows after a defined number of sequences.
  • FIG. 4 shows a flowchart of a method 300 for calibrating a camera according to an embodiment. This can be the method 300 described in FIG. 3, which has additional steps 400, 405, 410, 415, 420, 425 according to this exemplary embodiment.
  • step 400 of generating the upward correction factor is generated using the maximum gray threshold value, the minimum gray threshold value and/or a third frequency of highest gray values in the raw camera image.
  • step 400 of generation is carried out between step 325 of comparison and step 335 of setting if, in step 325 of comparison, the second quantity falls below the second frequency.
  • step 400 of generation the upward correction factor, “CfU” for short, is generated according to this exemplary embodiment using the following formula:
  • the response time of the control is significantly reduced by steps 400, 405, 410, 415, 420, 425.
  • the previous controller in FIG. 3 was adjusted upwards and downwards via the fixed correction factors.
  • the exposure or amplification of the In the following image it is reduced by the correction factor, or "CfD" for short, or increased by the factor CfU.
  • CfD correction factor
  • the control can need up to 10 to 20 images, especially when there is a change in sun/clouds, typically a factor of 10 in brightness, in order to arrive at the correct brightness value.
  • an algorithm automatically calculates the correction value CfU and sets the exposure or amplification to the target value immediately in the following image. This is possible because the algorithm knows the target value between the minimum gray limit value, "MiT” for short, and the maximum gray limit value, "MaT” for short, and the actual value, calculated from the current image.
  • step 320 of adjusting the current gain is adjusted down to the new gain using the correction factor if a third set of gray values of the pixels above the maximum gray threshold value
  • the current amplification is reduced to a further new amplification using a maximum correction factor set when the third set of gray values of pixels above the maximum gray threshold exceeds the maximum overexposure pixel set, where the maximum down correction factor is greater than the down correction factor.
  • the maximum downward correction factor is also abbreviated as "CfDmax" in the following.
  • step 410 of recognition is carried out, in which it is recognized whether the third quantity of gray values of the pixels lying above the maximum gray threshold value exceeds the maximum overexposure pixel quantity or not .
  • step 415 of comparing is carried out according to this exemplary embodiment, in which another new gain is compared with a gain threshold value, step 345 of maintaining the other new gain is carried out if the other new gain does not fall below the gain threshold value or the step 420 of setting the other new gain to the gain threshold and the step 425 of setting the current exposure to another new exposure if the other new gain falls below the gain threshold.
  • step 415 of comparing the other new gain is compared to the gain threshold, which is equal to one.
  • step 420 of setting the maximum correction factor is also reset downwards by dividing the value 1 by the other new gain to obtain a new maximum downward correction factor.
  • the step 360 of comparing is performed in response to the step 425 of adjusting the current exposure to the other new exposure
  • FIG. 5 shows an application example of a method for calibrating a camera according to an embodiment. This can be the method 300 described in FIG. 4 .
  • gray values for the pixels below MiT are adjusted upwards CfU into the range between MiT and MaT using the correction factors individually calculated for them in the generation step.
  • gray values for a quantity of undefined overexposed pixels 500 above MaT are regulated down with either the CfDmax or the CfD depending on the quantity.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The invention relates to a method for calibrating a camera (100), comprising reading in a camera raw image (115), the camera raw image (115) having a plurality of pixels, each pixel having a grey value consisting of a plurality of grey values. A first amount of grey values of the pixels above a maximum grey threshold value (MaT) is compared to a first frequency (UbP). A current gain (135) of the camera (100) is adjusted to a new gain (140) if the first amount exceeds the first frequency (UbP). A second amount of grey values of the pixels above a minimum grey threshold value (MiT) is compared to a second frequency (LbP) if the first amount does not exceed the first frequency (UbP). The current gain (135) and a current exposure (145) of the camera (100) are maintained if the second amount does not fall below the second frequency (LbP). The current exposure (145) is adjusted to a new exposure (150) if the second amount falls below the second frequency (LbP).

Description

Beschreibung description
Titel title
Verfahren und Vorrichtung zum Kalibrieren einer Kamera und Kamera Method and device for calibrating a camera and camera
Stand der Technik State of the art
Der Ansatz geht von einer Vorrichtung oder einem Verfahren nach Gattung der unabhängigen Ansprüche aus. The approach is based on a device or a method according to the species of the independent claims.
Die meisten digitalen Kameras besitzen eine automatische Belichtungsnachführung die je nach der mittleren Helligkeit des Bildes wahlweise die Verstärkung, auch englisch „Gain“ genannt, oder die Belichtung, auch englisch „Exposure“ genannt, der Kamera nachführt. Hierbei wird der Mittelwert eines Grauwerthistogramms der Bilds berechnet. Durch entsprechende Parametrisierung hält die Kamera den mittleren Grauwert im Bild in einem definierten Grauwertbereich. Für die Berechnung des Histogramms werden alle Farbwerte im Bild genutzt, so dass das Histogramm die gesamte spektrale Information beinhaltet. Most digital cameras have automatic exposure tracking which, depending on the average brightness of the image, either adjusts the amplification, also known as “gain”, or the exposure, also known as “exposure”, of the camera. Here, the mean value of a gray value histogram of the image is calculated. The camera keeps the average gray value in the image within a defined gray value range by means of appropriate parameterization. All color values in the image are used to calculate the histogram, so that the histogram contains all spectral information.
Offenbarung der Erfindung Disclosure of Invention
Vor diesem Hintergrund werden mit dem hier vorgestellten Ansatz ein Verfahren zum Kalibrieren einer Kamera, weiterhin eine Vorrichtung, die dieses Verfahren verwendet, sowie schließlich eine Kamera gemäß den Hauptansprüchen vorgestellt. Durch die in den abhängigen Ansprüchen aufgeführten Maßnahmen sind vorteilhafte Weiterbildungen und Verbesserungen der im unabhängigen Anspruch angegebenen Vorrichtung möglich. Against this background, a method for calibrating a camera, a device that uses this method, and finally a camera according to the main claims are presented with the approach presented here. Advantageous developments and improvements of the device specified in the independent claim are possible as a result of the measures listed in the dependent claims.
Die mit dem vorgestellten Ansatz erreichbaren Vorteile bestehen darin, dass eine Möglichkeit zur Kalibrierung einer Kamera geschaffen wird, die besonders vorteilhaft für die Pflanzendetektion ist. Hierbei können vorteilhafterweise eine Überbelichtung und Unterbelichtung vermieden werden. The advantages that can be achieved with the approach presented are that a possibility for calibrating a camera is created which is particularly is advantageous for plant detection. Overexposure and underexposure can advantageously be avoided here.
Es wird ein Verfahren zum Kalibrieren einer Kamera vorgestellt. Das Verfahren weist die folgenden Schritte auf: A method for calibrating a camera is presented. The procedure has the following steps:
Einlesen eines Kamerarohbilds, wobei das Kamerarohbild eine Mehrzahl von Pixeln aufweist, wobei jedes Pixel einen Grauwert aus einer Mehrzahl von Grauwerten aufweist; Reading in a raw camera image, the raw camera image having a plurality of pixels, each pixel having a gray value from a plurality of gray values;
Vergleichen einer ersten Menge von über einem Maximalgraugrenzwert liegenden Grauwerten der Pixel mit einer ersten Häufigkeit; comparing a first set of gray values of the pixels above a maximum gray threshold at a first frequency;
Einstellen einer aktuellen Verstärkung der Kamera auf eine neue Verstärkung, wenn die erste Menge die erste Häufigkeit überschreitet; adjusting a current gain of the camera to a new gain when the first amount exceeds the first frequency;
Vergleichen einer zweiten Menge von über einem Minimalgraugrenzwert liegenden Grauwerten der Pixel mit einer zweiten Häufigkeit, wenn die erste Menge die erste Häufigkeit nicht überschreitet; comparing a second set of gray values of the pixels above a minimum gray threshold at a second frequency if the first set does not exceed the first frequency;
Beibehalten der aktuellen Verstärkung und einer aktuellen Belichtung der Kamera, wenn die zweite Menge die zweite Häufigkeit nicht unterschreitet; und maintaining the camera's current gain and a current exposure if the second amount is not less than the second frequency; and
Einstellen der aktuellen Belichtung auf eine neue Belichtung, wenn die zweite Menge die zweite Häufigkeit unterschreitet. Adjusting the current exposure to a new exposure when the second amount is less than the second frequency.
Dieses Verfahren kann beispielsweise in Software oder Hardware oder in einer Mischform aus Software und Hardware beispielsweise in einem Steuergerät oder einer Vorrichtung implementiert sein. This method can be implemented, for example, in software or hardware or in a mixed form of software and hardware, for example in a control unit or a device.
Im Schritt des Vergleichens der ersten Menge mit der ersten Häufigkeit kann ein prozentualer Vergleich durchgeführt werden. Beispielsweise kann die erste Häufigkeit eine Häufigkeitsobergrenze für die erste Menge repräsentieren. Die Häufigkeitsobergrenze kann beispielsweise einen Wert von 0,1 Prozent festlegen. So kann die neue Verstärkung eingestellt werden, wenn mehr als oder genau 0,1 Prozent der Grauwerte der Pixel den Maximalgraugrenzwert überschreiten, um eine bessere Pflanzendetektion zu gewährleisten. Andernfalls kann ein prozentualer Vergleich der zweiten Menge von über einem Minimalgraugrenzwert liegenden Grauwerten der Pixel mit der zweiten Häufigkeit durchgeführt werden. Die zweite Häufigkeit kann eine Häufigkeitsuntergrenze für die zweite Menge repräsentieren. Die Häufigkeitsuntergrenze kann beispielsweise einen Wert von 95 Prozent festlegen. So kann die neue Belichtung eingestellt werden, wenn weniger als oder genau 95 Prozent der Grauwerte der Pixel den Minimalgraugrenzwert überschreiten, um eine bessere Pflanzendetektion zu gewährleisten. Andernfalls werden die aktuelle Verstärkung und die aktuelle Belichtung beibehalten. Der Maximalgraugrenzwert kann beispielsweise bei 4000 liegen und/oder der Minimalgraugrenzwert kann beispielsweise bei 3000 liegen. Die Werte für den Maximalgraugrenzwert, Minimalgraugrenzwert, die erste Häufigkeit und/oder zweite Häufigkeit können beliebig abänderbar sein. In the step of comparing the first quantity to the first frequency, a percentage comparison can be performed. For example, the first frequency may represent an upper frequency bound for the first set. For example, the frequency cap can set a value of 0.1 percent. So the new gain can be set if more than or Exactly 0.1 percent of the gray values of the pixels exceed the maximum gray limit in order to ensure better plant detection. Otherwise, a percentage comparison of the second set of gray values above a minimum gray threshold of the pixels having the second frequency can be performed. The second frequency may represent a lower frequency bound for the second set. For example, the lower frequency limit can set a value of 95 percent. This allows the new exposure to be set when less than or equal to 95 percent of the pixel gray values exceed the minimum gray threshold to ensure better crop detection. Otherwise, the current gain and exposure are retained. The maximum gray threshold can be 4000, for example, and/or the minimum gray threshold can be 3000, for example. The values for the maximum gray limit value, minimum gray limit value, the first frequency and/or second frequency can be changed as desired.
Das Verfahren kann ferner gemäß einer Ausführungsform einen Schritt des Vergleichens ansprechend auf den Schritt des Einstellens der aktuellen Verstärkung auf die neue Verstärkung aufweisen, wobei im Schritt des Vergleichens die neue Verstärkung mit einem Verstärkungsschwellenwert verglichen wird, und/oder einen Schritt Beibehaltens der neuen Verstärkung aufweisen, wenn die neue Verstärkung den Verstärkungsschwellenwert nicht unterschreitet oder einen Schritt des Setzens der neuen Verstärkung auf den Verstärkungsschwellenwert und einen Schritt des Einstellens der aktuellen Belichtung auf eine weitere neue Belichtung aufweisen, wenn die neue Verstärkung den Verstärkungsschwellenwert unterschreitet. Der Verstärkungsschwellenwert kann beispielsweise bei 1 liegen. So kann verhindert werden, dass die Verstärkung kleiner als 1 wird. According to one embodiment, the method may further comprise a step of comparing in response to the step of adjusting the current gain to the new gain, wherein in the step of comparing the new gain is compared to a gain threshold value, and/or a step of maintaining the new gain if the new gain does not fall below the gain threshold or have a step of setting the new gain to the gain threshold and a step of setting the current exposure to another new exposure if the new gain falls below the gain threshold. The gain threshold may be 1, for example. This prevents the gain from being less than 1.
Das Verfahren kann auch einen Schritt des Vergleichens ansprechend auf den Schritt des Einstellens der aktuellen Belichtung auf die neue Belichtung aufweisen, wobei im Schritt des Vergleichens die weitere neue Belichtung mit einem Belichtungsminimalschwellenwert verglichen wird, und einen Schritt des Beibehaltens der weiteren neuen Belichtung aufweisen, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert nicht unterschreitet oder einen Schritt des Setzens der weiteren neuen Belichtung auf den Belichtungsminimalschwellenwert aufweisen, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert unterschreitet. So kann sichergestellt werden, dass ein Belichtungsminimalschwellenwert nicht unterschritten wird. The method may also include a step of comparing in response to the step of adjusting the current exposure to the new exposure, wherein the step of comparing compares the further new exposure to an exposure minimum threshold, and a step of maintaining the further new exposure if the further new exposure does not fall below the minimum exposure threshold or a comprise the step of setting the further new exposure to the minimum exposure threshold if the further new exposure falls below the minimum exposure threshold. In this way it can be ensured that the exposure does not fall below a minimum threshold value.
Im Schritt des Einstellens der aktuellen Belichtung auf die neue Belichtung kann die aktuelle Belichtung unter Verwendung eines Korrekturfaktors nach unten auf die weitere neue Belichtung eingestellt werden. So kann die Belichtung reduziert werden. In the step of adjusting the current exposure to the new exposure, the current exposure may be adjusted down to the further new exposure using a correction factor. In this way, the exposure can be reduced.
Gemäß einer Ausführungsform kann das Verfahren einen Schritt des Vergleichens ansprechend auf den Schritt des Einstellens der aktuellen Belichtung auf die neue Belichtung aufweisen, wobei im Schritt des Vergleichens die neue Belichtung mit einem Belichtungsmaximalschwellenwert verglichen wird, und einen Schritt des Beibehaltens der neuen Belichtung aufweisen, wenn die neue Belichtung den Belichtungsmaximalschwellenwert nicht überschreitet oder einen Schritt des Setzens der neuen Belichtung auf den Belichtungsmaximalschwellenwert aufweisen und einen Schritt des Einstellens der aktuellen Verstärkung auf eine weitere neue Verstärkung aufweisen, wenn die neue Belichtung den Belichtungsmaximalschwellenwert überschreitet. So kann sichergestellt werden, dass ein Belichtungsmaximalschwellenwert nicht überschritten wird. According to one embodiment, the method may comprise a step of comparing in response to the step of adjusting the current exposure to the new exposure, wherein in the step of comparing the new exposure is compared to an exposure maximum threshold, and a step of maintaining the new exposure if the new exposure does not exceed the exposure maximum threshold or have a step of setting the new exposure to the exposure maximum threshold and a step of setting the current gain to another new gain if the new exposure exceeds the exposure maximum threshold. It can thus be ensured that a maximum exposure threshold value is not exceeded.
Es ist weiterhin von Vorteil, wenn das Verfahren einen Schritt des Vergleichens ansprechend auf den Schritt des Einstellens der aktuellen Verstärkung auf die weitere neue Verstärkung aufweist, wobei im Schritt des Vergleichens die weitere neue Verstärkung mit einem Verstärkungsmaximalschwellenwert verglichen wird, und einen Schritt des Beibehaltens der weiteren neue Verstärkung aufweist, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert nicht überschreitet oder einen Schritt des Setzens der weiteren neue Verstärkung auf den Verstärkungsmaximalschwellenwert aufweist, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert überschreitet. So kann sichergestellt werden, dass die Verstärkung einen Verstärkungsmaximalschwellenwert nicht überschreitet. Beispielsweise kann im Schritt des Einstellens der aktuellen Verstärkung auf die weitere neue Verstärkung die aktuelle Verstärkung unter Verwendung eines Korrekturfaktors nach oben auf die weitere neue Verstärkung eingestellt werden. So kann die Verstärkung erhöht werden. It is further advantageous if the method has a step of comparing in response to the step of adjusting the current gain to the further new gain, wherein in the step of comparing the further new gain is compared with a gain maximum threshold value, and a step of maintaining the further new gain if the further new gain does not exceed the gain maximum threshold or comprises a step of setting the further new gain to the gain maximum threshold if the further new gain exceeds the gain maximum threshold. In this way it can be ensured that the gain does not exceed a gain maximum threshold value. For example, in the step of adjusting the current gain to the further new gain, the current gain may be adjusted up to the further new gain using a correction factor. In this way, the gain can be increased.
Gemäß einer Ausführungsform kann das Verfahren auch einen Schritt des Erstellens eines Histogramms über alle Grauwerte der Pixel des Kamerarohbilds und einen Schritt des Auslesens der ersten Menge und der zweiten Menge aus dem Histogramm aufweisen. Die Schritte des Erstellens und Auslesens können vor dem Schritt des Einlesens durchgeführt werden. Ein solches Histogramm bietet eine einfache Möglichkeit zur Bereitstellung der ersten Menge und zweiten Menge. According to one embodiment, the method can also have a step of creating a histogram over all gray values of the pixels of the raw camera image and a step of reading out the first set and the second set from the histogram. The creating and reading steps can be performed before the reading step. Such a histogram provides a simple way of providing the first set and second set.
Es ist weiterhin von Vorteil, wenn das Verfahren einen Schritt des Erfassens des Kamerarohbilds unter Verwendung eines Bildsensors aufweist, der eine Mehrzahl von Rotpixeln zum Sensieren der Grauwerte aufweist. Die Rotpixel können ein Mischlichtsignal aus rotem Licht und Infrarotlicht sensieren/bereitstellen. Eine Betrachtung der Rotpixel ist von Vorteil, da für die Pflanzendetektion von den Pflanzen reflektierte rote Farbwerte und graue Nahinfrarotfarbwerte relevant sind. It is also advantageous if the method has a step of capturing the raw camera image using an image sensor that has a plurality of red pixels for sensing the gray values. The red pixels can sense/provide a mixed light signal made up of red light and infrared light. It is advantageous to look at the red pixels, since red color values and gray near-infrared color values reflected by the plants are relevant for plant detection.
Im Schritt des Einstellens der aktuellen Verstärkung auf die neue Verstärkung kann die aktuelle Verstärkung unter Verwendung eines Korrekturfaktors nach unten auf die neuen Verstärkung eingestellt werden, insbesondere wobei der Korrekturfaktor nach unten einen Wert von 20% nicht übersteigen kann. So kann die Verstärkung reduziert werden. In the step of adjusting the current gain to the new gain, the current gain may be adjusted downward to the new gain using a correction factor, in particular where the downward correction factor cannot exceed a value of 20%. In this way, the gain can be reduced.
Im Schritt des Einstellens kann die aktuelle Verstärkung unter Verwendung des Korrekturfaktors nach unten auf die neue Verstärkung eingestellt werden, wenn eine dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel eine Maximalüberbelichtungspixelmenge nicht überschreitet oder in einem weiteren Schritt des Einstellens die aktuelle Verstärkung unter Verwendung eines Maximalkorrekturfaktors nach unten auf eine andere neue Verstärkung eingestellt werden, wenn die dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel die Maximalüberbelichtungspixelmenge überschreitet, wobei der Maximalkorrekturfaktor nach unten größer ist als der Korrekturfaktor nach unten. In the adjustment step, the current gain can be adjusted down to the new gain using the correction factor if a third set of pixel gray values above the maximum gray threshold does not exceed a maximum overexposure pixel set, or in a further step of adjusting the current gain using a maximum correction factor down to another new gain if the third set of gray values of the pixels above the maximum gray threshold the exceeds the maximum overexposure pixel amount, where the maximum downward correction factor is greater than the downward correction factor.
So kann bei einer besonders hohen Anzahl überbelichteter Pixel der Maximalkorrekturfaktor nach unten gewählt werden, um ein besonders starkes Herabregeln der Belichtung zu bewirken. Der Maximalkorrekturfaktor nach unten kann beispielsweise einen Wert von 2 und/oder der Korrekturfaktor nach unten einen Wert von 1,1 aufweisen. In the case of a particularly high number of overexposed pixels, the maximum correction factor can be lowered in order to bring about a particularly strong reduction in exposure. The maximum downward correction factor can have a value of 2, for example, and/or the downward correction factor can have a value of 1.1.
Im Schritt des Einstellens der aktuellen Belichtung auf die neue Belichtung kann die aktuelle Belichtung unter Verwendung eines Korrekturfaktors nach oben auf die neue Belichtung eingestellt werden, insbesondere wobei der Korrekturfaktor nach oben einen Wert von 20% nicht übersteigen kann. So kann die Belichtung erhöht werden. In the step of adjusting the current exposure to the new exposure, the current exposure may be adjusted upwards to the new exposure using a correction factor, in particular where the upward correction factor cannot exceed a value of 20%. This allows the exposure to be increased.
Gemäß einer Ausführungsform kann das Verfahren ferner einen Schritt des Generierens des Korrekturfaktors nach oben unter Verwendung des Maximalgraugrenzwerts, des Minimalgraugrenzwerts und/oder einer dritten Häufigkeit höchster Grauwerte im Kamerarohbilds aufweisen. According to an embodiment, the method may further comprise a step of generating the upward correction factor using the maximum gray threshold, the minimum gray threshold and/or a third frequency of highest gray values in the raw camera image.
So kann ein Korrekturfaktor generiert werden, der die Belichtung oder Verstärkung besonders schnell, beispielsweise direkt im nächsten Kamerabild, auf einen bekannten Zielwert zwischen dem Maximalgraugrenzwert und dem Minimalgraugrenzwerts einstellt. Die dritte Häufigkeit höchster Grauwerte beschreibt hierbei eine Variable wieviel Prozent von den höchsten Grauwerten im Bild ignoriert werden sollen. Dies ist notwendig, damit Ausreißer oder Rauschen nicht zu falschen Ergebnissen führen. Bei einer dritten Häufigkeit höchster Grauwerte von beispielweise 5% werden die obersten 5% der höchsten Grauwerte im Bild ignoriert. A correction factor can thus be generated which adjusts the exposure or amplification particularly quickly, for example directly in the next camera image, to a known target value between the maximum gray limit value and the minimum gray limit value. The third frequency of the highest gray values describes a variable of how many percent of the highest gray values in the image should be ignored. This is necessary so that outliers or noise do not lead to incorrect results. With a third highest gray value frequency of, for example, 5%, the top 5% of the highest gray values in the image are ignored.
Es ist weiterhin von Vorteil, wenn das Verfahren gemäß einer Ausführungsform ferner einen Schritt des Empfangens eines weiteren Kamerarohbilds von der Kamera aufweist, wobei die Schritte des Verfahrens ansprechend auf den Schritt des Empfangens unter Verwendung des weiteren Kamerarohbilds wiederholt durchgeführt werden. Dies kann sicherstellen, dass mehrere Kamerarohbilder zur Kalibrierung der Kamera verwendet werden können. It is furthermore advantageous if the method according to one embodiment also has a step of receiving a further raw camera image from the camera, wherein the steps of the method are repeated in response to the receiving step using the further raw camera image be performed. This can ensure that multiple camera raw images can be used to calibrate the camera.
Im Schritt des Empfangens kann das empfangene weitere Kamerarohbild ein auf das Kamerarohbild direkt folgendes Folgekamerarohbild der Kamera oder ein nach einer definierten Folgezahl folgendes Folgekamerarohbild der Kamera sein. So kann jedes oder zur Reduzierung von Rechenleistung nur jedes x-te Kamerarohbild, beispielsweise jedes fünfte Kamerarohbild, zur Kalibrierung der Kamera verwendet werden. In the receiving step, the additional raw camera image received can be a raw camera image that directly follows the raw camera image or a raw camera image that follows after a defined sequence number. Thus, each raw camera image or, to reduce computing power, only every xth raw camera image, for example every fifth raw camera image, can be used to calibrate the camera.
Der hier vorgestellte Ansatz schafft ferner eine Vorrichtung, die ausgebildet ist, um die Schritte einer Variante eines hier vorgestellten Verfahrens in entsprechenden Einrichtungen durchzuführen, anzusteuern bzw. umzusetzen. Auch durch diese Ausführungsvariante des Ansatzes in Form einer Vorrichtung kann die dem Ansatz zugrunde liegende Aufgabe schnell und effizient gelöst werden. The approach presented here also creates a device that is designed to carry out, control or implement the steps of a variant of a method presented here in corresponding devices. The task on which the approach is based can also be solved quickly and efficiently by this embodiment variant of the approach in the form of a device.
Hierzu kann die Vorrichtung zumindest eine Recheneinheit zum Verarbeiten von Signalen oder Daten, zumindest eine Speichereinheit zum Speichern von Signalen oder Daten, zumindest eine Schnittstelle zu einem Sensor oder einem Aktor zum Einlesen von Sensorsignalen von dem Sensor oder zum Ausgeben von Daten- oder Steuersignalen an den Aktor und/oder zumindest eine Kommunikationsschnittstelle zum Einlesen oder Ausgeben von Daten aufweisen, die in ein Kommunikationsprotokoll eingebettet sind. Die Recheneinheit kann beispielsweise ein Signalprozessor, ein Mikrocontroller oder dergleichen sein, wobei die Speichereinheit ein Flash-Speicher, ein EEPROM oder eine magnetische Speichereinheit sein kann. Die Kommunikationsschnittstelle kann ausgebildet sein, um Daten drahtlos und/oder leitungsgebunden einzulesen oder auszugeben, wobei eine Kommunikationsschnittstelle, die leitungsgebundene Daten einlesen oder ausgeben kann, diese Daten beispielsweise elektrisch oder optisch aus einer entsprechenden Datenübertragungsleitung einlesen oder in eine entsprechende Datenübertragungsleitung ausgeben kann. For this purpose, the device can have at least one computing unit for processing signals or data, at least one memory unit for storing signals or data, at least one interface to a sensor or an actuator for reading in sensor signals from the sensor or for outputting data or control signals to the Have actuator and / or at least one communication interface for reading or outputting data that are embedded in a communication protocol. The arithmetic unit can be, for example, a signal processor, a microcontroller or the like, with the memory unit being able to be a flash memory, an EEPROM or a magnetic memory unit. The communication interface can be designed to read in or output data wirelessly and/or by wire, wherein a communication interface that can read in or output wire-bound data can, for example, read this data electrically or optically from a corresponding data transmission line or can output it to a corresponding data transmission line.
Unter einer Vorrichtung kann vorliegend ein elektrisches Gerät verstanden werden, das Sensorsignale verarbeitet und in Abhängigkeit davon Steuer- und/oder Datensignale ausgibt. Die Vorrichtung kann eine Schnittstelle aufweisen, die hard- und/oder softwaremäßig ausgebildet sein kann. Bei einer hardwaremäßigen Ausbildung können die Schnittstellen beispielsweise Teil eines sogenannten System-ASICs sein, der verschiedenste Funktionen der Vorrichtung beinhaltet. Es ist jedoch auch möglich, dass die Schnittstellen eigene, integrierte Schaltkreise sind oder zumindest teilweise aus diskreten Bauelementen bestehen. Bei einer softwaremäßigen Ausbildung können die Schnittstellen Softwaremodule sein, die beispielsweise auf einem Mikrocontroller neben anderen Softwaremodulen vorhanden sind. In the present case, a device can be understood to mean an electrical device that processes sensor signals and, depending on them, controls and/or outputs data signals. The device can have an interface that can be configured as hardware and/or software. In the case of a hardware design, the interfaces can be part of a so-called system ASIC, for example, which contains a wide variety of functions of the device. However, it is also possible for the interfaces to be separate integrated circuits or to consist at least partially of discrete components. In the case of a software design, the interfaces can be software modules which are present, for example, on a microcontroller alongside other software modules.
Es wird ferner eine Kamera mit der vorangehend vorgestellten Vorrichtung und einem Bildsensor zum Erfassen des Kamerarohbilds vorgestellt. Eine solche Kamera ist zur Pflanzendetektion geeignet, wobei vorteilhafterweise eine Überbelichtung und Unterbelichtung vermieden werden können. A camera with the device presented above and an image sensor for capturing the raw camera image is also presented. Such a camera is suitable for plant detection, with overexposure and underexposure advantageously being able to be avoided.
Ausführungsbeispiele des hier vorgestellten Ansatzes sind in den Zeichnungen dargestellt und in der nachfolgenden Beschreibung näher erläutert. Es zeigt: Exemplary embodiments of the approach presented here are shown in the drawings and explained in more detail in the following description. It shows:
Fig. 1 eine schematische Darstellung einer Kamera mit einer Vorrichtung zum Kalibrieren der Kamera und einem Bildsensor gemäß einem Ausführungsbeispiel; 1 shows a schematic representation of a camera with a device for calibrating the camera and an image sensor according to an embodiment;
Fig. 2 eine schematische Darstellung eines Histogramms über alle Grauwerte der Pixel eines Kamerarohbilds einer Kamera gemäß einem Ausführungsbeispiel; 2 shows a schematic representation of a histogram over all gray values of the pixels of a raw camera image of a camera according to an embodiment;
Fig. 3 ein Ablaufdiagramm eines Verfahrens zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel; 3 shows a flowchart of a method for calibrating a camera according to an embodiment;
Fig. 4 ein Ablaufdiagramm eines Verfahrens zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel; und 4 shows a flow chart of a method for calibrating a camera according to an embodiment; and
Fig. 5 ein Anwendungsbeispiel eines Verfahrens zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel. In der nachfolgenden Beschreibung günstiger Ausführungsbeispiele des vorliegenden Ansatzes werden für die in den verschiedenen Figuren dargestellten und ähnlich wirkenden Elemente gleiche oder ähnliche Bezugszeichen verwendet, wobei auf eine wiederholte Beschreibung dieser Elemente verzichtet wird. 5 shows an application example of a method for calibrating a camera according to an embodiment. In the following description of favorable exemplary embodiments of the present approach, the same or similar reference symbols are used for the elements which are shown in the various figures and have a similar effect, with a repeated description of these elements being dispensed with.
Fig. 1 zeigt eine schematische Darstellung einer Kamera 100 mit einer Vorrichtung 105 zum Kalibrieren der Kamera 100 und einem Bildsensor 110 gemäß einem Ausführungsbeispiel. 1 shows a schematic representation of a camera 100 with a device 105 for calibrating the camera 100 and an image sensor 110 according to an exemplary embodiment.
Der Bildsensor 110 ist zum Erfassen eines Kamerarohbilds 115 ausgebildet. Die Vorrichtung 105 weist eine Einleseeinrichtung 120, eine Vergleichseinrichtung 125 und eine Einstelleinrichtung 130 auf. Die Einleseeinrichtung 120 ist ausgebildet, um das Kamerarohbild 115 einzulesen, das eine Mehrzahl von Pixeln aufweist, wobei jedes Pixel einen Grauwert aus einer Mehrzahl von Grauwerten aufweist. Gemäß diesem Ausführungsbeispiel weist das Kamerarohbild 115 als die Pixel eine Mehrzahl von Rotpixeln R auf, wobei jedes Rotpixel R einen Grauwert aus der Mehrzahl von Grauwerten aufweist. Die Vergleichseinrichtung 125 ist ausgebildet, um eine erste Menge von über einem Maximalgraugrenzwert MaT liegenden Grauwerten der Pixel mit einer ersten Häufigkeit UbP zu vergleichen. Die Einstelleinrichtung 130 ist ausgebildet, um eine aktuelle Verstärkung 135 der Kamera 100 auf eine neue Verstärkung 140 einzustellen, wenn die erste Menge die erste Häufigkeit UbP überschreitet. Die Vergleichseinrichtung 125 ist ferner ausgebildet, um eine zweite Menge von über einem Minimalgraugrenzwert MiT liegenden Grauwerten der Pixel mit einer zweiten Häufigkeit LbP zu vergleichen, wenn die erste Menge die erste Häufigkeit UbP nicht überschreitet. Die Einstelleinrichtung 130 ist ausgebildet, um die aktuelle Verstärkung 135 und eine aktuelle Belichtung 145 der Kamera 100 beizubehalten, wenn die zweite Menge die zweite Häufigkeit LbP nicht unterschreitet. Ferner ist die Einstelleinrichtung 130 ausgebildet, um die aktuelle Belichtung 145 auf eine neue Belichtung 150 einzustellen, wenn die zweite Menge die zweite Häufigkeit LbP unterschreitet. Bei der ersten Häufigkeit UbP handelt es sich gemäß diesem Ausführungsbeispiel um eine Häufigkeitsobergrenze für die erste Menge. Bei der zweiten Häufigkeit LbP handelt es sich gemäß diesem Ausführungsbeispiel um eine Häufigkeitsuntergrenze für die zweite Menge. The image sensor 110 is designed to capture a raw camera image 115 . The device 105 has a reading device 120 , a comparison device 125 and a setting device 130 . The reading device 120 is designed to read in the raw camera image 115, which has a plurality of pixels, each pixel having a gray value from a plurality of gray values. According to this exemplary embodiment, the raw camera image 115 has a plurality of red pixels R as the pixels, each red pixel R having a gray value from the plurality of gray values. The comparison device 125 is designed to compare a first quantity of gray values of the pixels lying above a maximum gray limit value MaT with a first frequency UbP. The setting device 130 is designed to set a current gain 135 of the camera 100 to a new gain 140 when the first quantity exceeds the first frequency UbP. The comparison device 125 is also designed to compare a second set of gray values of the pixels lying above a minimum gray threshold MiT with a second frequency LbP if the first set does not exceed the first frequency UbP. The setting device 130 is designed to maintain the current gain 135 and a current exposure 145 of the camera 100 if the second quantity does not fall below the second frequency LbP. Furthermore, the setting device 130 is designed to set the current exposure 145 to a new exposure 150 if the second quantity falls below the second frequency LbP. According to this exemplary embodiment, the first frequency UbP is a frequency upper limit for the first set. At the second frequency LbP according to this exemplary embodiment, this is a lower frequency limit for the second set.
Werte für den Maximalgraugrenzwert MaT, die erste Häufigkeit UbP, den Minimalgraugrenzwert MiT und/oder die zweite Häufigkeit LbP sind gemäß diesem Ausführungsbeispiel in einer Speichereinrichtung der Vorrichtung 105 hinterlegt oder von der Vorrichtung 105 einlesbar. According to this exemplary embodiment, values for the maximum gray limit value MaT, the first frequency UbP, the minimum gray limit value MiT and/or the second frequency LbP are stored in a memory device of the device 105 or can be read in by the device 105 .
Die hier vorgestellte Vorrichtung 105 ermöglicht vorteilhafterweise eine automatische Exposure- und Gain-Nachführung, kurz „AEGC“ (Automatic Exposure and Gain Control) einer Kamera 100 in Form einer digitalen Kamera für den Spektralbereich, der für die Pflanzendetektion benötigt wird. The device 105 presented here advantageously enables automatic exposure and gain tracking, “AEGC” for short (Automatic Exposure and Gain Control) of a camera 100 in the form of a digital camera for the spectral range that is required for plant detection.
Für die Detektion von Pflanzen werden Kameras benötigt, die Licht im roten und nah infraroten Spektralbereich aufzeichnen können. Diese Kameras werden oft im Agrarbereich zur Pflanzendetektion eingesetzt. Hierbei werden besondere Anforderungen an eine automatisierte Belichtungs- bzw. Verstärkungs- Nachführung gesetzt. Der Bildsensor 110, spezielle die Rotpixel R, sind zum Sensieren von Licht im roten und nah infraroten Spektralbereich ausgebildet. Die hier vorgestellte Vorrichtung 105 ermöglicht eine speziell für die Pflanzendetektion auf Agrarflächen benötigte AEGC. Die Exposure wird hierbei von der Vorrichtung 105 vorrangig vor dem Gain erhöht bzw. der Gain immer vorrangig vor der Exposure verringert. Somit wird das Rauschen im Bild immer auf ein Minimum gehalten. Cameras that can record light in the red and near-infrared spectral range are required to detect plants. These cameras are often used in the agricultural sector for plant detection. In this case, special requirements are placed on automated exposure or amplification tracking. The image sensor 110, specifically the red pixels R, are designed to sense light in the red and near-infrared spectral range. The device 105 presented here enables an AEGC specifically required for plant detection on agricultural land. In this case, the exposure is increased by the device 105 with priority over the gain, or the gain is always reduced with priority over the exposure. Thus, the noise in the picture is always kept to a minimum.
Eine ebenfalls mögliche Belichtungsnachführung, welche auf einem Mittelwert eines Grauwerthistogramms basieren könnte, eignet sich aus zwei Gründen nicht für die Pflanzendetektion: Another possible exposure tracking, which could be based on a mean value of a gray value histogram, is not suitable for plant detection for two reasons:
Zum einen wird für die Pflanzendetektion rotes und infrarotes Licht verwendet. Dabei handelt es sich bei dem Bildsensor 110 gemäß diesem Ausführungsbeispiel um eine normale RGB-Farbkamera, bei der ein IR- Sperrf ilter entfernt und durch einen Dualbandfilter zum Durchlässen von rotem Licht und Nahinfrarotlicht, kurz „NIR“ und/oder einen Grünsperrfilter zum Sperren von grünem Licht und/oder einen Blausperrfilter zum Sperren von blauem Licht ersetzt wurde. Da jedes Pixel auf dem RGB-Kamerachip im Infraroten annährend gleich empfindlich ist, wird aus einer RGB-Kamera eine „R+NIR, NIR, NIR“- Kamera. Somit befinden sich im Rotpixel R der Kamera 100 die Information R+NIR. Diese Pixel sind hierdurch immer heller als alle anderen Pixel. Für die Belichtungskorrektur sind somit gemäß diesem Ausführungsbeispiel nur die Rotpixel R relevant. On the one hand, red and infrared light is used to detect plants. The image sensor 110 according to this exemplary embodiment is a normal RGB color camera in which an IR cut filter is removed and replaced by a dual band filter for transmitting red light and near-infrared light, “NIR” for short, and/or a green cut filter for blocking green light and/or a blue cut filter to block blue light was replaced. Since each pixel on the RGB camera chip is almost equally sensitive in the infrared, an RGB camera becomes an “R+NIR, NIR, NIR” camera. The information R+NIR is therefore located in the red pixel R of the camera 100 . As a result, these pixels are always brighter than all other pixels. According to this exemplary embodiment, therefore, only the red pixels R are relevant for the exposure correction.
Zum anderen wachsen auf Ackerflächen oft einzelne Pflanzen aus der Erde. Da Pflanzen aber viel NIR-Licht reflektieren und der Boden viel Licht absorbiert, ist eine Belichtungsnachführung über den reinen Mittelwert nicht möglich. Dabei würden die Pflanzen sofort überbelichtet sein, da diese im Verhältnis zum Boden nur eine sehr kleine Fläche einnehmen. On the other hand, individual plants often grow out of the ground on arable land. However, since plants reflect a lot of NIR light and the soil absorbs a lot of light, it is not possible to track the exposure using the pure average value. The plants would immediately be overexposed because they only take up a very small area in relation to the ground.
Somit schafft die hier vorgestellte Vorrichtung 105 eine geeignete AEGC, die nicht nur auf eine neue Kameraarchitektur zugeschnitten ist, sondern auch speziell für die Pflanzendetektion auf dem Acker gegebene Umgebungsbedingungen geeignet ist. Pflanzenobjekte sollten auf gar keinen Fall überbelichtet oder unterbelichtet sein, auch wenn diese nur ein Bruchteil der Fläche im Bild einnehmen, oft im Promille-Bereich. Thus, the device 105 presented here creates a suitable AEGC that is not only tailored to a new camera architecture, but is also specifically suitable for the environmental conditions given for plant detection in the field. Under no circumstances should plant objects be overexposed or underexposed, even if they only take up a fraction of the area in the picture, often in the per thousand range.
Wie bereits beschrieben, sind nur die Rotpixel R für die hier vorgestellte AEGC von Interesse, da diese das Rot+NIR-Signal beinhalten und somit immer vor dem Infrarotpixel, wahlweise Grün oder Blau, in Sättigung gehen. Der Bildsensor 110 liefert gemäß diesem Ausführungsbeispiel Kamerarohbilder 115 in einem 12 Bit- Rohformat. Hierbei handelt es sich um ein Grauwertbild bei dem ein Bayer- Pattern als Grauwert kodiert enthalten ist. Jedes Pixel in diesem Bild steht für einen Farbwert. Gemäß einem Ausführungsbeispiel wird ansprechend auf das Einlesen des Kamerarohbilds 115 über die Einleseeinrichtung 120 von der Vorrichtung 105 aus dem Kamerarohbild 115 ein Histogramm über alle Grauwerte aller Rotpixel R des Kamerarohbilds 115 generiert. Ein solches Histogramm ist in Fig. 2 gezeigt. As already described, only the red pixels R are of interest for the AEGC presented here, since they contain the red+NIR signal and are therefore always saturated before the infrared pixel, optionally green or blue. According to this exemplary embodiment, the image sensor 110 supplies raw camera images 115 in a 12-bit raw format. This is a gray value image in which a Bayer pattern is encoded as a gray value. Each pixel in this image represents a color value. According to one exemplary embodiment, in response to the reading in of raw camera image 115 via reading device 120 , device 105 generates a histogram from raw camera image 115 for all gray values of all red pixels R of raw camera image 115 . Such a histogram is shown in FIG.
Fig. 2 zeigt eine schematische Darstellung eines Histogramms 200 über alle Grauwerte R+NIR der Pixel eines Kamerarohbilds einer Kamera gemäß einem Ausführungsbeispiel. Dabei kann es sich um das in Fig. 1 beschriebene Kamerarohbild handeln. FIG. 2 shows a schematic representation of a histogram 200 over all gray values R+NIR of the pixels of a raw camera image of a camera according to a example. This can be the raw camera image described in FIG. 1 .
Das Histogramm 200 zeigt gemäß diesem Ausführungsbeispiel alle Grauwerte R+NIR der Rotpixel des Kamerarohbilds. According to this exemplary embodiment, the histogram 200 shows all gray values R+NIR of the red pixels of the raw camera image.
Wie bereits in Fig. 1 beschrieben sind im Histogramm 200 vier Parameter definiert: As already described in FIG. 1, four parameters are defined in the histogram 200:
1. Ein maximaler Grauwert, der vorkommen darf, in Form des Maximalgraugrenzwerts MaT: Die Grauwerte R+NIR dürfen diesen Wert nicht überschreiten. 1. A maximum gray value that may occur, in the form of the maximum gray value MaT: The gray values R+NIR must not exceed this value.
2. Ein minimaler Grauwert, der vorkommen darf, in Form des Minimalgraugrenzwerts MiT: Die Grauwerte R+NIR müssen mindestens diese Grenze erreichen. 2. A minimum gray value that may occur, in the form of the minimum gray value MiT: The gray values R+NIR must at least reach this limit.
3. Eine prozentual erlaubte Grauwertanzahl in Form der erste Häufigkeit UbP: Soviel Prozent % der Pixel dürfen die MaT-Grenze überschreiten. 3. Percentage permitted number of gray values in the form of the first frequency UbP: Percentage % of the pixels may exceed the MaT limit.
4. Eine prozentual mindestens benötigte Grauwertanzahl in Form der zweiten Häufigkeit LbP: Soviel Prozent % der Pixel müssen mindestens die zweite Häufigkeit LbP/den Minimalgraugrenzwert MiT überschreiten. 4. A minimum percentage of gray values required in the form of the second frequency LbP: This percentage % of the pixels must at least exceed the second frequency LbP/minimum gray threshold value MiT.
Wichtig ist hierbei, dass die erste Häufigkeit UbP immer Vorrang vor der zweiten Häufigkeit LbP hat. Somit regelt die Kamera beim Erreichen der ersten Häufigkeit UbP immer zuerst runter. It is important here that the first frequency UbP always has priority over the second frequency LbP. Thus, the camera always regulates down first when the first frequency UbP is reached.
Es folgt die Beschreibung eines Anwendungsbeispiels mit folgenden eingestellten Parametern: The following is a description of an application example with the following set parameters:
Maximalgraugrenzwert MaT = 4000 Maximum gray limit MaT = 4000
Minimalgraugrenzwert MiT = 3000 erste Häufigkeit UbP = 0,1% zweite Häufigkeit LbP = 95% Hier regelt die Vorrichtung solange die Exposure bzw. Gain hoch, bis ca. 0,1% der Pixel im Bild den Grauwert 4000 erreicht haben oder mindestens 95% der Pixel den Grauwert 3000. Da die Erde immer sehr dunkel im Bild ist und diese die größte Fläche im Bild einnimmt, ist diese AEGC immer dazu geneigt, das Bild hoch zu regeln damit die 95% >3000 erreicht sind. Dies passiert solange bis 0,1% der Pixel den Grauwert 4000 erreicht haben. Da die erste Häufigkeit UbP immer Vorrang vor der zweiten Häufigkeit LbP hat, wird somit sofort runter geregelt. Als nächstes will die Vorrichtung wieder die 95% bei 3000 erreichen und regelt wieder hoch. Dies führt zu einem Schwingen der Nachführung zwischen dem Maximalgraugrenzwert MaT und dem Minimalgraugrenzwert MiT. Um das Schwingen möglichst klein zu halten, korrigiert die Vorrichtung die Belichtung gemäß einem Ausführungsbeispiel nur in kleinen Schritten. Hierzu sind gemäß einem Ausführungsbeispiel zwei weitere Regelparameter hinterlegt, die in Fig. 3 näher beschriebene werden: ein Korrekturfaktor nach oben ein Korrekturfaktor nach unten Minimum gray threshold MiT = 3000 first frequency UbP = 0.1% second frequency LbP = 95% Here the device regulates the exposure or gain up until approx. 0.1% of the pixels in the image have reached the gray value 4000 or at least 95% of the pixels have reached the gray value 3000 occupies the largest area in the picture, this AEGC is always inclined to regulate the picture up so that the 95% >3000 is reached. This happens until 0.1% of the pixels have reached the gray value 4000. Since the first frequency UbP always has priority over the second frequency LbP, it is regulated down immediately. Next the device wants to get back to 95% at 3000 and ramps up again. This leads to the tracking oscillating between the maximum gray limit value MaT and the minimum gray limit value MiT. In order to keep the swinging as small as possible, the device corrects the exposure according to one embodiment only in small steps. According to one exemplary embodiment, two further control parameters are stored for this purpose, which are described in more detail in FIG. 3: an upward correction factor, a downward correction factor
Um diesen Wert wird die Exposure bzw. Gain nach unten bzw. oben korrigiert. Dieser Wert liegt gemäß einem Ausführungsbeispiel nicht über 20%. The exposure or gain is corrected downwards or upwards by this value. According to one exemplary embodiment, this value is not more than 20%.
Ferner sind gemäß einem Ausführungsbeispiel noch zwei Parameter hinterlegt oder anwendbar, die den minimal bzw. maximal zulässigen Exposure der Kamera definieren, und/oder es ist gemäß einem Ausführungsbeispiel ein Parameter hinterlegt oder anwendbar, der den maximal zulässigen Gain definiert: ein maximal zulässiger Exposure in Form eines Belichtungsmaximalschwellenwerts ein minimal zulässiger Exposure in Form eines Belichtungsminimalschwellenwerts ein maximal zulässiger Gain in Form eines Verstärkungsmaximalschwellenwerts Furthermore, according to one embodiment, two parameters are stored or applicable that define the minimum or maximum permissible exposure of the camera, and/or according to one embodiment, a parameter is stored or applicable that defines the maximum permissible gain: a maximum permissible exposure in a minimum allowable exposure in the form of a minimum exposure threshold a maximum allowable gain in the form of a maximum gain threshold
Als ein weiterer Parameter „Repeat“ ist gemäß einem Ausführungsbeispiel definiert, ob die beschriebene hier vorgestellte AEGC in jedem Kamerarohbild angewandt wird, oder wahlweise in jedem x-ten Kamerarohbild. According to one exemplary embodiment, a further parameter “Repeat” defines whether the AEGC described here and presented here is used in every raw camera image, or alternatively in every xth raw camera image.
Das von der Vorrichtung durchführbare beschriebene Verfahren ist für die Nachführung der Bilder bei der Pflanzendetektion einsetzbar, um beispielsweise eine punktuelle Ausbringung von Herbiziden zu ermöglichen. The method described, which can be carried out by the device, can be used for the tracking of the images in the case of plant detection, in order, for example, to enable selective application of herbicides.
Fig. 3 zeigt ein Ablaufdiagramm eines Verfahrens 300 zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel. Dabei kann es sich um ein Verfahren 300 handeln, das von der in Fig. 1 oder 2 beschriebenen Vorrichtung durchführbar oder ansteuerbar ist. FIG. 3 shows a flowchart of a method 300 for calibrating a camera according to an embodiment. This can be a method 300 that can be carried out or controlled by the device described in FIG. 1 or 2 .
Das Verfahren 300 weist einen Schritt 305 des Einlesens, einen Schritt 315 des Vergleichens einer ersten Menge, einen Schritt 320 des Einstellens einer aktuellen Verstärkung, einen Schritt 325 des Vergleichens einer zweiten Menge, einen Schritt 330 des Beibehaltens und einen Schritt 335 des Einstellens der aktuellen Belichtung auf. The method 300 comprises a step 305 of reading, a step 315 of comparing a first set, a step 320 of setting a current gain, a step 325 of comparing a second set, a step 330 of maintaining and a step 335 of setting the current exposure up.
Im Schritt 305 des Einlesens wird ein Kamerarohbild von der Kamera eingelesen, wobei das Kamerarohbild eine Mehrzahl von Pixeln aufweist, wobei jedes Pixel einen Grauwert aus einer Mehrzahl von Grauwerten aufweist. Im Schritt 315 des Vergleichens wird eine erste Menge von über einem Maximalgraugrenzwert liegenden Grauwerten der Pixel mit einer ersten Häufigkeit verglichen. Im Schritt 320 des Einstellens wird eine aktuelle Verstärkung der Kamera auf eine neue Verstärkung eingestellt, wenn die erste Menge die erste Häufigkeit überschreitet. Im Schritt 325 des Vergleichens wird eine zweite Menge von über einem Minimalgraugrenzwert liegenden Grauwerten der Pixel mit einer zweiten Häufigkeit verglichen, wenn die erste Menge die erste Häufigkeit nicht überschreitet. Im Schritt 330 des Beibehaltens werden die aktuelle Verstärkung und eine aktuellen Belichtung der Kamera beibehalten, wenn die zweite Menge die zweite Häufigkeit nicht unterschreitet. Im Schritt 225 des Einstellens wird die aktuelle Belichtung auf eine neue Belichtung eingestellt, wenn die zweite Menge die zweite Häufigkeit unterschreitet. In step 305 of reading in, a raw camera image is read in from the camera, the raw camera image having a plurality of pixels, each pixel having a gray value from a plurality of gray values. In step 315 of comparison, a first set of gray values of the pixels that are above a maximum gray threshold value are compared with a first frequency. In step 320 of adjusting, a current gain of the camera is adjusted to a new gain when the first amount exceeds the first frequency. In step 325 of comparing, a second set of gray values of pixels above a minimum gray threshold is compared at a second frequency if the first set does not exceed the first frequency. In step 330 of maintaining, the current gain and a current exposure of the camera are maintained if the second amount is not less than the second frequency. In step 225 of setting, the current exposure set to a new exposure when the second amount is less than the second frequency.
Gemäß diesem Ausführungsbeispiel wird im Schritt 320 des Einstellens die aktuelle Verstärkung unter Verwendung eines Korrekturfaktors nach unten auf die neuen Verstärkung eingestellt, wobei gemäß diesem Ausführungsbeispiel der Korrekturfaktor nach unten einen Wert von 20% nicht übersteigt. Hierbei wird die neue Verstärkung gemäß einem Ausführungsbeispiel berechnet, indem die aktuelle Verstärkung durch den Korrekturfaktor nach unten dividiert wird. According to this embodiment, in step 320 of adjusting, the current gain is adjusted to the new gain using a downward correction factor, wherein according to this exemplary embodiment, the downward correction factor does not exceed a value of 20%. Here, according to one embodiment, the new gain is calculated by dividing the current gain down by the correction factor.
Gemäß diesem Ausführungsbeispiel wird im Schritt 335 des Einstellens die aktuelle Belichtung unter Verwendung eines Korrekturfaktors nach oben auf die neue Belichtung eingestellt, wobei gemäß diesem Ausführungsbeispiel der Korrekturfaktor nach oben einen Wert von 20% nicht übersteigt. Hierbei wird die neue Belichtung gemäß einem Ausführungsbeispiel berechnet, indem die aktuelle Belichtung mit dem Korrekturfaktor nach unten multipliziert wird. According to this embodiment, in step 335 of adjusting, the current exposure is adjusted to the new exposure using an upward correction factor, which according to this exemplary embodiment, the upward correction factor does not exceed a value of 20%. Here, according to one embodiment, the new exposure is calculated by multiplying the current exposure down by the correction factor.
Das Verfahren 300 weist ferner gemäß diesem Ausführungsbeispiel einen Schritt 340 des Vergleichens, einen Schritt 345 des Beibehaltens, einen Schritt 350 des Setzens, einen Schritt 355 des Einstellens, einen Schritt 360 des Vergleichens, einen Schritt 365 des Beibehaltens, einen Schritt 370 des Setzens, einen Schritt 375 des Vergleichens, einen Schritt 380 des Beibehaltens, einen Schritt 385 des Setzens, einen Schritt 390 des Einstellens, einen Schritt 392 des Vergleichens, einen Schritt 395 des Beibehaltens, einen Schritt 396 des Setzens, einen Schritt 397 des Erstellens, einen Schritt 398 des Erfassens und/oder einen Schritt 399 des Empfangens auf. According to this exemplary embodiment, the method 300 also has a step 340 of comparing, a step 345 of retaining, a step 350 of setting, a step 355 of setting, a step 360 of comparing, a step 365 of retaining, a step 370 of setting, a step 375 of comparing, a step 380 of keeping, a step 385 of setting, a step 390 of setting, a step 392 of comparing, a step 395 of keeping, a step 396 of setting, a step 397 of making, a step 398 of detecting and/or a step 399 of receiving.
Der Schritt 340 des Vergleichens wird ansprechend auf den Schritt 320 des Einstellens der aktuellen Verstärkung auf die neue Verstärkung ausgeführt, wobei im Schritt 340 des Vergleichens die neue Verstärkung mit einem Verstärkungsschwellenwert verglichen wird, und/oder im Schritt 345 des Beibehaltens die neue Verstärkung beibehalten wird, wenn die neue Verstärkung den Verstärkungsschwellenwert nicht unterschreitet, oder es wird im Schritt 350 des Setzens die neue Verstärkung auf den Verstärkungsschwellenwert gesetzt und im Schritt 355 des Einstellens die aktuelle Belichtung auf eine weitere neue Belichtung eingestellt, wenn die neue Verstärkung den Verstärkungsschwellenwert unterschreitet. Gemäß einem Ausführungsbeispiel wird im Schritt 340 des Vergleichens die neue Verstärkung mit dem Verstärkungsschwellenwert verglichen, der bei 1 liegt. The comparing step 340 is performed in response to the adjusting the current gain to the new gain step 320, wherein the comparing step 340 compares the new gain to a gain threshold and/or the maintaining step 345 maintaining the new gain , if the new gain does not fall below the gain threshold value, or in step 350 of setting the new gain is set to the gain threshold value and in step 355 of setting the current exposure to a further new one Exposure adjusted when the new gain falls below the gain threshold. According to one embodiment, in step 340 of comparing, the new gain is compared to the gain threshold, which is equal to one.
Gemäß diesem Ausführungsbeispiel wird im Schritt 350 des Setzens ferner der Korrekturfaktor nach unten neu gesetzt, indem der Wert 1 durch die neue Verstärkung geteilt wird, um einen neuen Korrekturfaktor nach unten zu erhalten. According to this embodiment, in step 350 of setting, the downward correction factor is also reset by dividing the value 1 by the new gain in order to obtain a new downward correction factor.
Der Schritt 360 des Vergleichens wird ansprechend auf den Schritt 355 des Einstellens der aktuellen Belichtung auf die neue Belichtung durchgeführt, wobei im Schritt 360 des Vergleichens die weitere neue Belichtung mit einem Belichtungsminimalschwellenwert verglichen wird, und im Schritt 365 des Beibehaltens die weitere neue Belichtung beibehalten wird, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert nicht unterschreitet oder es wird im Schritt 370 des Setzens die weitere neue Belichtung auf den Belichtungsminimalschwellenwert gesetzt, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert unterschreitet. The comparing step 360 is performed in response to the setting the current exposure to the new exposure step 355, wherein the comparing step 360 compares the further new exposure to a minimum exposure threshold and the maintaining step 365 maintains the further new exposure , if the further new exposure does not fall below the exposure minimum threshold value, or in step 370 of setting the further new exposure is set to the exposure minimum threshold value if the further new exposure falls below the exposure minimum threshold value.
Gemäß diesem Ausführungsbeispiel wird im Schritt 355 des Einstellens der aktuellen Belichtung auf die neue Belichtung die aktuelle Belichtung unter Verwendung eines Korrekturfaktors nach unten auf die weitere neue Belichtung reduziert. Hierbei wird die neue Belichtung gemäß einem Ausführungsbeispiel berechnet, indem die aktuelle Belichtung durch den neuen Korrekturfaktor nach unten dividiert wird. According to this embodiment, in step 355 of adjusting the current exposure to the new exposure, the current exposure is reduced down to the further new exposure using a correction factor. Here, according to one embodiment, the new exposure is calculated by dividing the current exposure down by the new correction factor.
Der Schritt 375 des Vergleichens wird ansprechend auf den Schritt 335 des Einstellens der aktuellen Belichtung auf die neue Belichtung durchgeführt, wobei im Schritt 375 des Vergleichens die neue Belichtung mit einem Belichtungsmaximalschwellenwert verglichen wird, und im Schritt 380 des Beibehaltens die neue Belichtung beibehalten wird, wenn die neue Belichtung den Belichtungsmaximalschwellenwert nicht überschreitet oder es wird im Schritt 385 des Setzens die neue Belichtung auf den Belichtungsmaximalschwellenwert gesetzt und im Schritt 390 des Einstellens die aktuelle Verstärkung auf eine weitere neue Verstärkung eingestellt, wenn die neue Belichtung den Belichtungsmaximalschwellenwert überschreitet. The comparing step 375 is performed in response to the setting the current exposure to the new exposure step 335, wherein the comparing step 375 compares the new exposure to a maximum exposure threshold and the maintaining step 380 maintaining the new exposure if the new exposure does not exceed the maximum exposure threshold, or in the setting step 385 the new exposure is set to the maximum exposure threshold and in the setting step 390 the current gain is set to one further new gain set if the new exposure exceeds the maximum exposure threshold.
Gemäß diesem Ausführungsbeispiel wird im Schritt 385 des Setzens ferner der Korrekturfaktor nach oben neu gesetzt, indem die neue Belichtung durch den Belichtungsmaximalschwellenwert geteilt wird, um einen neuen Korrekturfaktor nach oben zu erhalten. Gemäß diesem Ausführungsbeispiel wird im Schritt 390 des Einstellens die aktuelle Verstärkung unter Verwendung des neuen Korrekturfaktors nach oben auf die weitere neue Verstärkung eingestellt. According to this embodiment, in step 385 of setting, the correction factor is also reset upwards by dividing the new exposure by the maximum exposure threshold value to obtain a new upward correction factor. According to this embodiment, in step 390 of adjusting, the current gain is adjusted up to the further new gain using the new correction factor.
Der Schritt 392 des Vergleichens wird ansprechend auf den Schritt 390 des Einstellens der aktuellen Verstärkung auf die weitere neue Verstärkung durchgeführt, wobei im Schritt 392 des Vergleichens die weitere neue Verstärkung mit einem Verstärkungsmaximalschwellenwert verglichen wird, und im Schritt des Beibehaltens 395 die weitere neue Verstärkung beibehalten wird, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert nicht überschreitet oder es wird im Schritt 396 des Setzens die weitere neue Verstärkung auf den Verstärkungsmaximalschwellenwert gesetzt, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert überschreitet. The comparing step 392 is performed in response to the step 390 of setting the current gain to the further new gain, wherein in the comparing step 392 the further new gain is compared to a gain maximum threshold and in the maintaining step 395 the further new gain is retained if the further new gain does not exceed the gain maximum threshold value or in step 396 of setting the further new gain is set to the gain maximum threshold value if the further new gain exceeds the gain maximum threshold value.
Im Schritt 397 des Erstellens wird ein Histogramm über alle Grauwerte der Pixel des Kamerarohbilds erstellt, und in einen Schritt des Auslesens die erste Menge und die zweite Menge aus dem Histogramm ausgelesen. Die Schritte 397 des Erstellens und Auslesens werden gemäß diesem Ausführungsbeispiel vor oder ansprechend auf den Schritt 305 des Einlesens durchgeführt. In step 397 of creating, a histogram is created for all gray values of the pixels of the raw camera image, and in a reading step, the first set and the second set are read out of the histogram. According to this exemplary embodiment, steps 397 of creating and reading out are carried out before or in response to step 305 of reading in.
Im Schritt 398 des Erfassens wird das Kamerarohbild unter Verwendung eines Bildsensors erfasst, der eine Mehrzahl von Rotpixeln zum Sensieren der Grauwerte aufweist. Der Schritt 398 des Erfassens wird gemäß diesem Ausführungsbeispiel vor dem Schritt 305 des Einlesens ausgeführt. In step 398 of capturing, the raw camera image is captured using an image sensor that has a plurality of red pixels for sensing the gray values. According to this exemplary embodiment, step 398 of detecting is carried out before step 305 of reading in.
Die Schritte 330, 365, 370, 380, 395 und/oder 396 führen gemäß diesem Ausführungsbeispiel je zu einem Ende E des Verfahrens 300. Gemäß einem Ausführungsbeispiel weist das Verfahren 300 ferner nach dem Ende E des Verfahrens 300 den Schritt 399 des Empfangens auf, in dem ein weiteres Kamerarohbild von der Kamera empfangen wird, wobei die Schritte 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398 des Verfahrens 300 ansprechend auf den Schritt 399 des Empfangens unter Verwendung des weiteren Kamerarohbilds wiederholt durchgeführt werden. Gemäß einem Ausführungsbeispiel ist das im Schritt 399 des Empfangens empfangene weitere Kamerarohbild ein auf das Kamerarohbild direkt folgendes Folgekamerarohbild der Kamera oder ein nach einer definierten Folgezahl folgendes Folgekamerarohbild der Kamera. According to this exemplary embodiment, steps 330, 365, 370, 380, 395 and/or 396 each lead to an end E of the method 300. According to an exemplary embodiment, the method 300 also has, after the end E of the method 300, the step 399 of receiving, in which a further raw camera image is received by the camera, with the steps 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398 of the method 300 can be repeatedly performed in response to the step 399 of receiving using the further raw camera image. According to one exemplary embodiment, the further raw camera image received in step 399 of receiving is a raw camera image that follows the raw camera image directly, or a raw camera image that follows after a defined number of sequences.
Fig. 4 zeigt ein Ablaufdiagramm eines Verfahrens 300 zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel. Dabei kann es sich um das in Fig. 3 beschriebene Verfahren 300 handeln, das gemäß diesem Ausführungsbeispiel zusätzliche Schritte 400, 405, 410, 415, 420, 425 aufweist. FIG. 4 shows a flowchart of a method 300 for calibrating a camera according to an embodiment. This can be the method 300 described in FIG. 3, which has additional steps 400, 405, 410, 415, 420, 425 according to this exemplary embodiment.
Im Schritt 400 des Generierens wird der Korrekturfaktor nach oben unter Verwendung des Maximalgraugrenzwerts, des Minimalgraugrenzwerts und/oder einer dritten Häufigkeit höchster Grauwerte im Kamerarohbilds generiert. Der Schritt 400 des Generierens wird gemäß diesem Ausführungsbeispiel zwischen dem Schritt 325 des Vergleichens und dem Schritt 335 des Einstellens ausgeführt, wenn im Schritt 325 des Vergleichens die zweite Menge die zweite Häufigkeit unterschreitet. In step 400 of generating, the upward correction factor is generated using the maximum gray threshold value, the minimum gray threshold value and/or a third frequency of highest gray values in the raw camera image. According to this exemplary embodiment, step 400 of generation is carried out between step 325 of comparison and step 335 of setting if, in step 325 of comparison, the second quantity falls below the second frequency.
Im Schritt 400 des Generierens wird der Korrekturfaktor nach oben, kurz „CfU“, gemäß diesem Ausführungsbeispiel unter Verwendung folgender Formel generiert: In step 400 of generation, the upward correction factor, “CfU” for short, is generated according to this exemplary embodiment using the following formula:
(Maximalgraugrenzwert + Minimalgraugrenzwert)/2 dritte Häufigkeit höchster Grauwerte im Kamerabild (maximum gray threshold + minimum gray threshold)/2 third frequency of the highest gray values in the camera image
Die Reaktionszeit der Reglung wird durch die Schritte 400, 405, 410, 415, 420, 425 bedeutend reduziert. The response time of the control is significantly reduced by steps 400, 405, 410, 415, 420, 425.
Der bisherige Regler in Fig. 3 wurde über die festen Korrekturfaktoren nach oben und unten geregelt. Dabei wurde die Belichtung bzw. Verstärkung des nachfolgenden Bildes jeweils um den Korrekturfaktor nach unten, kurz „CfD“, verringert oder um den Faktor CfU erhöht. Dies hat aber einen deutlichen Nachteil. Die Reglung kann besonders bei Sonne/Wolkenwechsel, typischerweise Faktor 10 in der Helligkeit, bis zu 10 bis 20 Bilder brauchen, um auf den richtigen Helligkeitswert zu kommen. The previous controller in FIG. 3 was adjusted upwards and downwards via the fixed correction factors. The exposure or amplification of the In the following image, it is reduced by the correction factor, or "CfD" for short, or increased by the factor CfU. But this has a clear disadvantage. The control can need up to 10 to 20 images, especially when there is a change in sun/clouds, typically a factor of 10 in brightness, in order to arrive at the correct brightness value.
Um diesen Umstand zu umgehen, berechnet ein Algorithmus direkt den Korrekturwert CfU automatisch und setzt die Belichtung bzw. Verstärkung damit unmittelbar im folgenden Bild auf den Zielwert. Dies ist möglich, da der Algorithmus den Zielwert zwischen Minimalgraugrenzwert, kurz „MiT“ und Maximalgraugrenzwert, kurz „MaT“ und den Istwert, berechnet sich aus aktuellem Bild, kennt. In order to circumvent this situation, an algorithm automatically calculates the correction value CfU and sets the exposure or amplification to the target value immediately in the following image. This is possible because the algorithm knows the target value between the minimum gray limit value, "MiT" for short, and the maximum gray limit value, "MaT" for short, and the actual value, calculated from the current image.
Berechnung des Sollwertes aus dem aktuellem Bild: Calculation of the target value from the current image:
Der Istwert ergibt sich aus den Grauwerten im aktuellem Bild. Hierbei ist es notwendig, dass eine neue Variable hinzugefügt wird, nämlich die dritte Häufigkeit höchster Grauwerte im Kamerabild, kurz„LpD“, = „Lower percentage denominator“. Diese Variable beschreibt wieviel Prozent von den höchsten Grauwerten im Bild ignoriert werden sollen. Dies ist notwendig, damit Ausreißer oder Rauschen nicht zu falschen Ergebnissen führen können. Bei einer LpD von beispielweise 5% werden die obersten 5% der höchsten Grauwerte im Bild ignoriert. Somit berechnet sich der CfU Wert aus den folgenden Informationen: The actual value results from the gray values in the current image. Here it is necessary to add a new variable, namely the third frequency of the highest gray values in the camera image, “LpD” for short = “Lower percentage denominator”. This variable describes what percentage of the highest gray values in the image should be ignored. This is necessary so that outliers or noise cannot lead to incorrect results. For example, with an LpD of 5%, the top 5% of the highest gray values in the image are ignored. Thus, the CfU value is calculated from the following information:
CfU = Zielwert/Istwert = ((MaT+MiT)/2)/(maximaler Grauwert im Bild - LpD) CfU = target value/actual value = ((MaT+MiT)/2)/(maximum gray value in the image - LpD)
Im Schritt 320 des Einstellens wird die aktuelle Verstärkung gemäß diesem Ausführungsbeispiel unter Verwendung des Korrekturfaktors nach unten auf die neue Verstärkung eingestellt, wenn eine dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel eineIn step 320 of adjusting, according to this embodiment, the current gain is adjusted down to the new gain using the correction factor if a third set of gray values of the pixels above the maximum gray threshold value
Maximalüberbelichtungspixelmenge, kurz „MoP“ = „Maximal overexposured Pixels“, nicht überschreitet. Maximum overexposure pixel amount, short "MoP" = "Maximum overexposed pixels".
Alternativ wird gemäß diesem Ausführungsbeispiel im weiteren Schritt 405 des Einstellens die aktuelle Verstärkung unter Verwendung eines Maximalkorrekturfaktors nach unten auf eine weitere neue Verstärkung eingestellt, wenn die dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel die Maximalüberbelichtungspixelmenge überschreitet, wobei der Maximalkorrekturfaktor nach unten größer ist als der Korrekturfaktor nach unten. Der Maximalkorrekturfaktor nach unten wird im Folgenden auch abgekürzt als „CfDmax“ bezeichnet. Alternatively, according to this exemplary embodiment, in the further step 405 of setting, the current amplification is reduced to a further new amplification using a maximum correction factor set when the third set of gray values of pixels above the maximum gray threshold exceeds the maximum overexposure pixel set, where the maximum down correction factor is greater than the down correction factor. The maximum downward correction factor is also abbreviated as "CfDmax" in the following.
Hierzu wird gemäß diesem Ausführungsbeispiel nach dem Schritt 315 des Vergleichens, wenn die erste Menge die erste Häufigkeit überschreitet, der Schritt 410 des Erkennens durchgeführt, in dem erkannt wird, ob die dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel die Maximalüberbelichtungspixelmenge überschreitet oder nicht. For this purpose, according to this exemplary embodiment, after step 315 of comparing, if the first quantity exceeds the first frequency, step 410 of recognition is carried out, in which it is recognized whether the third quantity of gray values of the pixels lying above the maximum gray threshold value exceeds the maximum overexposure pixel quantity or not .
Ansprechend auf den weiteren Schritt 405 des Einstellens wird gemäß diesem Ausführungsbeispiel der Schritt 415 des Vergleichens ausgeführt, in dem andere neue Verstärkung mit einem Verstärkungsschwellenwert verglichen wird, der Schritt 345 des Beibehalten der anderen neuen Verstärkung ausgeführt, wenn die andere neue Verstärkung den Verstärkungsschwellenwert nicht unterschreitet oder der Schritt 420 des Setzens der anderen neuen Verstärkung auf den Verstärkungsschwellenwert und der Schritt 425 des Einstellens der aktuellen Belichtung auf eine andere neue Belichtung, wenn die andere neue Verstärkung den Verstärkungsschwellenwert unterschreitet. Gemäß einem Ausführungsbeispiel wird im Schritt 415 des Vergleichens die andere neue Verstärkung mit dem Verstärkungsschwellenwert verglichen, der bei 1 liegt. In response to the further step 405 of setting, step 415 of comparing is carried out according to this exemplary embodiment, in which another new gain is compared with a gain threshold value, step 345 of maintaining the other new gain is carried out if the other new gain does not fall below the gain threshold value or the step 420 of setting the other new gain to the gain threshold and the step 425 of setting the current exposure to another new exposure if the other new gain falls below the gain threshold. According to one embodiment, in step 415 of comparing, the other new gain is compared to the gain threshold, which is equal to one.
Gemäß diesem Ausführungsbeispiel wird im Schritt 420 des Setzens ferner der Maximalkorrekturfaktor nach unten neu gesetzt, indem der Wert 1 durch die andere neue Verstärkung geteilt wird, um einen neuen Maximalkorrekturfaktor nach unten zu erhalten. Der Schritt 360 des Vergleichens wird gemäß diesem Ausführungsbeispiel ansprechend auf den Schritt 425 des Einstellens der aktuellen Belichtung auf die andere neue Belichtung durchgeführt According to this embodiment, in step 420 of setting, the maximum correction factor is also reset downwards by dividing the value 1 by the other new gain to obtain a new maximum downward correction factor. The step 360 of comparing, according to this embodiment, is performed in response to the step 425 of adjusting the current exposure to the other new exposure
Bestimmung von CfD: Determination of CFD:
Die Korrektur nach unten ist leider nicht ohne weiteres direkt möglich. Hier haben wir zwar ebenfalls den Zielwert zwischen MaT und MiT, doch der Istwert ist hier unbekannt. Pixel, die überbelichtet sind, tragen keine Informationen darüber, wie groß die Überbelichtung ist. Dies kann beispielsweise nur 10% oder auch 1000% betragen. Um hier trotzdem eine schnelle Reglung zu ermöglichen, wird die Anzahl der gesättigten Pixel berechnet und je nach Menge entschieden, ob hier ein großer oder kleiner Sprung gemacht werden muss. Hierfür werden zwei neue Variablem hinzugefügt, MoP und CfDmax. Somit wird im ersten Schritt die Anzahl der überbelichteten Pixel gezählt. Überbelichtete Pixel sind laut Definition alle Pixel, die über MaT liegen. Falls dieser Wert über MoP liegt, dann wird mit CfDmax nach unten geregelt. Falls nicht, wird mit CfD nach unten geregelt. Unfortunately, the correction downwards is not directly possible without further ado. Here we also have the target value between MaT and MiT, but the actual value is here unknown. Pixels that are overexposed don't carry any information about how bad the overexposure is. This can be only 10% or 1000%, for example. In order to still enable quick regulation here, the number of saturated pixels is calculated and, depending on the quantity, a decision is made as to whether a large or small jump needs to be made here. Two new variables are added for this, MoP and CfDmax. Thus, in the first step, the number of overexposed pixels is counted. Overexposed pixels are defined as any pixel that is above MaT. If this value is above MoP, then CfDmax is used to regulate downwards. If not, it is regulated down with CfD.
Fig. 5 zeigt ein Anwendungsbeispiel eines Verfahrens zum Kalibrieren einer Kamera gemäß einem Ausführungsbeispiel. Dabei kann es sich um das in Fig. 4 beschriebene Verfahren 300 handeln. FIG. 5 shows an application example of a method for calibrating a camera according to an embodiment. This can be the method 300 described in FIG. 4 .
In dem Anwendungsbeispiel sind gemäß diesem Ausführungsbeispiel folgende Parameter realisiert: MaT=3950, UbP=0,l%, MoP=0,8%, LPD = 0,5%, MiT=3850, LbP=0,05%, CfDmax=2, CfD = 1.1. According to this exemplary embodiment, the following parameters are implemented in the application example: MaT=3950, UbP=0.1%, MoP=0.8%, LPD=0.5%, MiT=3850, LbP=0.05%, CfDmax=2 , CFD = 1.1.
Grauwerte für die Pixel unterhalb von MiT werden gemäß diesem Ausführungsbeispiel je unter Verwendung der im Schritt des Generierens für sie individuell berechneter Korrekurfaktoren nach oben CfU in den Bereich zwischen MiT und MaT heraufgeregelt. According to this exemplary embodiment, gray values for the pixels below MiT are adjusted upwards CfU into the range between MiT and MaT using the correction factors individually calculated for them in the generation step.
Grauwerte für eine Menge Undefiniert überbelichteter Pixel 500 über MaT werden gemäß diesem Ausführungsbeispiel abhängig von der Menge mit entweder dem CfDmax oder dem CfD heruntergeregelt. According to this exemplary embodiment, gray values for a quantity of undefined overexposed pixels 500 above MaT are regulated down with either the CfDmax or the CfD depending on the quantity.

Claims

- 22 - - 22 -
Ansprüche Expectations
1. Verfahren (300) zum Kalibrieren einer Kamera (100), wobei das Verfahren (300) die folgenden Schritte umfasst: A method (300) for calibrating a camera (100), the method (300) comprising the following steps:
Einlesen (305) eines Kamerarohbilds (115), wobei das Kamerarohbild (115) eine Mehrzahl von Pixeln aufweist, wobei jedes Pixel einen Grauwert aus einer Mehrzahl von Grauwerten (R+NIR) aufweist; Reading in (305) a raw camera image (115), the raw camera image (115) having a plurality of pixels, each pixel having a gray value from a plurality of gray values (R+NIR);
Vergleichen (315) einer ersten Menge von über einem Maximalgraugrenzwert (MaT) liegenden Grauwerten der Pixel mit einer ersten Häufigkeit (UbP); comparing (315) a first set of gray values of pixels above a maximum gray threshold (MaT) at a first frequency (UbP);
Einstellen (320) einer aktuellen Verstärkung (135) der Kamera (100) auf eine neue Verstärkung (140), wenn die erste Menge die erste Häufigkeit (UbP) überschreitet; adjusting (320) a current gain (135) of the camera (100) to a new gain (140) when the first amount exceeds the first frequency (UbP);
Vergleichen (325) einer zweiten Menge von über einem Minimalgraugrenzwert (MiT) liegenden Grauwerten der Pixel mit einer zweiten Häufigkeit (LbP), wenn die erste Menge die erste Häufigkeit (UbP) nicht überschreitet; comparing (325) a second set of gray values of pixels above a minimum gray threshold (MiT) at a second frequency (LbP) if the first set does not exceed the first frequency (UbP);
Beibehalten (330) der aktuellen Verstärkung (135) und einer aktuellen Belichtung (145) der Kamera (100), wenn die zweite Menge die zweite Häufigkeit (LbP) nicht unterschreitet; und maintaining (330) the current gain (135) and a current exposure (145) of the camera (100) if the second amount is not less than the second frequency (LbP); and
Einstellen (335) der aktuellen Belichtung (145) auf eine neue Belichtung (150), wenn die zweite Menge die zweite Häufigkeit (LbP) unterschreitet. Verfahren (300) gemäß Anspruch 1, mit einem Schritt (340) des Vergleichens ansprechend auf den Schritt (320) des Einstellens, wobei im Schritt (340) des Vergleichens die neue Verstärkung (140) mit einem Verstärkungsschwellenwert verglichen wird, Beibehalten (345) der neuen Verstärkung (140), wenn die neue Verstärkung (140) den Verstärkungsschwellenwert nicht unterschreitet oder Setzen (350) der neuen Verstärkung (140) auf den Verstärkungsschwellenwert und Einstellen (355) der aktuellen Belichtung (145) auf eine weitere neue Belichtung, wenn die neue Verstärkung (140) den Verstärkungsschwellenwert unterschreitet. Verfahren (300) gemäß Anspruch 2, mit einem Schritt (360) des Vergleichens ansprechend auf den Schritt (355) des Einstellens, wobei im Schritt (360) des Vergleichens die weitere neue Belichtung mit einem Belichtungsminimalschwellenwert verglichen wird, Beibehalten (365) der weiteren neuen Belichtung, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert nicht unterschreitet oder Setzen (370) der weiteren neuen Belichtung auf den Belichtungsminimalschwellenwert, wenn die weitere neue Belichtung den Belichtungsminimalschwellenwert unterschreitet. Verfahren (300) gemäß Anspruch 2 oder 3, bei dem im Schritt (355) des Einstellens die aktuelle Belichtung (145) unter Verwendung eines Korrekturfaktors nach unten auf die weitere neue Belichtung eingestellt wird. Verfahren (300) gemäß einem der vorangegangenen Ansprüche, mit einem Schritt (375) des Vergleichens ansprechend auf den Schritt (335) des Einstellens, wobei im Schritt (375) des Vergleichens die neue Belichtung (150) mit einem Belichtungsmaximalschwellenwert verglichen wird, Beibehalten (380) der neuen Belichtung (150), wenn die neue Belichtung (150) den Belichtungsmaximalschwellenwert nicht überschreitet oder Setzen (385) der neuen Belichtung (150) auf den Belichtungsmaximalschwellenwert und Einstellen (390) der aktuellen Verstärkung (135) auf eine weitere neue Verstärkung, wenn die neue Belichtung (150) den Belichtungsmaximalschwellenwert überschreitet. Verfahren (300) gemäß Anspruch 5, mit einem Schritt (392) des Vergleichens ansprechend auf den Schritt (390) des Einstellens, wobei im Schritt (392) des Vergleichens die weitere neue Verstärkung mit einem Verstärkungsmaximalschwellenwert verglichen wird, Beibehalten (395) der weiteren neue Verstärkung, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert nicht überschreitet oder Setzen (396) der weiteren neue Verstärkung auf den Verstärkungsmaximalschwellenwert, wenn die weitere neue Verstärkung den Verstärkungsmaximalschwellenwert überschreitet. Verfahren (300) gemäß Anspruch 5 oder 6, bei dem im Schritt (390) des Einstellens die aktuelle Verstärkung (135) unter Verwendung eines zweiten Korrekturfaktors nach oben auf die weitere neue Verstärkung eingestellt wird. Verfahren (300) gemäß einem der vorangegangenen Ansprüche, mit einem Schritt (397) des Erstellens eines Histogramms (200) über alle Grauwerte (R+NIR) der Pixel des Kamerarohbilds (115), und einem Schritt des Auslesens der ersten Menge und der zweiten Menge aus dem Histogramm (200). Verfahren (300) gemäß einem der vorangegangenen Ansprüche, mit einem Schritt (398) des Erfassens des Kamerarohbilds (115) unter Verwendung eines Bildsensors (110), der eine Mehrzahl von Rotpixeln (R) zum Sensieren der Grauwerte (R+NIR) aufweist. Verfahren (300) gemäß einem der vorangegangenen Ansprüche, bei dem im Schritt (320) des Einstellens die aktuelle Verstärkung (135) unter Verwendung eines Korrekturfaktors nach unten auf die neue Verstärkung (140) eingestellt wird, insbesondere wobei der Korrekturfaktor nach unten einen Wert von 20% nicht übersteigt. - 25 - Verfahren (300) gemäß Anspruch 10, bei dem im Schritt (320) des Einstellens die aktuelle Verstärkung (135) unter Verwendung des Korrekturfaktors nach unten auf die neue Verstärkung (140) eingestellt wird, wenn eine dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel eine Maximalüberbelichtungspixelmenge nicht überschreitet oder in einem weiteren Schritt (405) des Einstellens die aktuelle Verstärkung (135) unter Verwendung eines Maximalkorrekturfaktors nach unten auf eine andere neue Verstärkung eingestellt wird, wenn die dritte Menge von über dem Maximalgraugrenzwert liegenden Grauwerten der Pixel die Maximalüberbelichtungspixelmenge überschreitet, wobei der Maximalkorrekturfaktor nach unten größer ist als der Korrekturfaktor nach unten. Verfahren (300) gemäß einem der vorangegangenen Ansprüche, bei dem im Schritt (335) des Einstellens die aktuelle Belichtung (145) unter Verwendung eines Korrekturfaktors nach oben auf die neue Belichtung (150) eingestellt wird, insbesondere wobei der Korrekturfaktor nach oben einen Wert von 20% nicht übersteigt. Verfahren (300) gemäß Anspruch 12, mit einem Schritt (00) des Generierens des Korrekturfaktors nach oben unter Verwendung des Maximalgraugrenzwerts, des Minimalgraugrenzwerts und/oder einer dritten Häufigkeit höchster Grauwerte im Kamerarohbilds (115). Verfahren (300) gemäß einem der vorangegangenen Ansprüche, mit einem Schritt (399) des Empfangens eines weiteren Kamerarohbilds von der Kamera (100), wobei die Schritte (315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398, 400, 405, 410, 415, 420, 425) des Verfahrens (300) ansprechend auf den Schritt (399) des Empfangens unter Verwendung des weiteren Kamerarohbilds wiederholt durchgeführt werden. Verfahren (300) gemäß Anspruch 14, bei dem das im Schritt (399) des Empfangens empfangene weitere Kamerarohbild ein auf das - 26 - adjusting (335) the current exposure (145) to a new exposure (150) when the second quantity is less than the second frequency (LbP). The method (300) of claim 1, comprising a step (340) of comparing in response to the step (320) of adjusting, wherein in the step (340) of comparing the new gain (140) is compared to a gain threshold, maintaining (345) the new gain (140) if the new gain (140) is not less than the gain threshold or setting (350) the new gain (140) to the gain threshold and setting (355) the current exposure (145) to another new exposure if the new gain (140) falls below the gain threshold. The method (300) of claim 2, comprising a step (360) of comparing in response to the step (355) of adjusting, wherein in the step (360) of comparing the further new exposure is compared to an exposure minimum threshold, maintaining (365) the further new exposure if the further new exposure does not fall below the minimum exposure threshold or setting (370) the further new exposure to the minimum exposure threshold if the further new exposure falls below the minimum exposure threshold. The method (300) of claim 2 or 3, wherein in the step (355) of adjusting the current exposure (145) is adjusted down to the further new exposure using a correction factor. Method (300) according to one of the preceding claims, comprising a step (375) of comparing in response to the step (335) of adjusting, wherein in the step (375) of comparing the new exposure (150) is compared with an exposure maximum threshold value, Maintain ( 380) the new exposure (150) if the new exposure (150) does not exceed the maximum exposure threshold, or setting (385) the new exposure (150) to the maximum exposure threshold and adjusting (390) the current one Gain (135) to another new gain if the new exposure (150) exceeds the maximum exposure threshold. The method (300) of claim 5, comprising a step (392) of comparing in response to the step (390) of adjusting, wherein in the step (392) of comparing the further new gain is compared to a gain maximum threshold, maintaining (395) the further new gain if the further new gain does not exceed the gain maximum threshold or setting (396) the further new gain to the gain maximum threshold if the further new gain exceeds the gain maximum threshold. A method (300) according to claim 5 or 6, wherein in the step (390) of adjusting the current gain (135) is adjusted up to the further new gain using a second correction factor. Method (300) according to one of the preceding claims, with a step (397) of creating a histogram (200) over all gray values (R+NIR) of the pixels of the raw camera image (115), and a step of reading out the first set and the second Amount from histogram (200). Method (300) according to one of the preceding claims, with a step (398) of capturing the raw camera image (115) using an image sensor (110) which has a plurality of red pixels (R) for sensing the gray values (R+NIR). Method (300) according to one of the preceding claims, in which in the step (320) of adjusting the current gain (135) is adjusted downwards to the new gain (140) using a correction factor, in particular the correction factor downwards having a value of does not exceed 20%. - 25 - The method (300) of claim 10, wherein in the step (320) of adjusting the current gain (135) is adjusted down to the new gain (140) using the correction factor when a third amount of above the maximum gray threshold lying gray values of the pixels does not exceed a maximum overexposure pixel set or in a further step (405) of adjusting the current gain (135) is set down to another new gain using a maximum correction factor if the third set of gray values of the pixels lying above the maximum gray threshold value exceeds the maximum overexposure pixel amount, where the maximum downward correction factor is greater than the downward correction factor. Method (300) according to one of the preceding claims, in which in the step (335) of adjusting the current exposure (145) is adjusted upwards to the new exposure (150) using a correction factor, in particular wherein the correction factor upwards has a value of does not exceed 20%. A method (300) according to claim 12, comprising a step (00) of generating the correction factor upwards using the maximum gray threshold, the minimum gray threshold and/or a third frequency of highest gray values in the camera raw image (115). Method (300) according to one of the preceding claims, with a step (399) of receiving a further raw camera image from the camera (100), wherein the steps (315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398, 400, 405, 410, 415, 420, 425) of the method (300) in response to the step (399) of receiving be carried out repeatedly using the further raw camera image. Method (300) according to Claim 14, in which the further raw camera image received in the step (399) of receiving includes a - 26 -
Kamerarohbild (115) direkt folgendes Folgekamerarohbild der Kamera (100) oder ein nach einer definierten Folgezahl folgendes Folgekamerarohbild der Kamera (100) ist. 16. Vorrichtung (105) die eingerichtet ist, um die Schritte (305, 315, 320,camera raw image (115) directly following subsequent camera raw image of the camera (100) or a subsequent camera raw image of the camera (100) following a defined sequence number. 16. Device (105) which is set up to carry out the steps (305, 315, 320,
325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398, 399, 400, 405, 410, 415, 420, 425) des Verfahrens (300) gemäß einem der vorangegangenen Ansprüche in entsprechenden Einheiten (120, 125, 130) auszuführen und/oder anzusteuern. 325, 330, 335, 340, 345, 350, 355, 360, 365, 270, 375, 380, 385, 390, 392, 395, 396, 397, 398, 399, 400, 405, 410, 415, 420, 425) of the method (300) according to one of the preceding claims in corresponding units (120, 125, 130) to be executed and/or controlled.
17. Kamera (100) mit einer Vorrichtung (105) gemäß Anspruch 16 und einem Bildsensor (110) zum Erfassen des Kamerarohbilds (115). 17. Camera (100) with a device (105) according to claim 16 and an image sensor (110) for detecting the raw camera image (115).
EP21802222.6A 2020-12-07 2021-10-26 Method and apparatus for calibrating a camera and camera Pending EP4256777A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE102020215412.0A DE102020215412A1 (en) 2020-12-07 2020-12-07 Method and device for calibrating a camera and camera
PCT/EP2021/079651 WO2022122241A1 (en) 2020-12-07 2021-10-26 Method and apparatus for calibrating a camera and camera

Publications (1)

Publication Number Publication Date
EP4256777A1 true EP4256777A1 (en) 2023-10-11

Family

ID=78516771

Family Applications (1)

Application Number Title Priority Date Filing Date
EP21802222.6A Pending EP4256777A1 (en) 2020-12-07 2021-10-26 Method and apparatus for calibrating a camera and camera

Country Status (4)

Country Link
US (1) US20230334700A1 (en)
EP (1) EP4256777A1 (en)
DE (1) DE102020215412A1 (en)
WO (1) WO2022122241A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6906745B1 (en) * 1998-04-23 2005-06-14 Micron Technology, Inc. Digital exposure circuit for an image sensor
US7176976B2 (en) * 2001-08-30 2007-02-13 Lightsurf Technologies, Inc. Autoexposure methodology in a digital camera
US7538801B2 (en) * 2003-09-15 2009-05-26 Micron Technology, Inc. Region-based auto gain control and auto exposure control method and apparatus
US8982238B2 (en) 2013-07-02 2015-03-17 Omnivision Technologies, Inc. Multi-target automatic exposure and gain control based on pixel intensity distribution
JP6750621B2 (en) * 2015-06-26 2020-09-02 ソニー株式会社 Inspection device, sensing device, sensitivity control device, inspection method, and program
US10630901B2 (en) 2017-05-23 2020-04-21 Google Llc Systems and methods for selectively activating high dynamic range in a video capture system

Also Published As

Publication number Publication date
WO2022122241A1 (en) 2022-06-16
US20230334700A1 (en) 2023-10-19
DE102020215412A1 (en) 2022-06-09

Similar Documents

Publication Publication Date Title
DE69836540T2 (en) METHOD AND DEVICE FOR CARRYING OUT IMAGE IMPROVEMENTS
DE10324693B4 (en) Automatic image signal amplification device for an electronic endoscope
DE112008001990B4 (en) Exposure control for an imaging system
DE102012103670A1 (en) Portable electronic device with camera function and image acquisition method with auto exposure control
DE102004007649A1 (en) System and method for analyzing a digital image
DE112017005193T5 (en) Image processing apparatus, image processing method and image pickup apparatus
DE102012201696A1 (en) Image processing apparatus, associated control method, program and recording medium
DE112007001808T5 (en) Electronic image capture with reduced noise
DE102012010912B3 (en) A method for contactless determination of the current nutritional status of a crop and for processing this information
DE60221122T2 (en) AUTOMATIC FOCUSING PROCESS WHICH IS SENSITIVE TO THE SCENE LIGHTING LEVEL
DE60312575T2 (en) Electronic camera using previous image capture settings for current image capture
DE102014211039B4 (en) Imaging device, image processing device and associated control method
DE102007022957A1 (en) Endoscope processor, computer program product and endoscope system
DE102004032921B4 (en) Electronic endoscope device
EP3844943B1 (en) Method for displaying a model of an environment, control apparatus and vehicle
DE102014224638A1 (en) Digital imaging system and method for error correction in such a system
EP4256777A1 (en) Method and apparatus for calibrating a camera and camera
DE102014102011B4 (en) System and method for generating an image with a wide dynamic range
EP1252757A2 (en) Method and device for modifying the color intensity of electronically acquired images
WO2022122240A1 (en) Method and device for detecting a false plant image in a raw camera photo, and photo-processing apparatus
DE3009507A1 (en) AUTOMATIC EXPOSURE CONTROL DEVICE FOR A TELEVISION CAMERA
EP1588554B1 (en) Method for adjusting an image sensor
DE102004007990B4 (en) Focus detection device
DE102013209164B4 (en) Digital film camera
DE4117325A1 (en) AUTOMATIC GAIN CONTROL DEVICE FOR A VIDEO CAMERA

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: UNKNOWN

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20230707

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN