Airport runway foreign matter self-adaptive focusing method based on scene perception
By performing magnification calculation and focal length calibration on the optical camera, combined with runway area segmentation algorithm and image quality coefficient calculation, adaptive focusing of the airport runway foreign object detection system was realized, solving the problem of inaccurate focusing in traditional methods and improving image clarity and foreign object recognition rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING LES ELECTRONICS EQUIP CO LTD
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-17
AI Technical Summary
In airport runway foreign object detection, existing technologies often suffer from focusing hesitation, repeated searches, or failures in complex environments, resulting in blurred images. Furthermore, background interference may cause the focus to be incorrectly directed to non-runway areas, further obscuring the foreign object and affecting the accuracy of identification.
By performing magnification calculations and focal length calibration on the optical camera, the runway area is extracted, video image data is collected, and the focal length is adjusted in real time to determine the optimal focusing distance. Adaptive focusing is achieved using scene-aware methods.
It achieves fast, stable, and accurate focusing in various scenarios, ensuring clear images of the runway area and clear visibility of foreign objects, thus improving the accuracy and reliability of foreign object identification.
Smart Images

Figure CN121888091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an adaptive focusing method for foreign objects on airport runways, and more particularly to an adaptive focusing method for foreign objects on airport runways based on scene awareness. Background Technology
[0002] This section provides only background information relevant to this disclosure and is not necessarily prior art.
[0003] Foreign objects (FODs) on airport runways are a significant threat to aircraft takeoff and landing safety. Currently, automated detection systems based on optical imaging are the primary technology for detecting and identifying FODs. These systems are typically deployed around the runway, using telephoto lenses to scan and monitor the extensive runway area for evidence collection.
[0004] In practical applications, runway environments are complex and variable, with varying lighting and weather conditions such as day-night cycles, rain, snow, fog, and haze. Cameras also need to zoom in to cover detection needs at different distances. Traditional autofocus methods, such as contrast detection or phase detection, are prone to focusing hesitation, repeated searches, or even focus failures in large areas like runways where texture features are sometimes indistinct. This results in blurred images and severely impacts the accuracy of subsequent foreign object identification.
[0005] Furthermore, the runway scene includes various areas such as the runway surface, grass, and background buildings, but the system is truly concerned with focusing on the runway itself. If the entire image is evaluated for focus, background interference may cause the focusing system to incorrectly focus on non-runway areas, making foreign objects on the runway appear blurred.
[0006] Therefore, existing technologies lack a method that can intelligently sense key areas of the runway in a scene and achieve fast, stable, and accurate focusing within these areas to meet the stringent requirements of airport runway foreign object detection systems for high reliability and high-definition evidence collection.
[0007] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0008] Purpose of the invention: The technical problem to be solved by the present invention is to provide an adaptive focusing method for foreign objects on airport runways based on scene awareness, which addresses the shortcomings of the existing technology.
[0009] To address the aforementioned technical problems, this invention discloses a scene-aware adaptive focusing method for foreign objects on airport runways, comprising the following steps:
[0010] Step 1: Calculate the magnification and calibrate the focal length of the optical camera used for foreign object detection on airport runways;
[0011] Step 2: Set the evidence collection magnification and the corresponding initial focal length based on the distance between the foreign object in the runway and the optical camera, and extract the runway area from the image;
[0012] Step 3: Acquire video image data from the optical camera and calculate the image quality coefficient of the runway area;
[0013] Step 4: Drive the optical camera lens to adjust the focal length in increments and decrements according to the preset step size, calculate the mass coefficient of the runway area at each focal length in real time, determine the optimal focusing distance corresponding to the maximum mass coefficient, and drive the camera to switch to that focusing distance to complete the scene-aware adaptive focusing of foreign objects on the airport runway.
[0014] Furthermore, the magnification calculation and focal length calibration of the optical camera used for foreign object detection on airport runways, as described in step 1, includes:
[0015] Based on the coverage of the optical camera used for foreign object detection on airport runways, the maximum and minimum zoom values required for foreign object evidence collection are calculated. The zoom values are adjusted and the focal length is manually adjusted to make the image acquired by the optical camera clear. The focal length value corresponding to each zoom value is obtained, and the calibration of all magnifications within the entire zoom range is completed.
[0016] Furthermore, the magnification calculation and focal length calibration of the optical camera used for foreign object detection on airport runways, as described in step 1, specifically includes:
[0017] Step 1-1: Use differential GPS to measure the location of the optical camera, and simultaneously measure the farthest and closest points of the runway area to be covered by the optical camera, obtaining the coordinate information of these three locations; where, let the latitude and longitude coordinates of the optical camera be ( , The coordinates of the closest and farthest points of the runway from the camera are respectively ( , )and( , ), Represents latitude information. Represents longitude information;
[0018] Step 1-2: Calculate the distances from the nearest and farthest points to the camera using the three coordinate information obtained in Step 1-1. and The specific method is as follows:
[0019] )
[0020] )
[0021] in, The radius is the Earth's radius.
[0022] Steps 1-3: Based on the distance calculated in Steps 1-2, calculate the maximum magnification for evidence collection using the optical camera. and minimum multiple The specific method is as follows:
[0023]
[0024]
[0025] in, The threshold for the pixel width of the foreign object in the image. For the physical width of the CMOS sensor in an optical camera, The width of the video image from the optical camera. The physical width threshold of the foreign object. This is the minimum focal length threshold for an optical camera. It is a rounding function;
[0026] Steps 1-4 are based on the minimum multiple calculated in steps 1-3. Accumulate in increments of 1, drive the optical camera to zoom, and manually adjust the focus distance of the optical camera until the image is clear, until the zoom reaches the maximum magnification calculated in steps 1-3. stop;
[0027] Steps 1-5: Record the focus distance values corresponding to each multiplier in steps 1-4 to complete the calibration of the optical camera.
[0028] Furthermore, step 2, which involves setting the evidence magnification and corresponding initial focal length based on the distance between the foreign object in the runway and the optical camera, specifically includes:
[0029] Based on the distance between the foreign object in the runway and the optical camera Calculate the evidence collection ratio The details are as follows:
[0030]
[0031] Based on the evidence collection ratio Query the calibration value in step 1 to obtain the evidence collection multiplier. Corresponding initial focal length value .
[0032] Furthermore, step 2, which involves extracting the runway region from the image, includes:
[0033] Step 2-1, based on the evidence collection multiplier and initial focal length value The optical camera is driven to acquire video images (img), which are then converted to color space and transformed to LAB space to obtain the image (img_lab).
[0034] Step 2-2: Use the K-Means clustering method to segment the image img_lab from step 2-1 to obtain the image img_kmeans;
[0035] Step 2-3: Query the pixel value at the bottom center of the image img_kmeans in step 2-2, and set the pixel values of the positions in img_kmeans that have the same pixel value to 255, and set the values of the positions that have different pixel values to 0, to obtain the binary image img_bina;
[0036] Steps 2-4: Expand the binary image img_bina from step 2-3 outward by a preset number of pixels, and then erode it inward by a preset number of pixels to obtain the final image img_final.
[0037] Steps 2-5: Based on the contour search method, the runway region of the final image img_final from Step 2-4 is detected and located to obtain the runway region rect_runway of the image.
[0038] Furthermore, the calculation of the image quality coefficient for the runway area in step 3 includes:
[0039] Step 3-1: Capture the real-time video stream from the optical camera and obtain the camera image data img_cammer;
[0040] Step 3-2: Convert the camera image data img_cammer from step 3-1 into a grayscale image img_gray;
[0041] Step 3-3: Use the Gaussian filter function to filter the grayscale image img_gray from step 3-2 to remove noise and obtain the image img_gray_blur.
[0042] Step 3-4: Based on the runway region rect_runway extracted in step 2, the image img_gray_blur in step 3-3 is segmented to obtain the runway region image img_gray_blur_runway.
[0043] Step 3-5: Use the Tenengrad function to calculate the image quality coefficient of the runway region image img_gray_blur_runway in step 3-4.
[0044] Furthermore, step 4, determining the optimal focusing distance corresponding to the maximum quality coefficient, includes:
[0045] Step 4-1, using the initial focal length set in Step 2. Based on the set step size The focus distance is increased incrementally, as shown below:
[0046]
[0047] in, To accumulate the number of times, This is the focus distance after the nth accumulation.
[0048] Step 4-2, based on the focus distance accumulated in step 4-1 for the nth time. Drive the camera to acquire image data img_n from the optical camera;
[0049] Step 4-3: Calculate the image quality coefficient for the image data img_n from step 4-2 according to step 3, and record it as... ;
[0050] Step 4-4: Calculate the image quality coefficients obtained in Step 4-3. Quality coefficient corresponding to the focusing distance of the previous focal length The comparison is performed, and the quality decrease factor m is calculated. The specific method is as follows:
[0051]
[0052] Step 4-5, when the quality reduction factor in step 4-4 If the image quality degrade factor is greater than or equal to the set threshold, then stop driving the camera operation and record the current focus distance and its corresponding image quality factor Map_Cammer.
[0053] Steps 4-6, using the initial focal length set in step 2. Based on the set step size The focusing distance decreases progressively, as shown below:
[0054]
[0055] Step 4-7: Based on the focal length value calculated in step 4-6, repeat steps 4-3 to 4-5;
[0056] Steps 4-8: Find the focus distance (focus_max) corresponding to the largest image quality coefficient in the Map_Cammer of all recorded image quality coefficients;
[0057] Steps 4-9: Based on the focus distance focus_max obtained in step 4-8, drive the optical camera to achieve focus.
[0058] Furthermore, the pixel width threshold of the foreign object in the image mentioned in steps 1-3 The value is 15, representing the physical width of the optical camera's CMOS sensor. The value is 7.2, representing the width of the optical camera video image. The value is 2688, which is the physical width threshold of the foreign object. A value of 2 represents the minimum focal length threshold for an optical camera. The value is 6.6;
[0059] The step size mentioned in step 4-1 The value is 100, and the threshold value of the quality decrease coefficient mentioned in step 4-4 is 3.
[0060] Beneficial effects:
[0061] This invention solves the problem that optical cameras used for detecting foreign objects (FOOs) on airport runways are easily affected by environmental factors, leading to focusing hesitation, repeated searches, and even focusing failures, resulting in blurred images. It also addresses the issue where background interference causes the focusing system to incorrectly focus on non-runway areas, making FEOs on the runway appear blurry. First, based on the coverage area of the optical camera in the airport runway FEO detection system, the maximum and minimum zoom values required for FEO detection are calculated. The focusing distance is manually adjusted to achieve a clear overall image, and the focusing distance values corresponding to each zoom level are obtained, completing the calibration of all zoom levels within the entire zoom range. During system operation, the camera's detection zoom level and corresponding initial focusing distance are set according to the FEO detection distance, and the runway area is accurately extracted from the image using a runway area segmentation algorithm. After acquiring camera video image data, the image quality coefficient of the runway area is calculated based on the Tenengrad function. Subsequently, the control system drives the camera lens to adjust the focusing distance in increments and decrements according to a preset step size. It calculates the quality coefficient of the runway area at each focusing distance in real time, determines the optimal focusing distance corresponding to the maximum quality coefficient, and drives the camera to switch to that focusing distance. This allows for the acquisition of a clear image most conducive to runway foreign object identification in the current scenario. The invention has undergone performance testing in various scenarios, demonstrating accurate focusing of evidence-gathering images in environments such as darkness and strong light. Each focusing time is 5 seconds, and the runway area image texture is clear, with foreign objects clearly visible, fully verifying the effectiveness of the invention. Attached Figure Description
[0062] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0063] Figure 1 This is a schematic diagram of the system flow of the present invention.
[0064] Figure 2 This is a diagram illustrating the runway segmentation effect of the present invention.
[0065] Figure 3 This is a flowchart of the image quality detection process of the present invention.
[0066] Figure 4 This is a flowchart illustrating the principle of finding the optimal focusing distance in this invention.
[0067] Figure 5a This is a diagram showing the effect before focusing using the method of the present invention in this embodiment.
[0068] Figure 5b This is a diagram showing the effect of focusing using the method of the present invention in the embodiment. Detailed Implementation
[0069] This invention discloses an optical method for detecting foreign objects on airport runways, comprising the following steps:
[0070] Step 1: Based on the coverage of the optical camera in the airport runway foreign object detection system, calculate the maximum and minimum zoom values required for foreign object evidence collection. Manually adjust the focus distance to make the overall image clear, obtain the focus distance value corresponding to each zoom level, and complete the calibration of all zoom levels within the entire zoom range.
[0071] Step 1 includes:
[0072] Step 1-1: Use differential GPS to measure the location of the optical camera, and simultaneously measure the farthest and closest points of the runway area to be covered by the optical camera, obtaining the location information of the three points. The latitude and longitude coordinates of the optical camera are (…). , The locations of the closest and farthest points of the runway from the camera are respectively ( , )and( , ), la represents latitude information, and lon represents longitude information.
[0073] Step 1-2: Calculate the distances dis_l and dis_s between the nearest and farthest points and the camera, based on the three coordinate information obtained in Step 1-1. The specific method is as follows:
[0074] )
[0075] )
[0076] Where R is the Earth's radius.
[0077] Steps 1-3 involve substituting the distances calculated in Steps 1-2 into the calculation of the maximum and minimum magnification for optical camera evidence collection. The specific method is as follows:
[0078]
[0079] in, The threshold for the pixel width of the foreign object in the image. For the physical width of the camera CMOS sensor, Width of the camera video image The physical width threshold of the foreign object. Here, `dis` represents the minimum focal length threshold for the camera, and `dis` is the distance to the optical camera. When `dis = dis_l`, it represents the maximum zoom factor `zoom_max`, and when `dis = dis_s`, it represents the minimum zoom factor `zoom_min`. It is a rounding function;
[0080] Steps 1-4: Based on the minimum zoom value zoom_min calculated in steps 1-3, the camera zooms in increments of 1, and the camera's focus distance is manually adjusted until the image is clear, until the zoom reaches the maximum zoom value zoom_max calculated in steps 1-3 and stops.
[0081] Steps 1-5: Record the focus distance values corresponding to each multiplier in steps 1-4 to complete the calibration of the optical camera.
[0082] Step 2: During system operation, the camera's evidence collection magnification and corresponding initial focus distance are set according to the distance at which the foreign object is detected, and the runway region segmentation algorithm is used to accurately extract the runway region in the image.
[0083] Step 2 includes:
[0084] Step 2-1: Obtain the distance information dis of the foreign object, and calculate the zoom value of the driving camera based on Step 1-3;
[0085] Step 2-2: Based on the zoom value in Step 2-1, query the corresponding focus distance value calibrated in Step 1-5 and drive the camera;
[0086] Step 2-3: Obtain the video image img from the camera that was driven in Step 2-2, perform color space conversion, transform it to LAB space, and obtain the image img_lab;
[0087] Steps 2-4: Use K-Means to segment img_lab in Steps 2-3 (Liu Zhenwen, He Peng. Compositional Analysis and Identification of Glass Artifacts Based on Random Forest and K-means++ [J]. Journal of Changchun University of Technology, 2025, 46(06): 545-551) to obtain the image img_kmeans;
[0088] Step 2-5: Query the pixel value at the bottom center of img_kmeans in step 2-4, and set the pixel values of the positions in img_kmeans that have the same pixel value to 255, and set the values of the different positions to 0, to obtain the binary image img_bina;
[0089] Steps 2-6: Expand img_bina from step 2-5 outward by n pixels and then erode inward by n pixels to obtain image img_final;
[0090] Steps 2-7: Based on contour lookup, the img_final runway region from Step 2-6 is detected and located to obtain the runway region rect_runway of the image.
[0091] Step 3: After acquiring camera video image data, calculate the image quality coefficient of the runway area based on the Tenengrad function;
[0092] Step 3 includes:
[0093] Step 3-1: Use ffmpeg to capture the real-time video stream from the front-end camera and obtain the camera image data img_cammer;
[0094] Step 3-2: Convert img_cammer from step 3-1 to a grayscale image img_gray;
[0095] Step 3-3: Use the Gaussian filter function to filter the img_gray image from step 3-2 to remove noise and obtain the image img_gray_blur.
[0096] Step 3-4: Based on the runway region rect_runway extracted in step 2-7, segment img_gray_blur in step 3-3 to obtain img_gray_blur_runway;
[0097] Steps 3-5: Use the Tenengrad function (Zhang Qing. Research on Image Sensor Control Software System and Autofocus Algorithm [D]. Huazhong University of Science and Technology, 2022) to calculate the image quality coefficient of img_gray_blur_runway in steps 3-4.
[0098] Step 4: The control system drives the camera lens to adjust the focus distance in increments and decrements according to a preset step size. It calculates the quality coefficient of the runway area at each focus distance in real time, determines the optimal focus distance corresponding to the maximum quality coefficient, and drives the camera to switch to that focus distance, thereby obtaining a clear image that is most conducive to the identification of foreign objects on the runway in the current scene.
[0099] Step 4 includes:
[0100] Step 4-1: Using the focus distance set in Step 2-2 as a reference, gradually increase the focus distance in increments of a set step size (df). The specific method is as follows:
[0101]
[0102] in To accumulate the number of times, This is the focus distance after the nth accumulation.
[0103] Step 4-2, based on step 4-1 Drive the camera to acquire image data img_n from the optical camera;
[0104] Step 4-3: Calculate the image quality coefficient for img_n from step 4-2 according to step 3. ;
[0105] Step 4-4, take the contents of step 4-3 Quality coefficient corresponding to the previous focal length distance The comparison is performed, and the quality decrease factor m is calculated. The specific method is as follows:
[0106]
[0107] Step 4-5: When m>=m_val in step 4-4, where m_val is the set quality reduction coefficient threshold, stop changing the focus distance to drive camera operation, and record the focus distance and its corresponding image quality coefficient Map_Cammer.
[0108] Steps 4-6: Using the focus distance set in step 2-2 as a reference, decrease the focus distance step by step according to the set step size df. The specific method is as follows:
[0109]
[0110] Step 4-7: Based on the focal length value calculated in step 4-6, repeat steps 4-3, 4-4, and 4-5.
[0111] Step 4-8: Query the focus distance focus_max corresponding to the largest image quality coefficient in Map_Cammer in Step 4-5;
[0112] Steps 4-9: Based on the focus_max obtained in step 4-8, drive the optical camera to obtain the optimal foreign object evidence image.
[0113] Example:
[0114] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0115] This embodiment proposes a scene-aware adaptive focusing method for foreign objects on an airport runway, based on a specific airport runway scenario. Figure 1 As shown, it includes the following steps:
[0116] S1: Airport runway foreign object optical camera calibration:
[0117] Calibration of the airport runway foreign object detection (FOD) optical camera is a prerequisite for adaptive focusing of FOD on the airport runway. Only after completing the initial optical camera calibration and finding the corresponding distance multipliers and focusing distance values can a benchmark be provided for subsequent adaptive focusing for FOD evidence collection. Differential GPS is used to measure the location of the optical camera, and at the same time, the positions of the farthest and nearest points of the runway area to be covered by the optical camera are measured. The distances from the nearest and farthest points to the camera are calculated. Generally, FOD detection equipment is installed on the runway edge, with a maximum detection distance of 60m and a minimum detection distance of 1.5m.
[0118] Then, substituting the maximum and minimum multiples within the distance calculation coverage area, the core formula is:
[0119]
[0120] Based on the selected camera parameters, and setting the minimum target size to 2cm, This is the pixel width threshold for foreign objects in the image, with a value of 15. The physical width of the camera CMOS sensor is 7.1mm. This represents the width of the camera video image, with a value of 2688. The physical width threshold for the foreign object is set to 2cm. This is the minimum focal length threshold for the camera, set to 6.6mm. The distance between the foreign object and the camera, when = At this point, the maximum multiplier is calculated as 36 times. = When m is the minimum magnification value, it is calculated as 1x. Using the minimum magnification as the initial value, and driving the adjustment in steps of 1, manually adjust the camera's focus distance until the image is clear, and stop when the magnification reaches the maximum value. Record the focus distance values corresponding to each magnification to complete the camera calibration.
[0121] S2: Runway area division:
[0122] Runway region segmentation is the localization of the foreign object adaptive focusing area on airport runways. First, based on the distance information of the foreign object, the driving magnification value for the camera is calculated. Based on this magnification value, the corresponding calibrated focusing distance value is retrieved to drive the camera and acquire camera image data. Then, the image undergoes color space conversion to Lab color space. K-Means is used to segment the Lab space image. Next, the pixel value at the bottom center is used for abrupt switching, and the segmented image is binarized to obtain a binary image. Dilation and erosion processing is then applied to the binary image. Finally, based on contour finding, the runway region is located, achieving runway region segmentation. The specific effect is shown below. Figure 2 As shown.
[0123] S3: Image Quality Assessment
[0124] Image quality assessment is a criterion for judging the focus effect of an image. First, ffmpeg is used to capture the real-time video stream from the front-end camera to obtain camera image data. The images are then converted to grayscale and filtered using a Gaussian filter to remove noise. Next, based on the extracted runway region, the image is segmented and extracted. Finally, the Tenengrad function is used to calculate the quality assessment coefficient of the segmented and extracted image. The specific process is as follows: Figure 3 As shown.
[0125] S4: Find the optimal focusing distance:
[0126] Finding the optimal focusing distance is the ultimate goal of adaptive focusing for foreign object detection on airport runways. Taking a foreign object retrieval operation as an example, with a magnification setting of 7x, the focusing distance is first accumulated step-by-step using a calibrated focusing distance of 9198 as a baseline. The core formula is:
[0127]
[0128] in To accumulate the number of times, The focus distance after the nth accumulation is... This is the step size, typically set to 100. This is the calibrated reference focus distance. The camera acquires image data, calculates the image quality coefficient corresponding to the current focus distance, and then compares the image quality coefficient for the current focus distance with the previous one. The core formula is as follows:
[0129]
[0130] Where m is the quality reduction factor. When the quality reduction factor meets the set threshold, the focus distance increment operation stops, and then the focus distance is decremented. The core formula is:
[0131]
[0132] in To decrease the number of times, The focus distance after the nth decrease. Step size, To establish a baseline focus distance, the camera is driven to repeat the comparison steps described above. In actual testing, the comparison is repeated 5 times and then 4 times to meet the stopping condition. The image quality coefficients corresponding to different focus distances are recorded. The focus distance corresponding to the highest image quality coefficient is the optimal focus distance at the current magnification. In actual testing, the focus distance corresponding to the highest image quality coefficient was 9398. The camera was driven to acquire clear images of foreign object debris on the airport runway using this focus distance. The overall process is as follows: Figure 4 As shown, the effect before focusing at the reference focus distance of 9198 is as follows. Figure 5a The autofocus distance obtained by this method is 9398, and the focusing effect is as follows: Figure 5b As shown.
[0133] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a scene-aware adaptive focusing method for foreign objects on airport runways, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0134] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MCU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0135] This invention provides a concept and method for scene-aware adaptive focusing of foreign objects on airport runways. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A scene-aware adaptive focusing method for foreign objects on airport runways, characterized in that, Includes the following steps: Step 1: Calculate the magnification and calibrate the focal length of the optical camera used for foreign object detection on airport runways; Step 2: Set the evidence collection magnification and the corresponding initial focal length based on the distance between the foreign object in the runway and the optical camera, and extract the runway area from the image; Step 3: Acquire video image data from the optical camera and calculate the image quality coefficient of the runway area; Step 4: Drive the optical camera lens to adjust the focal length in increments and decrements according to the preset step size, calculate the mass coefficient of the runway area at each focal length in real time, determine the optimal focusing distance corresponding to the maximum mass coefficient, and drive the camera to switch to that focusing distance to complete the scene-aware adaptive focusing of foreign objects on the airport runway.
2. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 1, characterized in that, Step 1, which involves calculating the magnification and calibrating the focal length of the optical camera used for foreign object detection on airport runways, includes: Based on the coverage of the optical camera used for foreign object detection on airport runways, the maximum and minimum zoom values required for foreign object evidence collection are calculated. The zoom values are adjusted and the focal length is manually adjusted to make the image acquired by the optical camera clear. The focal length value corresponding to each zoom value is obtained, and the calibration of all magnifications within the entire zoom range is completed.
3. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 2, characterized in that, Step 1, which involves calculating the magnification and calibrating the focal length of the optical camera used for foreign object detection on airport runways, specifically includes: Step 1-1: Use differential GPS to measure the location of the optical camera, and at the same time measure the farthest and closest points of the runway area to be covered by the optical camera from the camera, and obtain the coordinate information of the three locations. Step 1-2: Calculate the distances from the nearest and farthest points to the camera using the three coordinate information obtained in Step 1-1. and ; Steps 1-3: Based on the distance calculated in Steps 1-2, calculate the maximum magnification for evidence collection using the optical camera. and minimum multiple The specific method is as follows: in, The threshold for the pixel width of the foreign object in the image. For the physical width of the CMOS sensor in an optical camera, The width of the video image from the optical camera. The physical width threshold of the foreign object. This is the minimum focal length threshold for an optical camera. It is a rounding function; Steps 1-4 are based on the minimum multiple calculated in steps 1-3. Accumulate in increments of 1, drive the optical camera to zoom, and manually adjust the focus distance of the optical camera until the image is clear, until the zoom reaches the maximum magnification calculated in steps 1-3. stop; Steps 1-5: Record the focus distance values corresponding to each multiplier in steps 1-4 to complete the calibration of the optical camera.
4. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 3, characterized in that, Step 2, which involves setting the evidence magnification and corresponding initial focal length based on the distance between the foreign object in the runway and the optical camera, specifically includes: Based on the distance between the foreign object in the runway and the optical camera Calculate the evidence collection ratio The details are as follows: Based on the evidence collection ratio Query the calibration value in step 1 to obtain the evidence collection multiplier. Corresponding initial focal length value .
5. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 4, characterized in that, Step 2, which involves extracting the runway region from the image, includes: Step 2-1, based on the evidence collection multiplier and initial focal length value The optical camera is driven to acquire video images (img), which are then converted to color space and transformed to LAB space to obtain the image (img_lab). Step 2-2: Use the K-Means clustering method to segment the image img_lab from step 2-1 to obtain the image img_kmeans; Step 2-3: Query the pixel value at the bottom center of the image img_kmeans in step 2-2, and set the pixel values of the positions in img_kmeans that have the same pixel value to 255, and set the values of the different positions to 0, to obtain the binary image img_bina; Steps 2-4: Expand the binary image img_bina from step 2-3 outward by a preset number of pixels, and then erode it inward by a preset number of pixels to obtain the final image img_final. Steps 2-5: Based on the contour search method, the runway region of the final image img_final from Step 2-4 is detected and located to obtain the runway region rect_runway of the image.
6. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 5, characterized in that, Step 3, which involves calculating the image quality coefficient of the runway area, includes: Step 3-1: Capture the real-time video stream from the optical camera and obtain the camera image data img_cammer; Step 3-2: Convert the camera image data img_cammer from step 3-1 into a grayscale image img_gray; Step 3-3: Use the Gaussian filter function to filter the grayscale image img_gray from step 3-2 to remove noise and obtain the image img_gray_blur. Step 3-4: Based on the runway region rect_runway extracted in step 2, the image img_gray_blur in step 3-3 is segmented to obtain the runway region image img_gray_blur_runway. Step 3-5: Use the Tenengrad function to calculate the image quality coefficient of the runway region image img_gray_blur_runway in step 3-4.
7. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 6, characterized in that, Step 4, which involves determining the optimal focusing distance corresponding to the maximum quality coefficient, includes: Step 4-1, using the initial focal length set in Step 2. Based on the set step size The focus distance is increased incrementally, as shown below: in, To accumulate the number of times, This is the focus distance after the nth accumulation. Step 4-2, based on the focus distance accumulated in step 4-1 for the nth time. Drive the camera to acquire image data img_n from the optical camera; Step 4-3: Calculate the image quality coefficient for the image data img_n from step 4-2 according to step 3, and record it as... ; Step 4-4: Calculate the image quality coefficients obtained in Step 4-3. Quality coefficient corresponding to the focusing distance of the previous focal length Compare the samples and calculate the quality decrease factor m. Step 4-5, when the quality reduction factor in step 4-4 If the image quality degrade factor is greater than or equal to the set threshold, then stop driving the camera operation and record the current focus distance and its corresponding image quality factor Map_Cammer. Steps 4-6, using the initial focal length set in step 2. Based on the set step size The focusing distance decreases progressively, as shown below: Step 4-7: Based on the focal length value calculated in step 4-6, repeat steps 4-3 to 4-5; Steps 4-8: Find the focus distance (focus_max) corresponding to the largest image quality coefficient in the Map_Cammer of all recorded image quality coefficients; Steps 4-9: Based on the focus distance focus_max obtained in step 4-8, drive the optical camera to achieve focus.
8. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 7, characterized in that, The specific method for calculating the mass reduction factor m in step 4-4 is as follows; 。 9. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 8, characterized in that, The pixel width threshold of the foreign object in the image mentioned in steps 1-3 The value is 15, representing the physical width of the optical camera's CMOS sensor. The value is 7.2, representing the width of the optical camera video image. The value is 2688, which is the physical width threshold of the foreign object. A value of 2 represents the minimum focal length threshold for an optical camera. The value is 6.
6.
10. The scene-aware adaptive focusing method for foreign objects on airport runways according to claim 9, characterized in that, The step size mentioned in step 4-1 The value is 100, and the threshold value of the quality decrease coefficient mentioned in step 4-4 is 3.