An image recognition method for a port intermodal terminal site

By adaptively adjusting the enhancement scale and structure preservation factor of the Retinex algorithm, the problems of misjudgment of primary and secondary structures and edge continuity in image enhancement under strong interference at night in the port area are solved, and the robustness and accuracy of image recognition are improved.

CN120912489BActive Publication Date: 2026-06-26JINING GANGHANG LONGGONG PORT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINING GANGHANG LONGGONG PORT CO LTD
Filing Date
2025-08-04
Publication Date
2026-06-26

Smart Images

  • Figure CN120912489B_ABST
    Figure CN120912489B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image enhancement, and particularly relates to an image recognition method for a port intermodal terminal site, which obtains a target image of the port intermodal terminal site; structural edge analysis is performed on each pixel point in the target image, and analysis of brightness value difference and grayscale value difference in a local range of each pixel point is performed, an enhancement scale control optimization factor is obtained, an optimal multi-scale parameter combination is adaptively obtained according to the enhancement scale control optimization factor, and an initial enhanced image is obtained; a structure retention optimization factor of each pixel point in the initial enhanced image is obtained, an enhancement intensity adjustment weight of each pixel point is obtained, compensation fusion of the brightness value of each pixel point is performed by using the enhancement intensity adjustment weight, a final brightness value is obtained, a final enhanced image is obtained, and an image recognition task of the port intermodal terminal site is performed according to the final enhanced image, and the image enhancement effect is improved by fully fusing the image structure perception and the enhancement parameter control dual strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image enhancement technology, and in particular to an image recognition method for port intermodal transport sites. Background Technology

[0002] In port cargo handling operations, image acquisition and recognition technology has become a key component of intelligent port management. Especially in nighttime operations, tasks such as automatic vehicle identification, container tracking, and scene structure perception place higher demands on image quality. However, in practical applications, due to the complex nighttime lighting environment, port image acquisition often faces strong non-uniform illumination interference. Particularly under the interference of high-brightness light sources such as truck headlights and large spotlights, images are prone to problems such as saturation of strong light areas, underexposure of background areas, and obscuring or falsely excitation of structural edges. This leads to unbalanced image contrast and severe structural breaks, seriously affecting the stability and accuracy of image enhancement and subsequent recognition tasks.

[0003] Existing image enhancement methods, especially multi-scale brightness restoration algorithms based on the Retinex model, can improve the overall brightness and local details of images to some extent. However, their enhancement mechanisms generally lack adaptive control over the image's structural content. In areas dominated by strong light interference, the Retinex algorithm often prioritizes enhancing bright pseudo-edges, thereby suppressing true structural boundaries and even causing preferential activation of edge pseudo-structures. Furthermore, since Retinex enhancement mainly relies on pixel brightness gradients for filtering and reconstruction, in structurally complex regions (such as characters, contours, and regular object boundaries), the enhancement results easily disrupt structural continuity, leading to phenomena such as broken edge responses, distorted texture strokes, and discontinuous shapes. This imbalance in enhancement not only impairs image readability but also directly affects the recognition performance of subsequent deep learning-based or traditional vision algorithms.

[0004] Furthermore, in scenarios where the image structure is severely damaged or the boundary features are discontinuous, existing enhancement techniques lack optimization mechanisms for the entire process of "enhancement scale control, structure preservation, and recognition adaptation." They often process the image using only a single filtering scale or uniform enhancement parameters, ignoring the different requirements of different regions (such as specular disturbance areas, structural edge areas, and weak texture transition areas) for enhancement strategies. They cannot adaptively adjust according to the actual structural distribution and response characteristics of the image, resulting in enhancement results that fail to maintain structural fidelity globally and are prone to structural fragmentation and pseudo-response manifestation locally. This poses a significant challenge, especially for the recognition of structural targets such as character edges and container number lines in port night scenes.

[0005] In summary, the existing technologies have the following main technical problems in dealing with the task of enhancing the structure of images with strong interference at night in port areas: (1) The image enhancement process lacks a mechanism for identifying and distinguishing structural edges and pseudo-structural disturbances, resulting in the problem of misjudging the primary and secondary structures in the enhancement results; (2) The enhancement algorithm lacks modeling and control of the continuity of edges and the ability to maintain structure, resulting in problems such as broken edges and discontinuous strokes in the target edges. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide an image recognition method for port intermodal transport sites to solve the problem of poor structural enhancement effect of traditional Retinex algorithm on port nighttime images with strong interference.

[0007] This invention provides an image recognition method for port intermodal transport sites, the method comprising the following steps:

[0008] Acquire nighttime operation images of the port area's intermodal transport site, preprocess the nighttime operation images to obtain a normalized logarithmic brightness image, which is denoted as the target image;

[0009] The grayscale value and brightness value of each pixel in the target image are obtained. Structural edge analysis and local brightness value difference and grayscale value difference analysis are performed on each pixel in the target image. The enhancement scale control optimization factor of the target image is obtained. Based on the enhancement scale control optimization factor, the optimal multi-scale parameter combination when using the Retinex algorithm to enhance the target image is adaptively obtained to obtain the initial enhanced image.

[0010] For any pixel in the initial enhanced image, a main direction structure evaluation and an internal structure consistency evaluation are performed on the pixel to obtain a structure preservation optimization factor. Based on the product of the enhancement scale control optimization factor and the structure preservation optimization factor, an enhancement intensity adjustment weight is obtained for the pixel. Using the enhancement intensity adjustment weight, the brightness value of the pixel in the initial enhanced image is compensated and fused to obtain the final brightness value of the pixel.

[0011] The final brightness value of each pixel in the initial enhanced image is obtained to obtain the final enhanced image. The image recognition task at the port intermodal transport site is then performed based on the final enhanced image.

[0012] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0013] This invention, by constructing an enhancement scale control optimization factor, can accurately suppress unstructured pseudo-edges in areas with significant strong light interference, while adaptively enhancing real structural boundaries. This effectively improves local image contrast and edge recognition, ensuring the complete preservation of structural information under complex lighting conditions. Compared to the traditional Retinex algorithm, it can dynamically adjust the enhancement scale according to image content, significantly reducing over-enhancement in bright areas and detail loss in low-light areas, thus improving the overall perceptual quality and foreground recognition foundation of the image. Furthermore, by constructing a structure-preserving optimization factor and introducing an enhancement intensity fusion control mechanism, significant optimizations are achieved in image structure continuity and target recognition adaptability. This method not only suppresses edge breaks caused by brightness jumps during enhancement but also dynamically adjusts the enhancement intensity based on the structural orientation consistency and response intensity of the pixel's region, achieving structural fidelity and complete depiction of key targets such as character strokes and box number edges. Overall, this invention fully integrates image structure perception and enhancement parameter control strategies, providing a more robust perceptual preprocessing foundation for image recognition systems in nighttime, highly interference scenarios, and significantly improving the support effect of image enhancement for subsequent recognition tasks. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart of an image recognition method for port area intermodal transport provided in Embodiment 1 of the present invention. Detailed Implementation

[0016] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0017] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0018] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0019] See Figure 1 This is a flowchart of an image recognition method for port intermodal transport provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the method may include:

[0020] Step S101: Obtain nighttime operation images of the port area intermodal transport site, preprocess the nighttime operation images to obtain normalized logarithmic brightness images, and record them as target images.

[0021] In the port intermodal transport operation scenario addressed by this invention, nighttime image acquisition is significantly affected by complex lighting conditions. Particularly when trucks are entering or exiting gates or berthing areas, the high-brightness headlights of the trucks directly illuminate the image acquisition device, often resulting in areas of strong, non-uniform brightness in the images, manifesting as localized overexposure, blurred boundaries, and weak background exposure. This type of lighting disturbance not only damages the overall contrast and detail of the image but also severely interferes with subsequent image analysis and target recognition tasks based on structural features. To ensure a complete and stable data foundation for subsequent enhancement and recognition tasks, this invention aims to adapt the image acquisition process for port intermodal transport operations, ensuring that the input images cover key target areas, possess basic texture features, and retain sufficient structural information to support the implementation of subsequent enhancement scale control and structure preservation mechanisms.

[0022] Specifically, image acquisition locations are first selected and deployed at key passage nodes in the port's intermodal transport operations, including truck entrances and exits, gate scanning areas, loading / unloading docking lines, and dispatch guidance areas. The image acquisition equipment must meet high dynamic range (HDR) requirements, have low-light imaging capabilities, and use a fixed-view wide-angle lens to ensure that the target objects (truck number, container number characters, signal light status, etc.) can stably enter the field of view.

[0023] The image acquisition process is conducted in real time, with a frame rate of no less than 25fps and a resolution of no less than 1080p, to ensure that key structures in the image (such as character strokes, vehicle outlines, and light boundaries) are physically recognizable. Each acquired image contains typical high-brightness illumination areas, low-light background areas, and structural target areas, thus forming typical test samples for subsequent image enhancement processes.

[0024] After acquiring nighttime operation images of the port's intermodal transport site, further basic preprocessing is required to obtain the target image. Basic preprocessing includes, but is not limited to, image size standardization, format conversion, gamma correction, and grayscale generation. It is worth noting that, to avoid the original brightness distribution misleading the initial state of the enhancement algorithm, the nighttime operation images are uniformly converted into logarithmic brightness space images, and image normalization is performed before Retinex processing. This fixes the brightness distribution range of the input image (i.e., the target image) within the [0, 1] interval, ensuring the computational stability and comparability of the enhancement scale control optimization factor and the structure maintenance optimization factor, thus obtaining the normalized logarithmic brightness image, denoted as the target image.

[0025] At this point, the target image of the port area's intermodal transport site was obtained, which will support the subsequent construction of enhancement scale control optimization factors, the response of structure preservation optimization factors, and the execution of the collaborative enhancement control mechanism. This not only completed the stable acquisition of nighttime operation images but also the initialization and standardization of the target image, providing a solid foundation for the complex nighttime port area image structure enhancement task.

[0026] Step S102: Obtain the grayscale value and brightness value of each pixel in the target image. Perform structural edge analysis and local brightness value difference and grayscale value difference analysis on each pixel in the target image to obtain the enhancement scale control optimization factor of the target image. Based on the enhancement scale control optimization factor, adaptively obtain the optimal multi-scale parameter combination when using the Retinex algorithm to enhance the target image to obtain the initial enhanced image.

[0027] During nighttime operations at the port's intermodal transport site, vehicles frequently enter and exit, and work scheduling is intensive. Image recognition systems need to continuously and automatically identify structural information such as license plate numbers and container numbers in low-light, high-contrast, and high-interference environments. However, due to uneven lighting conditions at the port, direct-fired headlights on container trucks, and fixed monitoring angles, the acquired images often contain both locally bright areas (such as headlights or metallic reflections) and large areas of dark background. In these images, character regions are often located at the edges of light plates, in transitional lighting zones, or in shadow areas. Not only are their grayscale levels low, but their edge structures are also relatively blurry and incomplete, limiting their responsiveness to image enhancement algorithms.

[0028] Currently, the Retinex enhancement algorithm is commonly used to adjust the brightness and enhance the details of acquired images. This algorithm estimates the illumination distribution of the image through Gaussian convolution and calculates the image reflectance in the logarithmic domain, thereby enhancing dark areas and suppressing overexposure. Especially in the multi-scale Retinex framework, the algorithm processes and fuses images at multiple scales to simultaneously enhance global and local details. However, in typical interference scenarios such as nighttime operations at port intermodal transport sites, the Retinex algorithm suffers from a mismatch in structural response capabilities. Because the enhancement scale parameter is fixed throughout the image, the Retinex algorithm performs the same enhancement on all regions of the image, failing to recognize the target priority of image structure. This enhancement behavior produces a mismatch response when faced with image structures with weak character structure and strong pseudo-edges. On the one hand, unstructured areas such as headlights and light spot edges are significantly amplified during the enhancement process due to their high-frequency abrupt changes. On the other hand, character structures, due to their weak grayscale and blurred edges, cannot form an enhancement response and instead become even less clear and harder to recognize after enhancement.

[0029] This problem of scale mismatch directly leads to inconsistency between the recognition area and the enhanced response area. False edges such as light spot boundaries and rust stripes often dominate the structure after enhancement, while character areas are weakened or even misjudged due to insufficient response, resulting in target positioning offset, character breakage and adhesion, or failure of whole-block recognition. Therefore, existing enhancement strategies with fixed enhancement scales cannot effectively preserve target structural information and will introduce significant false structural enhancements that mislead subsequent recognition tasks. To solve this problem, this invention constructs an adaptive adjustment mechanism based on pixel-level image structural behavior to identify whether there is a risk of false edges dominating the structure in the image, and adjusts the enhancement scale parameters accordingly. Through the joint evaluation of pixel-level structural saliency, interference response intensity, and edge fragility, the true recognition priority of structural information in the current image is reflected, thereby enabling the enhancement strategy to preserve the true structure while suppressing the influence of interference false edges.

[0030] Specifically, before using the Retinex algorithm to enhance the target image, the resonance of structural target regions in the image is assessed to determine whether there is a risk of structural edges being covered by interfering structures. Based on this, the enhancement scale parameters are adjusted to obtain the optimal multi-scale parameter combination. However, regarding the method for obtaining the optimal multi-scale parameter combination, this embodiment of the invention uses each pixel in the target image as the basic computational unit to construct pixel-level feature responses. Furthermore, the enhancement scale control optimization factor required for the enhancement scale adjustment of the Retinex algorithm is constructed through coupled representation. The specific processing flow is as follows:

[0031] (1) Obtain the grayscale value and brightness value of each pixel in the target image.

[0032] For the first in the target image The nth pixel, for the nth Each pixel contributes to the grayscale response and RGB channel luminance response. The grayscale response is the grayscale value of the pixel after grayscale conversion. The RGB channel luminance response is the conversion of the three-channel pixel value of the pixel to the Y channel pixel value in the YUV color space. The conversion formula is as follows: ,in, For the first The brightness value corresponding to each pixel. The first The pixel value of each pixel in the RGB three channels.

[0033] (2) Taking any pixel in the target image as the analysis unit, structural edge analysis is performed on any pixel in the target image to obtain the structural saliency. Based on the difference in brightness value within the local range of any pixel, the degree of strong light disturbance is obtained. Based on the difference in gray value within the local range of any pixel, the degree of gray fragility is obtained.

[0034] For the first in the target image For the nth pixel, the first step is to evaluate the degree of structural edge. The horizontal and vertical grayscale gradient responses of each pixel are calculated, and the structural saliency is evaluated using the first-order derivative values ​​of the pixels. The Sobel operator is used to calculate the grayscale gradient response of each pixel in the target image. The first derivative value in the axial direction and in The first derivative value along the axis is used to obtain the sum of the absolute values ​​of the two first derivative values ​​corresponding to each pixel, which is denoted as the grayscale gradient response value of each pixel. It should be noted that the kernel size for applying the Sobel operator is set to 5×5 in this embodiment of the invention; with the first derivative value along the axis... Construct a 5×5 local window centered on the nth pixel, based on the nth pixel... The grayscale gradient response value of each pixel in a local window of n pixels is obtained, and the maximum grayscale gradient response value is obtained. Based on the nth pixel... The ratio between the gray-level gradient response value of the nth pixel and the maximum gray-level gradient response value yields the nth pixel. The structural significance of each pixel.

[0035] For the The formula for calculating the structural saliency of a pixel is:

[0036]

[0037] in, Indicates the first The structural saliency of each pixel; Indicates the first Pixels in The value of the first derivative in the axial direction; Indicates the first Pixels in The first derivative value in the axial direction, Represents the absolute value symbol. This represents the set of all pixels within a 5×5 local window centered at the p-th pixel. This represents extremely small positive numbers, used to prevent the denominator from being 0. In this embodiment of the invention, all extremely small positive numbers used to prevent the denominator from being 0 are specified. , This represents the maximum value function.

[0038] It should be noted that, for the first The core of evaluating the structural saliency of a pixel lies in measuring the first... Does each pixel possess sufficient edge response capability within its neighborhood? The higher the structural significance of a pixel, the more likely that the pixel is located in a structural region such as a character outline or box number line segment, and its structural information deserves to be prioritized for enhancement.

[0039] After completing the first After evaluating the structural saliency of the nth pixel, continue to evaluate the nth pixel. The strong light perturbation structure of each pixel is analyzed to identify the first pixel. Whether the region containing each pixel is located in a region dominated by pseudo-edges, such as a halo boundary or a high-contrast metallic reflection region, based on the first pixel. A local window of a preset size is constructed centered on each pixel. In this embodiment of the invention, a local window is set. The size is 5×5, used to extract the first... The local window brightness distribution of each pixel is analyzed and the local brightness contrast range is evaluated to obtain the first pixel. The intensity of strong light disturbance at each pixel: based on the first Within a local window of a given pixel, the brightness value of each pixel pair is calculated, and the range between the maximum and minimum brightness values ​​is obtained, denoted as the target range. Similarly, the brightness value of the i-th pixel is obtained. The maximum brightness range is obtained by calculating the brightness value range within the local window of each pixel. Based on the ratio between the target range and the maximum brightness range, the first... The degree of strong light disturbance at each pixel.

[0040] For the The formula for calculating the intensity of strong light disturbance at each pixel is:

[0041]

[0042] in, Indicates the first The degree of strong light disturbance at each pixel; Indicates the first The maximum brightness value within a local window of a pixel. Indicates the first The minimum brightness value within a local window of a pixel. Indicates the first The maximum brightness value within a local window of a pixel. Indicates the first The minimum brightness value within a local window of a pixel. This represents the set of pixels within a 5×5 local window centered at the p-th pixel. Represents a very small positive number. This represents the maximum value function.

[0043] It should be noted that the intensity of strong light disturbance is used to identify whether the area where the pixel is located is in a pseudo-edge dominated region such as a halo boundary or a high-contrast metallic reflection region. The higher the intensity of strong light disturbance, the more likely the pixel is in an edge region where the structure is easily disturbed by strong light. If it is not suppressed, the subsequent enhancement process will preferentially excite the pseudo-structure.

[0044] After obtaining the number After assessing the intensity of light disturbance at each pixel, we will continue to further evaluate the intensity of light disturbance at each pixel. The fragility of each pixel at the grayscale level, i.e., its contrast response capability, is determined by whether its structural edges exhibit insufficient grayscale difference due to background disturbances, uneven lighting, or other reasons, thus facing the risk of enhancement failure. The calculation then considers the vulnerability of the i-th pixel at the grayscale level. The grayscale value of the nth pixel is respectively related to the first pixel. The absolute value of the gray value difference between each pixel in a local window of n pixels is used to obtain the absolute value of the maximum gray value difference. The difference between the absolute value of the maximum gray value difference and a very small positive number is calculated. The sum of the reciprocal of the difference and a constant 1 is used as the independent variable of a logarithmic function with a base of 10 to obtain the nth pixel. The degree of grayscale fragility of each pixel.

[0045] For the The formula for calculating the grayscale fragility of a pixel is:

[0046]

[0047] in, Indicates the first The grayscale fragility of each pixel This represents a logarithmic function with base 10. Indicates the first The grayscale value of each pixel Indicates the first The grayscale value of each pixel Represents a very small positive number. Indicates the first A local window of 1 pixel.

[0048] Similarly, according to the above... The analysis method for each pixel is used to obtain the structural saliency, strong light disturbance degree, and grayscale fragility of each pixel in the target image.

[0049] (3) Obtain the structural saliency, strong light disturbance degree and gray level fragility of each pixel in the target image, and combine the structural saliency, strong light disturbance degree, gray level fragility, gray level value and brightness value of each pixel in the target image to obtain the enhancement scale control optimization factor of the target image.

[0050] Specifically, after obtaining the structural saliency, strong light perturbation level, and grayscale fragility of each pixel, the three pixel-level analyses are fused and evaluated to obtain the enhancement scale control optimization factor. The calculation expression for the enhancement scale control optimization factor is as follows:

[0051]

[0052] in, This represents the enhancement scale control optimization factor of the target image. Indicates the first in the target image The structural saliency of each pixel Indicates the first in the target image The degree of strong light disturbance at each pixel Indicates the first in the target image The grayscale fragility of each pixel This indicates that the first element in the target image obtained using the Sobel operator is... Brightness gradient of each pixel This indicates that the Laplacian operator is used to calculate the first value in the target image. The second derivative of each pixel is calculated, and the kernel size of the Laplacian operator is also set to 5×5. It represents the set of all pixels within a 5×5 local window centered on the p-th pixel, where | represents the absolute value symbol and 1 represents a constant.

[0053] It should be noted that the numerator in the formula for calculating the enhanced scale control optimization factor is composed of the product of structural salience, the degree of strong light perturbation, and the degree of gray-level fragility. Among these factors, structural salience... Used to measure the The edge strength of each pixel, through and First-order gray-level gradient evaluation in two directions Whether a pixel is located in a structural region with a clearly defined edge shape, such as an outline, line segment, or character edge, is amplified by squaring the weight of structural edge regions, making them dominant in the overall enhancement dynamics; the degree of strong light disturbance... Used to evaluate the Whether the local area containing each pixel is located in a region with extremely uneven brightness, such as a halo boundary, a high-contrast metallic reflective band, or other pseudo-edge dominated areas; the higher the degree of strong light disturbance, the more it indicates that the pixel is located in a region with extremely uneven brightness, such as a halo boundary, a high-contrast metallic reflective band, or other pseudo-edge dominated areas. The more likely an area is to be dominated by lighting interference; grayscale fragility. Evaluate the first from the perspective of contrast If a pixel is located in a weak edge region with indistinct structure, and the local grayscale change is not significant (i.e., the grayscale difference is small), it indicates that the structure of the region is weak and more prone to distortion. During enhancement, additional contrast stretching is required. Therefore, the product of these three factors constitutes a risk signal for image enhancement. If a pixel simultaneously possesses structural edge features, is located in an area subject to strong light interference, and has its own grayscale response risk, then the need for enhancement scale for this pixel is particularly urgent, and a significant enhancement response should be given.

[0054] In the denominator of the formula for calculating the optimization factor for enhanced scale control, This represents the inverse ratio factor for height gradient stability, used to evaluate the degree of spatial variation in the brightness dimension of an image. If the brightness gradient of a pixel is large, i.e., the brightness is unstable, then... If the value is small, and the brightness area of ​​the pixel is stable, then The value is relatively large. This term acts as an amplifier in the denominator to punish excessive enhancement requirements. When the overall brightness of the image changes drastically, it indicates that the area may be under complex lighting conditions, and the enhancement scale should not be increased blindly. The image structure complexity factor, obtained by the second derivative of the Laplacian operator, reflects the intensity of changes in the local structure and the complexity of the texture. The more complex the structure, the more detailed the image itself is, and it should not be over-enhanced to avoid destroying the original information. Therefore, this term also serves as a stability constraint to suppress the enhancement scale. The denominator in the calculation formula of the enhancement scale control optimization factor reflects the dual suppression effect of structure and brightness complexity, ensuring that the enhancement process will not cause an overreaction in areas that already have cleaned structures.

[0055] The overall scale control optimization factor is constructed based on the analysis of each pixel through a local-driven global feedback approach. It enhances and stimulates areas with interference, weakened structure, and insufficient contrast, while enhancing and suppressing areas with saturated structure and complex texture. Therefore, after obtaining the enhancement scale control optimization factor for the target image, the multi-scale filter bank in the Retinex processing is optimized using the enhancement scale control optimization factor. That is, based on the enhancement scale control optimization factor, the optimal multi-scale parameter combination for image enhancement using the Retinex algorithm is adaptively obtained to obtain the initial enhanced image. This involves obtaining a preset multi-scale parameter combination for the structurally clear image and a preset multi-scale parameter combination for the interference-dominant image. The enhancement scale control optimization factor is used as the weight of the preset multi-scale parameter combination for the interference-dominant image, and the difference between the constant 1 and the enhancement scale control optimization factor is used as the weight of the preset multi-scale parameter combination for the structurally clear image. A weighted sum is then performed on the preset multi-scale parameter combination for the structurally clear image and the preset multi-scale parameter combination for the interference-dominant image to obtain the optimal multi-scale parameter combination. Based on the optimal multi-scale parameter combination, the target image is enhanced using the Retinex algorithm to obtain the initial enhanced image.

[0056] In one embodiment, a multi-scale parameter combination suitable for structurally clear images is set. Set multi-scale parameter combinations suitable for the dominant interference image. ,pass The method obtains an adaptive optimal multi-scale parameter combination, and then uses the adaptive optimal multi-scale parameter combination to enhance the target image using the Retinex algorithm to obtain an initial enhanced image. The Retinex algorithm is an existing technology and will not be described in detail here.

[0057] Thus, through joint analysis of the pixel-level structural edges of the image and the response to strong light interference, the target image was enhanced for the first time, resulting in an initial enhanced image.

[0058] Step S103: For any pixel in the initial enhanced image, perform main direction structure evaluation and internal structure consistency evaluation on any pixel to obtain the structure preservation optimization factor of any pixel. Based on the product of the enhancement scale control optimization factor and the structure preservation optimization factor, obtain the enhancement intensity adjustment weight of any pixel. Using the enhancement intensity adjustment weight, perform compensation fusion processing on the brightness value of any pixel in the initial enhanced image to obtain the final brightness value of any pixel.

[0059] During nighttime operations at the port's intermodal transport site, image acquisition is often hampered by strong, non-uniform lighting, especially when the truck's headlights shine directly on the acquisition equipment. This results in significant brightness saturation areas in the image, while the background remains under low illumination, leading to a strong dynamic unevenness in the overall image lighting distribution. To improve the usability of such images in subsequent target recognition tasks, step S102 has already constructed an enhanced scale control optimization factor based on edge structure consistency to suppress false edges caused by strong light interference and enhance structurally realistic boundaries, thereby improving the overall structural clarity of the image and the quality of foreground recognition. However, after completing the optimization of the enhancement scale control, further analysis of the initial enhanced image reveals that although the enhancement scale has been dynamically adjusted, the Retinex algorithm still has the following problems because it lacks a structure preservation mechanism during multi-scale weighting: First, some regions inside the real structure (such as inside character strokes or target texture regions) are over-enhanced during the enhancement process, causing intensity perturbations in the originally uniform structural regions, thus introducing non-real boundaries in subsequent recognition; Second, there are interruptions in the enhancement response at some edges due to brightness jumps, causing the real structural edges to appear broken or fragmented, thereby affecting the continuity of character contour recognition or target shape modeling.

[0060] The essence of the aforementioned problems does not stem from the enhancement scale control itself, but rather from Retinex enhancement's lack of ability to assess structural continuity. Especially in structural transition regions under extreme illumination, the enhancement result is prone to exhibiting a non-structurally consistent response due to overly sensitive local features. Therefore, to ensure effective restoration and preservation of image structural integrity after enhancement scale control optimization, this invention introduces a dedicated optimization mechanism for structural response preservation, enabling the enhancement process to not only have region selection capabilities but also structural continuity control.

[0061] From an algorithmic perspective, the Retinex algorithm, as an image enhancement method based on a reflectivity and illumination separation model, relies heavily on local brightness gradients and multi-scale weighting strategies in edge regions for its enhancement effect. However, it lacks modeling of macroscopic structural information such as structural continuity, edge closure, and stroke preservation. Under extreme lighting conditions, edge continuity and internal structural consistency often cannot be reflected simply by pixel local responses. Therefore, it is necessary to introduce modeling and adjustment of structural response patterns in addition to the enhancement mechanism. Further analysis reveals that the areas most severely affected by strong light disturbance in nighttime operation images are often not the target edges themselves, but rather the surrounding areas with weak structural responses and discontinuous transition zones. These areas are prone to response drift or abrupt changes under Retinex enhancement, becoming the cause of structural breakage. In summary, based on the already completed enhancement scale control optimization, the embodiments of the present invention will further optimize the structural response continuity control. By combining the response characteristics of the real structure in the image and the heterogeneous behavior of the edge transition zone, the continuous edge expression ability of each pixel in the main direction of the structure is evaluated, and combined with its response consistency in the internal region of the structure, a response regulation mechanism for fine adjustment of structural closure and stroke integrity is finally formed. This further improves the structural fidelity and the overall stability of image recognition without interfering with the previous enhancement effect.

[0062] For the initial augmented image, the dominant orientation structure of each pixel is evaluated. The Sobel operator is used to perform gradient direction analysis on the image to obtain the dominant structural orientation of each pixel, taking the first pixel in the initial augmented image as an example. Taking the nth pixel as an example, for the nth pixel... The dominant direction of the structure of each pixel ,in, Indicates the first Pixels in Gradient value in the axial direction, Indicates the first Pixels in Gradient value in the axial direction, This represents the arctangent function.

[0063] Based on the The dominant structural direction of each pixel is used to define the sampling band length. In this embodiment of the invention, the sampling band length is set. In the A one-dimensional edge response sampling band aligned with the main direction is constructed around each pixel. This sampling band is used to evaluate structural continuity in the main direction. Therefore, based on the gradient value of each pixel in the sampling band, the absolute value of the gradient value difference between every two adjacent pixels is calculated, and the mean of the absolute values ​​of the gradient value differences is obtained. The gradient value of each pixel in the sampling band is then compared with the gradient value of the first pixel. The absolute value of the difference between the gradient values ​​of the nth pixel is used to obtain the maximum absolute value of the difference. This maximum absolute value is used as the numerator, and the gradient values ​​of the nth pixel are used as the numerator. The ratio is obtained by using the sum of the gradient values ​​of the nth pixel and the smallest positive number as the denominator. The sum of the average absolute values ​​of the gradient value differences and the ratios is then used to obtain the nth pixel. The degree of discontinuity of each pixel.

[0064] For the The formula for calculating the degree of discontinuity of a pixel is:

[0065]

[0066] in, Indicates the first The degree of discontinuity of each pixel Indicates the length of the sampling band. Indicates the first The sampling band of the nth pixel Gradient values ​​of each pixel Represents the maximum value function. Indicates the first The sampling band of the nth pixel Gradient values ​​of each pixel Represents a very small positive number. Indicates the first Gradient values ​​of each pixel || represents the absolute value of the maximum difference, and || represents the absolute value sign.

[0067] It should be noted that, The degree of discontinuity is used to measure the first The fluctuation and abrupt change of the edge response of each pixel in its main direction sampling band are used to measure whether there are breaks, jumps, or discontinuities in the edge. Let be the average difference fluctuation term, representing the th The magnitude of gradient response variation among adjacent pixels in the main direction sampling band of the nth pixel indicates the magnitude of the average difference fluctuation term. The discontinuous fluctuations in the main direction of each pixel may be due to unnatural phenomena such as structural breaks or edge splits. The maximum mutation penalty term represents the term of the th mutation. The maximum difference in gradient between the nth pixel and all points in the main direction sampling band is used to explicitly penalize abrupt changes in structural edges. If there is a significant jump between a pixel and its surrounding pixels, it indicates that the pixel is at a structural discontinuity and should be assigned a higher degree of discontinuity. The greater the degree of discontinuity in the overall structure, the higher the degree of discontinuity. The edges of individual pixels are discontinuous and abrupt in their main direction, making them suitable for detecting problem areas such as character edge interruption, stroke breakage, and missing box number outline.

[0068] After obtaining the number After determining the discontinuity of the first pixel, continue with the second pixel. The structural internal consistency response of the nth pixel is evaluated to determine the nth pixel. Whether a pixel is located within a structurally closed region (such as the center of a character stroke or the interior of a shape) is determined by using the first pixel as an example. The structural response mean and orientation consistency within a local window centered on pixel n are used to determine the first... The evaluation of the structural internal consistency response of each pixel is specifically based on the following: A local window of a preset size is constructed centered on each pixel. In this embodiment of the invention, a local window is set. The size is 5×5. Any pixel in the local window is taken as the target pixel. The dominant structural direction of the target pixel and the sampling band along that direction are obtained. A directional high-pass kernel is used to filter the sampling band of the target pixel to obtain the filtered grayscale value of the target pixel. This value characterizes whether there is a structural enhancement response in the image along its dominant structural direction at the target pixel, i.e., whether the image has a local consistency response of structural targets such as strokes, contours, and closed blocks. The relationship between the target pixel and the first... The structural dominance direction similarity between the nth pixel is obtained based on the filtered grayscale value and the structural dominance direction similarity, thus showing the relationship between the target pixel and the nth pixel. The structural orientation consistency index between pixels is obtained; the structural orientation consistency index between each pixel in the local window and the first pixel is obtained. The structural orientation consistency index among all pixels is used as the mean of the structural orientation consistency indexes. The degree of structural internal consistency response of each pixel.

[0069] For the The formula for calculating the internal structural consistency response of a pixel is:

[0070]

[0071] in, Indicates the first The degree of structural internal consistency response of each pixel; Indicates the first A local window of 1 pixel, Indicates the first In the local window of the nth pixel, the first The filtered grayscale value of each pixel; Indicates the first In the local window of the nth pixel, the first The structure of each pixel dominates the direction. Indicates the first The structure of each pixel dominates the direction. Indicates the first The number of pixels within a local window of a given pixel. This represents the cosine function.

[0072] It should be noted that, The degree of internal consistency of the structure is used to measure the first To determine whether a pixel is located within a structurally defined internal region (such as the center of a character or inside a texture block), it is necessary to ascertain whether the structural orientation of that region is consistent and evaluate whether it constitutes a true structurally closed region. Indicates the first In the local window of the nth pixel, the first Does each pixel exhibit structural enhancement responses (e.g., contours, closed regions) along its principal structural direction? Convolution with a structural direction band filter yields a detection function capable of detecting stroke responses. For directional consistency assessment, measure the first Whether the structural orientation of a pixel is consistent with that of its neighboring pixels. If the directional difference is small, the value is close to 1, indicating that there is a consistent structural response within the region, which may belong to a closed stroke, region filling, or inside a boundary. The higher the internal structural consistency response of the nth pixel, the more it indicates that the nth pixel is in good condition. The more a pixel is located in a region with consistent structural orientation and strong response, the higher the probability that it is inside the structure. It should not be over-enhanced or misjudged as an edge, thus providing a basis for judgment on structural protection and response maintenance.

[0073] After obtaining the number After assessing the discontinuity of the first pixel and the internal consistency of the structure, we continue by... The discontinuity of each pixel and the internal consistency response of the structure are fused and evaluated to obtain the structure preservation optimization factor of the pixel: the product of the discontinuity of any pixel and the internal consistency response of the structure is obtained, and the reciprocal of the sum of the constant 1 and the product is used as the structure preservation optimization factor of any pixel.

[0074] For the The formula for calculating the structure preservation optimization factor for each pixel is:

[0075]

[0076] in, Indicates the first The structure of each pixel is maintained by an optimization factor; Indicates the first The degree of discontinuity of each pixel; Indicates the first The degree of structural internal consistency response of each pixel, where 1 represents a constant.

[0077] It should be noted that the optimization factor is maintained through structure. Conduct a fusion assessment, if the first If both the discontinuity and structure preservation optimization factor of a pixel are high, it indicates that the enhancement caused a structural interruption, and the break point is in a critical structural region; the enhancement response intensity should be significantly reduced. If the discontinuity is high but the structure preservation optimization factor is low, it indicates that although there is an interruption, it is not within the structural region and may be a weak background structure; the restrictions can be appropriately relaxed. If the discontinuity is low but the structure preservation optimization factor is high, it indicates that the internal structure has strong continuity but no abrupt changes; the current response can be maintained. If both are low, the structural risk in this region is considered low, and no intervention is needed. The value of the structure preservation optimization factor is... The larger the value, the higher the degree of structural preservation, and the more relaxed the adjustment intensity can be. Conversely, the smaller the value, the higher the structural protection requirement, and the stronger the constraints should be.

[0078] Similarly, a structure preservation optimization factor is obtained for each pixel in the initial enhanced image. This factor is used to correct the structural response breaks and stroke edge blurring caused by the failure to evaluate structural continuity during Retinex enhancement, thereby improving the coherence and integrity of image structural elements in subsequent recognition tasks. At this point, a joint analysis of the character edge direction coherence and local structural response intensity in the initial enhanced image is completed. To further improve the structural continuity and edge closure of the enhanced image, a strong scale control optimization factor for the target image is established. And maintain the optimization factor of the structure of each pixel. The enhancement results are fused and a fusion enhancement control weight is introduced in the Retinex enhancement output stage to perform pixel-level compensation adjustment, thereby achieving dynamic control of enhancement intensity under structure perception.

[0079] Specifically, for the first in the initial enhanced image Each pixel is used to construct an enhanced intensity adjustment weight. To balance the degree of fusion between the Retinex enhancement result and the original image brightness, the enhancement scale control optimization factor and the first... The structure of each pixel maintains the product of the optimization factors, which serves as the product of the optimization factors for the nth pixel. The enhancement intensity adjustment weights for each pixel are as follows. The formula for calculating the enhancement intensity adjustment weight of each pixel is:

[0080]

[0081] in, Indicates the first The enhancement intensity of each pixel is adjusted by weight; The enhancement scale control optimization factor represents the target image; Indicates the first in the initial enhanced image The structure of each pixel is maintained by an optimization factor.

[0082] Based on the enhancement intensity adjustment weights, the Retinex enhancement results are subjected to structure-preserving compensation fusion processing to obtain the first-order enhancement image in the initial enhanced image. The final brightness value of the nth pixel: Get the nth pixel's brightness value. The brightness value of the nth pixel in the initial enhanced image is denoted as the enhanced brightness value. This value is then compared to the brightness value of the nth pixel in the target image. The brightness values ​​of pixels belonging to the same position are recorded as the original brightness values. The enhancement intensity adjustment weight is used as the weight for the enhanced brightness value, and the difference between the constant 1 and the enhancement intensity adjustment weight is used as the weight for the original brightness value. The enhanced brightness value and the original brightness value are then weighted and summed to obtain the first... The final brightness value of each pixel.

[0083] For the The formula for calculating the final brightness value of each pixel is:

[0084]

[0085] in, Indicates the first The final brightness value of each pixel Indicates the first Adjusting the enhancement intensity weight for each pixel Indicates the first in the initial enhanced image The brightness value of each pixel. Indicates the target image with the first The brightness values ​​of pixels at the same position.

[0086] It should be noted that the optimization factor is controlled through global enhanced scaling. Unify the constraint enhancement range and combine local structure-preserving optimization factors. A dynamic weighted evaluation of the structural coherence of specific pixels is performed, ensuring that the enhanced output retains strong responsive structures while suppressing unstructured enhancements caused by discontinuous edges or internal texture perturbations. This is achieved by introducing... With a fusion control mechanism, Retinex enhancement results are no longer direct enhancements at a single scale, but rather enhancements with structural controllability after structure-aware optimization. For pixels located in high-structural-confidence regions such as character outlines and box number edges, its... The values ​​are usually high, and they are superimposed. Later formed The value is also relatively large, so the enhancement result is fully preserved; however, for pixels with excessively large responses to edge or internal disturbances caused by strong light, the enhancement result is not fully preserved. When the value is small, the final enhanced output tends to be conservatively fused, which significantly improves the recoverability of structural integrity in the enhanced image and the overall recognition stability.

[0087] Similarly, obtain the final brightness value of each pixel in the initial enhanced image.

[0088] Step S104: Obtain the final brightness value of each pixel in the initial enhanced image to obtain the final enhanced image, and perform image recognition tasks at the port intermodal transport site based on the final enhanced image.

[0089] After obtaining the final brightness value of each pixel in the initial enhanced image, the brightness value of each pixel in the initial enhanced image is replaced with the final brightness value to obtain the final enhanced image. This completes the structural enhancement and adaptive illumination control of the image. Subsequently, based on the actual needs of typical identification objects in the port intermodal transport site, the final enhanced image undergoes further structured feature extraction and image recognition processing to achieve high-precision positioning and information extraction of key identification targets. Since the final enhanced image has suppressed the dominance of false edges and enhanced the true structural boundaries, it possesses clear character structure, good stroke continuity, and uniform local contrast, laying a high-quality input foundation for subsequent recognition processes. In the port intermodal transport operation scenario, typical image recognition objects mainly include container numbers, truck license plates, company logos, personnel postures and actions, and intermodal transport signal light status. These targets are generally located in high-reflection areas of the vehicle body, low-light backgrounds at night, or complex occlusion environments, and are characterized by large size variations, blurred target edges, and numerous structural interferences. To address the aforementioned challenges, this invention first extracts high-contrast regions with character shapes from the final enhanced image using methods based on MSER region stability detection or EAST text detection network, forming a set of character candidate regions. Under Retinex structure enhancement processing, the quality of the character candidate regions in the set is significantly improved, and the false detection rate is greatly reduced.

[0090] Subsequently, combining image geometric structure analysis, the character candidate regions in the character candidate region set are analyzed based on structural indicators such as aspect ratio, edge density, and stroke thickness, completing character line aggregation and redundant region removal. Through this process, the original character candidate regions are regularized into character regions with recognition significance. Furthermore, to enhance recognition robustness, the extracted character regions undergo affine correction, grayscale normalization, and stroke smoothing processing.

[0091] After completing structured feature extraction and normalization, the recognition model stage employs existing high-performance target and character recognition networks for end-to-end recognition processing. For character recognition tasks, Tesseract OCR or deep learning character recognition models based on CRNN architecture can be used to recognize printed characters such as container numbers, license plate numbers, and company logos. For multi-target detection tasks such as intermodal transport signals and personnel movements, YOLOv7 or PP-YOLO series networks can be used for real-time target detection. For personnel behavior and status recognition tasks, OpenPose or AlphaPose human keypoint detection methods can be combined to identify the operator's gestures or standing position, and infer the work instructions or operation process status accordingly.

[0092] Finally, the recognition results are structured and output to generate a set of recognition results including vehicle identity, container number, intermodal transport status, and personnel posture, which is then simultaneously pushed to the intermodal transport scheduling system or safety control platform for subsequent process linkage or abnormal event early warning. It is worth noting that the focus of this invention is on image enhancement of nighttime operation images, while image recognition tasks at port intermodal transport sites are existing technologies and will not be discussed in detail here.

[0093] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. An image recognition method for port area intermodal transport sites, characterized in that, The method includes: Acquire nighttime operation images of the port area's intermodal transport site, preprocess the nighttime operation images to obtain a normalized logarithmic brightness image, which is denoted as the target image; The grayscale value and brightness value of each pixel in the target image are obtained. The grayscale gradient response of each pixel in the target image is used to evaluate whether each pixel is in a structural region with a clear edge shape. The contrast of local window brightness distribution is used to identify whether each pixel is in a region with extremely uneven brightness. The local grayscale contrast is used to determine whether each pixel is in a weak edge region with an indistinct structure. The enhancement scale control optimization factor of the target image is obtained through fusion analysis. The multi-scale filter bank in the Retinex processing is optimized using the enhancement scale control optimization factor. The optimal multi-scale parameter combination is adaptively obtained when the Retinex algorithm is used to enhance the target image, and the initial enhanced image is obtained. For any pixel in the initial enhanced image, a main direction structure evaluation and an internal structure consistency evaluation are performed on the pixel to obtain a structure preservation optimization factor. Based on the product of the enhancement scale control optimization factor and the structure preservation optimization factor, an enhancement intensity adjustment weight is obtained for the pixel. Using the enhancement intensity adjustment weight, the brightness value of the pixel in the initial enhanced image is compensated and fused to obtain the final brightness value of the pixel. The final brightness value of each pixel in the initial enhanced image is obtained to obtain the final enhanced image. The image recognition task at the port intermodal transport site is then performed based on the final enhanced image.

2. The image recognition method for port area intermodal transport as described in claim 1, characterized in that, The method for obtaining the enhancement scale control optimization factor of the target image includes: For any pixel in the target image, structural edge analysis is performed on the pixel to obtain the structural saliency. The degree of strong light disturbance is obtained based on the difference in brightness values ​​within a local area of ​​the pixel. The degree of grayscale fragility is obtained based on the difference in grayscale values ​​within a local area of ​​the pixel. The structural saliency, strong light disturbance, and grayscale fragility of each pixel in the target image are obtained. Combined with the structural saliency, strong light disturbance, grayscale fragility, grayscale value, and brightness value of each pixel in the target image, the enhancement scale control optimization factor of the target image is obtained.

3. The image recognition method for port area intermodal transport as described in claim 2, characterized in that, The step of performing structural edge analysis on any pixel to obtain the structural saliency includes: The Sobel operator is used to calculate the value of each pixel in the target image. The first derivative value in the axial direction and in The first derivative value in the axial direction is used to obtain the sum of the absolute values ​​of the two first derivative values ​​corresponding to each pixel, which is recorded as the gray-level gradient response value of each pixel. A local window of a preset size is constructed with any pixel as the center. The maximum gray-level gradient response value is obtained based on the gray-level gradient response value of each pixel in the local window. The structural saliency of any pixel is obtained based on the ratio between the gray-level gradient response value of any pixel and the maximum gray-level gradient response value.

4. The image recognition method for port area intermodal transport as described in claim 2, characterized in that, The step of determining the degree of strong light disturbance based on the brightness value difference within a local range of any pixel includes: A local window of a preset size is constructed with any pixel as the center. Based on the brightness value of each pixel in the local window, the brightness value range between the maximum and minimum brightness values ​​is obtained and recorded as the target range. The brightness value range within the local window of each pixel in the local window of any pixel is obtained to obtain the maximum brightness value range. Based on the ratio between the target range and the maximum brightness value range, the degree of strong light disturbance of any pixel is obtained.

5. The image recognition method for port area intermodal transport as described in claim 4, characterized in that, The step of determining grayscale fragility based on the grayscale value difference within a local range of any pixel includes: Calculate the absolute value of the gray value difference between any pixel and the gray value of each pixel in the local window of any pixel to obtain the maximum absolute value of the gray value difference. Calculate the difference between the maximum absolute value of the gray value difference and a very small positive number. Use the sum of the reciprocal of the difference and a constant 1 as the independent variable of a logarithmic function with a base of 10 to obtain the gray value fragility of any pixel.

6. The image recognition method for port area intermodal transport as described in claim 2, characterized in that, The enhancement scale control optimization factor for the target image is obtained by combining the structural saliency, strong light disturbance, grayscale fragility, grayscale value, and brightness value of each pixel in the target image, including: ; in, This represents the enhancement scale control optimization factor of the target image. Indicates the first in the target image The structural saliency of each pixel Indicates the first in the target image The degree of strong light disturbance at each pixel Indicates the first in the target image The grayscale fragility of each pixel This indicates that the first element in the target image obtained using the Sobel operator is... Brightness gradient of each pixel This indicates that the Laplacian operator is used to calculate the first value in the target image. The second derivative of each pixel It represents the set of all pixels within a local window of a preset size, centered on the p-th pixel. | represents the absolute value symbol, and 1 represents a constant.

7. The image recognition method for port area intermodal transport as described in claim 1, characterized in that, The step of adaptively obtaining the optimal multi-scale parameter combination for image enhancement of the target image using the Retinex algorithm based on the enhancement scale control optimization factor to obtain the initial enhanced image includes: Obtain a preset multi-scale parameter combination for structurally clear images and a preset multi-scale parameter combination for interference-dominant images. Use the enhancement scale control optimization factor as the weight of the preset multi-scale parameter combination for interference-dominant images. Use the difference between the constant 1 and the enhancement scale control optimization factor as the weight of the preset multi-scale parameter combination for structurally clear images. Perform a weighted summation on the preset multi-scale parameter combination for structurally clear images and the preset multi-scale parameter combination for interference-dominant images to obtain the optimal multi-scale parameter combination. Based on the optimal multi-scale parameter combination, the target image is enhanced using the Retinex algorithm to obtain an initial enhanced image.

8. The image recognition method for port area intermodal transport as described in claim 1, characterized in that, The step of performing main direction structure evaluation and internal structure consistency evaluation on any pixel to obtain the structure preservation optimization factor for any pixel includes: Obtain the dominant structural direction of any pixel, and obtain a sampling band of a preset length for any pixel along the dominant structural direction. Based on the gradient value of each pixel in the sampling band, calculate the absolute value of the gradient value difference between every two adjacent pixels to obtain the mean of the absolute values ​​of the gradient value difference. Calculate the absolute value of the difference between the gradient value of each pixel in the sampling band and the gradient value of any pixel to obtain the maximum absolute value of the difference. Using the maximum absolute value of the difference as the numerator and the sum of the gradient value of any pixel and a very small positive number as the denominator, obtain the corresponding ratio. Based on the sum of the mean of the absolute values ​​of the gradient value difference and the ratio, obtain the degree of discontinuity of any pixel. A local window of a preset size is constructed centered on any pixel. Any pixel within the local window is taken as a target pixel. The dominant structural direction and sampling band along the dominant structural direction of the target pixel are obtained. The sampling band of the target pixel is filtered to obtain a filtered grayscale value. The structural dominance direction similarity between the target pixel and any pixel is calculated. Based on the filtered grayscale value and the structural dominance direction similarity, a structural direction consistency index between the target pixel and any pixel is obtained. The structural direction consistency index between each pixel within the local window and any pixel is obtained. The average of all structural direction consistency indices is taken as the degree of internal structural consistency response of any pixel. By combining the discontinuity of any pixel with the internal consistency response of the structure, the structure preservation optimization factor of any pixel is obtained.

9. The image recognition method for port area intermodal transport as described in claim 8, characterized in that, The method of combining the discontinuity of any pixel with the internal consistency response of the structure to obtain the structure preservation optimization factor for any pixel includes: Obtain the product of the discontinuity of any pixel and the internal consistency response of the structure, and use the reciprocal of the sum of the constant 1 and the product as the structure preservation optimization factor for any pixel.

10. The image recognition method for port area intermodal transport as described in claim 1, characterized in that, The step of using the enhancement intensity adjustment weight to compensate and fuse the brightness value of any pixel in the initial enhanced image to obtain the final brightness value of any pixel includes: The brightness value of any pixel in the initial enhanced image is obtained and recorded as the enhanced brightness value. The brightness value of the pixel in the target image that is at the same position as the pixel is obtained and recorded as the original brightness value. The enhancement intensity adjustment weight is used as the weight of the enhanced brightness value, and the difference between the constant 1 and the enhancement intensity adjustment weight is used as the weight of the original brightness value. The enhanced brightness value and the original brightness value are weighted and summed to obtain the final brightness value of any pixel.