WO2022148142A1 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
WO2022148142A1
WO2022148142A1 PCT/CN2021/131470 CN2021131470W WO2022148142A1 WO 2022148142 A1 WO2022148142 A1 WO 2022148142A1 CN 2021131470 W CN2021131470 W CN 2021131470W WO 2022148142 A1 WO2022148142 A1 WO 2022148142A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
roi
mapping relationship
initial image
sub
Prior art date
Application number
PCT/CN2021/131470
Other languages
French (fr)
Chinese (zh)
Inventor
孙旭彤
池清华
张仁宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022148142A1 publication Critical patent/WO2022148142A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/96Management of image or video recognition tasks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads

Definitions

  • the present application relates to the field of image processing, and can be specifically applied to intelligent driving, automatic driving, or unmanned driving, etc., and more specifically, to an image processing method and apparatus.
  • image preprocessing is required before image analysis (feature extraction, segmentation, matching, and recognition, etc.).
  • image preprocessing is to eliminate irrelevant information in images, restore useful real information, enhance the detectability of relevant information, and simplify data to the greatest extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.
  • preprocessing the initial image collected by the camera When preprocessing the initial image collected by the camera, perform translation, transposition, mirroring, rotation, affine transformation, inverse perspective transformation (IPM), lens distortion correction (LDC), resolution in turn.
  • Various preprocessing operations in rate adjustment, etc. In the process of preprocessing the initial image, a large number of intermediate calculation results are generated, occupying the storage resources of memory or other memory.
  • the present application provides an image processing method and apparatus, which can reduce resource occupation of image preprocessing.
  • an image processing method comprising: acquiring at least one initial image; obtaining a preprocessed first preprocessed image according to the at least one initial image and a first mapping relationship, the at least one initial image and A first mapping relationship exists between pixel positions of the first preprocessed image, and the first mapping relationship corresponds to multiple preprocessing modes.
  • the first mapping relationship By using the first mapping relationship to preprocess the initial image, there is a first mapping relationship between the first preprocessed image obtained by preprocessing and the pixel positions of the initial image, which avoids the generation and storage of intermediate data, and reduces the need for Occupation of storage resources.
  • the obtaining a preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship includes: according to the first mapping relationship, to A first region image of a first ROI in the at least one region of interest ROI in the at least one initial image is preprocessed to obtain the first preprocessed image.
  • the number of the at least one ROI is multiple, the first ROI corresponds to the first mapping relationship, and the method further includes: using a method corresponding to the second ROI Preprocessing is performed on the second region image located in the second ROI in the at least one initial image, where the second ROI is an ROI other than the first ROI in the at least one ROI.
  • the number of ROIs can be multiple, and each ROI can correspond to a kind of preprocessing processing needs.
  • Using the mapping relationship corresponding to each ROI for preprocessing provides a more flexible image processing method.
  • each ROI may correspond to a mapping relationship.
  • Each ROI can be preprocessed by using the mapping relationship between the original image and the pixel positions in the preprocessed image.
  • the images located in each ROI are preprocessed by mapping, which avoids the storage of the intermediate data generated by each preprocessing method and reduces the consumption of storage resources.
  • Each ROI can include only one continuous area, or multiple continuous areas separated from each other.
  • the at least one initial image is from a vehicle-mounted camera device, and the position of each of the ROIs is acquired according to the driving state of the vehicle.
  • the position of the ROI is adjusted according to the driving state of the vehicle, so as to avoid that the preprocessing result of the image of the region where the initial image is located in the ROI does not meet the requirements of subsequent image processing due to the change of the driving state of the vehicle.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI.
  • the first mapping relationship, performing preprocessing on the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image includes: according to the plurality of sub-mapping relationships, performing preprocessing on the at least one initial image in the first ROI. The images located in each of said sub-regions are preprocessed in parallel.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and the initial images in each region corresponding to the sub-mapping relationships are preprocessed in parallel by using the sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of the initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
  • the first mapping relationship includes a plurality of sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region, and the first mapping relationship is based on the at least one initial image and the first
  • the mapping relationship to obtain a preprocessed first preprocessed image includes: performing parallel preprocessing on images located in each of the subregions in the at least one initial image according to the plurality of submapping relationships.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and the initial images in each region corresponding to the sub-mapping relationships are preprocessed in parallel by using the sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of the initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
  • the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation. It should be understood that various preprocessing manners may also include other manners.
  • the at least one initial image is from a vehicle-mounted camera device, and the method further includes: acquiring demand information, where the demand information is used to indicate the multiple preprocessing methods; The requirement information generates the first mapping relationship.
  • a first mapping relationship is generated.
  • the determination of the first mapping relationship is made more flexible; on the other hand, there is no need to store a large number of mapping relationships, and only the required first mapping relationship can be generated when needed, which reduces the occupation of storage resources.
  • an image processing apparatus including an acquisition module and a processing module, where the acquisition module is configured to acquire at least one initial image; the processing module is configured to, according to the at least one initial image and the first mapping relationship, A preprocessed first preprocessed image is obtained, and a first mapping relationship exists between the at least one initial image and the pixel positions of the first preprocessed image, and the first mapping relationship corresponds to multiple preprocessing modes.
  • the processing module is specifically configured to, according to the first mapping relationship, perform the first mapping of the first ROI located in the first ROI in the at least one region of interest ROI in the at least one initial image.
  • the region image is preprocessed to obtain the first preprocessed image.
  • the number of the at least one ROI is multiple, the first ROI corresponds to the first mapping relationship, and the processing module is further configured to: The mapping relationship corresponding to the ROI preprocesses the second region image located in the second ROI in the at least one initial image, and the second ROI is the ROI other than the first ROI in the at least one ROI . .
  • the at least one initial image is from a vehicle-mounted camera device, and the position of the ROI is obtained according to the driving state of the vehicle.
  • the first mapping relationship includes multiple sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region in the first ROI, and the processing module specifically is configured to, according to the plurality of sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
  • the first mapping relationship includes multiple sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region, and the processing module is specifically configured to, according to the multiple sub-mapping relationships There are sub-mapping relationships, and the images located in each of the sub-regions in the at least one initial image are preprocessed in parallel.
  • the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
  • the obtaining module is further configured to obtain requirement information, where the requirement information is used to indicate the multiple preprocessing methods; the processing module is further configured to, according to the The requirement information is generated, and the first mapping relationship is generated.
  • an image processing apparatus comprising at least one memory and at least one processor, wherein the at least one memory is used to store a program, and the at least one processor is used to run the program to implement the first aspect. method.
  • program may also be referred to as program code, computer instructions, computer programs, program instructions, or the like.
  • a chip comprising at least one processor and an interface circuit, the interface circuit is configured to provide program instructions or data for the at least one processor, and the at least one processor is configured to execute the program instructions, to implement the method described in the first aspect.
  • the chip system may further include a memory, in which a program is stored, the processor is configured to execute the program stored in the memory, and when the program is executed, the The processor is configured to perform the method in the first aspect.
  • a computer-readable storage medium stores a program code for execution by a device, and when the program code is executed by the device, the method described in the first aspect is implemented.
  • a computer program product comprising a computer program, when the computer program product is executed by a computer, the computer performs the method of the aforementioned first aspect.
  • the method of the first aspect may specifically refer to the method in the first aspect and any one of the various implementation manners of the first aspect.
  • a terminal including the image processing apparatus described in the second aspect or the third aspect.
  • the terminal may be an intelligent transportation device (vehicle or drone), a smart home device, an intelligent manufacturing device, or a robot, and the like.
  • the intelligent transportation device may be, for example, an automated guided vehicle (AGV), or an unmanned transportation vehicle.
  • AGV automated guided vehicle
  • FIG. 1 is a schematic structural diagram of an image processing system.
  • FIG. 2 is a schematic flowchart of an image processing method.
  • FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an image processing method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an image storage format.
  • FIG. 7 is a mapping relationship table provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of another image processing apparatus provided by an embodiment of the present application.
  • Intelligent driving technology relies on the cooperation of computer vision, radar, monitoring devices and global positioning systems, etc., so that motor vehicles can realize automatic driving or assisted driving without the need for human active operation or the need for partial human operation intervention.
  • Intelligently driven vehicles use various computing systems to help transport passengers or cargo from one location to another. Some intelligently driven vehicles may require some initial or continuous input from an operator, such as a pilot, driver, or passenger. Intelligent driving vehicles permit the operator to switch from a manual mode of operation to an autonomous driving mode or a mode in between. Since automatic driving technology does not require humans to drive motor vehicles, it can theoretically effectively avoid human driving errors, reduce the occurrence of traffic accidents, and improve the efficiency of highway transportation. Therefore, more and more attention has been paid to intelligent driving technologies such as autonomous driving.
  • the mode between the manual mode operation mode and the automatic driving mode may be referred to as an assisted driving mode.
  • assisted driving mode the driving of the motor vehicle does not completely depend on the active operation of humans.
  • the realization of autonomous driving and assisted driving depends on the development of intelligent driving technology.
  • Intelligent driving technology includes perception, decision-making, control and other stages.
  • the perception stage information about the surrounding environment can be received, and the environment in which the cognition is located can be understood according to the surrounding environment information.
  • the decision-making stage the information output in the perception stage can be used to predict the behavior of traffic participants, so as to make behavioral decisions for the self-vehicle.
  • the control stage the lateral acceleration and longitudinal acceleration of the vehicle can be calculated according to the output of the decision-making stage to control the driving of the self-vehicle.
  • the surrounding environment information may include images captured by the vehicle-mounted camera device.
  • the images collected by the on-board camera can be processed.
  • image preprocessing In image analysis such as feature extraction, segmentation, matching and recognition, the quality of the initial image directly affects the design of the analysis algorithm and the accuracy of the analysis results. Therefore, the image needs to be preprocessed before image analysis.
  • the main purpose of image preprocessing is to eliminate irrelevant information such as noise in the image, enhance the detectability of effective information, and simplify the data to the greatest extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.
  • FIG. 1 is a schematic structural diagram of an image processing system.
  • the image processing system 100 includes a preprocessing module 110 and a processing module 120 .
  • the functions of the preprocessing module 110 and the processing module 120 may be implemented by at least one processor.
  • the preprocessing module 110 is used for preprocessing the initial image.
  • the initial image may be an image captured by at least one camera.
  • the initial image as shown in FIG. 1 may be collected by a forward-looking camera installed on the vehicle.
  • the preprocessing module 110 may perform translation, transposition, mirroring, rotation, affine transformation, inverse perspective transformation (IPM), lens distortion correction (LDC), resolution adjustment, etc. on the initial image. one or more operations.
  • Affine transformation is used to linearly transform the coordinates of each point in the image, and it can also translate the linearly transformed coordinates by a certain distance.
  • affine transformation the image can be rotated by any angle around any center.
  • the detection of lane lines is very important.
  • objects such as lane lines that are originally parallel tend to intersect in the image.
  • the inverse perspective transform can eliminate this perspective effect.
  • IPM the projection of the object in the initial image along the vertical downward direction (ie, the orthographic projection) can be obtained.
  • Lenses can introduce distortion due to manufacturing accuracy and assembly process deviations, resulting in distortion of the original image.
  • the distortion of the lens is divided into two categories: radial distortion and tangential distortion.
  • Radial distortion is the distortion distributed along the radial direction of the lens, which is caused by the fact that the light rays are more curved at the center of the principle lens than near the center.
  • Tangential distortion is caused by the lens itself being not parallel to the camera sensor plane (imaging plane) or the image plane, which is mostly caused by the installation deviation of the lens being pasted on the lens module.
  • Image distortion caused by the lens can be reduced or even eliminated by LDC.
  • the preprocessed image shown in Figure 1 is obtained by LDC.
  • the processing module 120 may further process the preprocessed image.
  • the preprocessed image will be sent to the processing module 120 at the back end.
  • the processing module 120 recognizes the preprocessed image, and determines people, vehicles, lane lines, traffic signs and the like in the preprocessed image.
  • FIG. 1 The processing result shown in FIG. 1 will be described by taking the recognition of a vehicle as an example.
  • the preprocessing module 110 sequentially uses multiple preprocessing methods to preprocess the initial image, and needs to perform preprocessing in each preprocessing method. After the processing is completed, the data obtained by the preprocessing method is stored.
  • Figure 2 is a schematic flow chart of an image processing method.
  • IPM inverse perspective mapping
  • the initial image can be collected using a fisheye camera.
  • the azimuth field of view of the fisheye camera can reach 360°, and the elevation field of view can reach 90°, which can realize a wide range of monitoring without dead angle.
  • the four-way fisheye cameras installed on the vehicle body collect initial images, and the preprocessing module 110 can respectively perform lens distortion correction and inverse perspective transformation on the initial images collected by each fisheye camera, and then the multiple initial images Image stitching is performed on the result after the perspective transformation of , so as to obtain a ring view, which is the preprocessed image.
  • Each of the various preprocessing methods such as lens distortion correction and inverse perspective transformation of the image can be realized by matrix operations or mapping according to the mapping relationship between the pixels in the image before and after processing the preprocessing method.
  • the preprocessing module 110 performs multiple preprocessing modes in sequence, and generates a preprocessing result corresponding to the preprocessing mode after completing each preprocessing mode.
  • the parking route of the vehicle can be determined according to the environmental conditions on the right side of the vehicle.
  • Image detection can be performed on the right region in the ring view obtained after preprocessing.
  • the preprocessing process multiple preprocessing methods are sequentially performed on the initial image. Due to the limited performance of the processor, the image preprocessing process is slow. In addition, except for the last preprocessing method in the preprocessing process, after each processing corresponding to a preprocessing method, some intermediate calculation results will be generated, occupying the storage resources of memory or other memory.
  • an embodiment of the present application provides an image preprocessing method, which can reduce resource occupation of image preprocessing.
  • FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • At S210 at least one initial image is acquired.
  • At least one initial image sent by other devices can be received.
  • the at least one initial image can also be read in memory.
  • Each initial image may be acquired by a camera. After each camera device captures an initial image, the initial image is transmitted and stored in the memory.
  • one or more of the at least one initial image may also be obtained by preliminarily processing the images collected by the camera device.
  • at least one preprocessing method may be performed on the image acquired by the camera to obtain at least one initial image. This application does not limit the acquisition method of the initial image, which is subject to subsequent preprocessing according to the mapping relationship.
  • a preprocessed first preprocessed image is obtained according to the at least one initial image and the first mapping relationship, and a first mapping exists between the at least one initial image and the pixel positions of the first preprocessed image relationship, the first mapping relationship corresponds to multiple preprocessing modes.
  • the multiple preprocessing manners corresponding to the first mapping relationship may include one or more of affine transformation, IPM, LDC, and geometric transformation. It should be understood that various preprocessing manners may also include other manners.
  • the geometric transformation includes at least one of translation, transposition, mirroring, rotation, resolution adjustment, and the like.
  • the first mapping relationship is used to realize the preprocessing of the at least one initial image, and there is no need to perform operations for each preprocessing mode respectively, which avoids the storage of intermediate data generated by each preprocessing mode, and reduces the need for storage. Occupation of resources.
  • Requirement information can be obtained, and the requirement information is used to indicate the multiple preprocessing methods.
  • the first mapping relationship may be generated according to the requirement information.
  • the requirement information can be used to indicate the requirement of the multiple preprocessing methods for subsequent image processing.
  • the apparatus for performing the subsequent image processing may generate the requirement information, and transmit the requirement information to the image processing apparatus for performing S210 to S220.
  • a first mapping relationship is generated.
  • the determination of the first mapping relationship is made more flexible; on the other hand, there is no need to store a large number of mapping relationships, and only the required first mapping relationship can be generated when needed, which reduces the occupation of storage resources.
  • the preprocessing may be performed on the entire area of each initial image, or only a part of the area may be preprocessed.
  • a preprocessed image is also possible to preprocess the first region image of the first ROI in at least one region of interest (region of interest, ROI) in the at least one initial image according to the first mapping relationship, so as to obtain the first region of interest.
  • the first ROI is a partial area in the original image.
  • the vehicle-mounted camera device For the initial image used by the vehicle-mounted camera device, there are differences in the location areas of people, vehicles, lane lines, and traffic signs in the initial image.
  • the vehicle needs to detect different types of targets, only the images in the ROI corresponding to each type of target in the initial image can be preprocessed.
  • multiple ROIs may correspond to the same preprocessing method.
  • multiple ROIs may have a one-to-one correspondence with multiple preprocessing methods.
  • a preprocessing method corresponding to the ROI can be used to preprocess the image of the region in the ROI.
  • the ROI in the initial image corresponding to the partial area may be determined. Only preprocess the image of the region where the initial image is located in the ROI, which reduces the data that needs to be preprocessed, saves processing resources, and reduces processing time.
  • the number of ROIs can be multiple, and each ROI can correspond to a kind of preprocessing processing needs.
  • the mapping relationship corresponding to each ROI can be used to preprocess the image of the region where the at least one initial image is located in the ROI.
  • the first ROI corresponds to the first mapping relationship, and the first region image of the first ROI is preprocessed according to the first mapping relationship.
  • the image of the second region located in the second ROI in the at least one initial image may be preprocessed by using a mapping relationship corresponding to any one or more second ROIs, or each second ROI,
  • the second ROI is an ROI other than the first ROI in the at least one ROI.
  • a second preprocessed image can be obtained.
  • the second mapping relationship exists between the pixel positions of the at least one initial image and the second preprocessed image.
  • each ROI may correspond to a mapping relationship.
  • Each ROI can be preprocessed by using the mapping relationship between the original image and the pixel positions in the preprocessed image.
  • the images located in each ROI are preprocessed by mapping, which avoids the storage of intermediate data generated by each preprocessing method and reduces the consumption of storage resources.
  • each ROI may include only one continuous area, or may be separated from each other by multiple continuous areas.
  • the same preprocessing method is used for multiple ROIs, there may be no overlap between the multiple ROIs, which avoids repeated processing of the same region and improves the image processing efficiency.
  • the multiple ROIs adopt different preprocessing methods, the multiple ROIs may or may not overlap.
  • the preprocessing of the region images in multiple ROIs can be performed in a serial or parallel manner. Preprocessing the region images in multiple ROIs in parallel can reduce the time required for image preprocessing.
  • the initial image may come from an onboard camera. It can be captured by a vehicle-mounted camera. That is to say, steps S210 to S220 may be used to preprocess the initial image collected by the vehicle-mounted camera device. Further processing of the preprocessed image obtained in S220 may be used to realize functions such as image recognition and prediction of automatic driving/assisted driving.
  • the at least one ROI may be determined according to the driving state of the vehicle, and the vehicle-mounted camera device used for initial image acquisition is set on the vehicle. Compared with the situation where the vehicle is driving horizontally, when the vehicle is uphill, downhill or bumpy, the angle at which the vehicle camera captures the initial image changes, and the area that needs to be detected by various types of targets changes.
  • Different vehicle driving states may correspond to different positions of the ROI.
  • the position of the ROI is adjusted according to the driving state of the vehicle, so as to avoid that the preprocessing result of the image of the region where the initial image is located in the ROI does not meet the requirements of subsequent image processing due to the change of the driving state of the vehicle.
  • Driving state information can be acquired, and the driving state information is used to indicate the driving state information of the vehicle.
  • the position of the first ROI may be determined according to the driving state information. For example, different driving state information may correspond to different positions of the first ROI.
  • the first mapping relationship can be used to map each pixel in the original image.
  • preprocessing the first region image located in the first ROI in the at least one initial image only each pixel in the first region image is mapped.
  • the first mapping relationship may only be used to map each pixel in the first ROI.
  • a new first mapping relationship may be generated according to the demand information.
  • preprocessing can be performed in a serial or parallel manner.
  • Performing the preprocessing in a serial manner can be understood as processing each pixel in the at least one initial image in sequence.
  • the first mapping relationship may be used to sequentially determine the position of the pixel to be processed in the first preprocessed image, thereby generating a first preset image.
  • the pixel to be processed may be a pixel in at least one ROI.
  • Performing preprocessing by means of parallel processing can be understood as processing multiple pixels in at least one initial image at the same time.
  • the positions of the plurality of pixels to be processed in the at least one initial image in the first preprocessed image can be determined at the same time by using the first mapping relationship.
  • At least one initial image may be divided. Each initial image is stored in memory in some format. Dividing at least one initial image into a plurality of image blocks can be understood as storing each image block in this format. That is, when at least one initial image is divided, the at least one initial image needs to be copied, and the processing process is relatively complicated.
  • the first mapping relationship may include multiple sub-mapping relationships, and each sub-mapping relationship corresponds to a sub-region. That is, each sub-mapping relationship is used for the mapping relationship of pixel positions in a sub-region.
  • the initial images in the multiple sub-regions may be preprocessed in parallel according to the multiple sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of at least one initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
  • preprocessing can also be performed in a parallel manner for the region images in which at least one initial image is located in each ROI.
  • the first mapping relationship may include a plurality of sub-mapping relationships, and each sub-mapping relationship corresponds to a sub-region in the first ROI.
  • images in which at least one initial image is located in multiple sub-regions in the first ROI can be preprocessed in parallel according to the multiple sub-mapping relationships.
  • the image processing methods provided in the embodiments of the present application may be applied in the field of automatic driving or assisted driving. Specifically, reference may be made to the descriptions of FIG. 4 to FIG. 6 .
  • the initial image may be captured by an onboard camera.
  • the image processing methods provided in the embodiments of the present application can also be applied to scenarios such as security monitoring, VR equipment, and projection equipment that require image processing through various preprocessing methods.
  • the initial images collected by multiple cameras for collecting monitoring images need to be preprocessed.
  • the cameras installed in supermarkets are mainly used for centralized monitoring of supermarket entrances, cashiers and other locations.
  • the initial images collected by all security cameras can be uniformly preprocessed.
  • the preprocessing for LDC and IPM is performed in parallel for multiple ROI regions in the initial images collected by multiple cameras, and then the preprocessed images of the multiple ROI regions are stitched and displayed for viewing by relevant personnel.
  • the processing efficiency can be improved.
  • one processor preprocesses multiple ROI regions uniformly, which can avoid the preprocessing caused by the different processing capabilities of different processors.
  • the moments corresponding to the images of different regions in the image after stitching the initial image are not exactly the same.
  • FIG. 4 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
  • the image processing system 300 can be applied to the fields of automatic driving, assisted driving, and the like.
  • Image processing system 300 may be located in a vehicle.
  • the image processing system 300 includes a first processing module 310 and a second processing module 320 .
  • the first processing module 310 receives the initial image collected by the camera.
  • the camera device used to capture the initial image may be a vehicle-mounted camera.
  • FIG. 4 takes the initial image collected by the front-view camera installed on the vehicle as an example for description.
  • the forward-looking camera performs image acquisition in real time to obtain the initial image with distortion.
  • the positions of the multiple ROIs can be determined according to the driving state of the vehicle.
  • the first processing module 310 may determine a region image located in each of the multiple ROIs in the initial image. For the region image in each ROI, it is used for preprocessing using the mapping relationship of the pixel positions corresponding to the ROI, so that the position of each pixel in the ROI in the preprocessing image as the preprocessing result can be determined. Also, the preprocessing of the region images in multiple ROIs can be performed in parallel.
  • a preprocessed image corresponding to each ROI can be obtained.
  • the preprocessing of the first processing module 310 may implement one or more functions of affine transformation, inverse perspective transformation, LDC, resolution adjustment, etc. on the image.
  • three preprocessed images can be obtained, which are image 1 to image 3 respectively.
  • the traffic sign is generally located in the upper area of the initial image
  • the vehicle is generally located in the middle area of the preprocessed image
  • the lane line is generally located in The lower region of the preprocessed image.
  • the ROI corresponding to image 1 is the area where objects such as people and vehicles generally appear in the initial image;
  • the ROI corresponding to image 2 is the area where objects such as lane lines generally appear in the initial image;
  • the ROI corresponding to image 3 is the initial image
  • Medium traffic signs identify areas where such objects typically occur.
  • the required image precision is different. For example, for the image of the area where the targets such as people and vehicles are located, a higher resolution is required to achieve more accurate vehicle driving planning; for the image of the area where the target such as the lane line is located, the lower resolution image is used. Lane detection can be achieved.
  • Each ROI may correspond to different requirements of the second processing module 320 for the image.
  • Image 1 implements LDC and resolution enhancement, that is to say, the preprocessing method that can be used to achieve LDC and resolution enhancement using the mapping relationship corresponding to image 1 is LDC and resolution enhancement.
  • the preprocessing methods that can be used to implement the mapping relationship corresponding to image 2 are LDC and resolution reduction.
  • the preprocessing method that can be implemented by using the mapping relationship corresponding to image 3 is LDC.
  • the second processing module 320 is used for further processing the preprocessed image.
  • the second processing module 320 may use a neural network or a traditional computer vision method to perform functions such as target detection, target classification, ranging, etc. on the preprocessed image.
  • the first processing module 310 may be located in an image signal processor (image signal processor, ISP).
  • the ISP may be a processor in an image acquisition device such as a camera.
  • the second processing module 320 may use one or more processors from a central processing unit (CPU), a digital signal processor (DSP), a graphics processing unit (GPU), and the like .
  • CPU central processing unit
  • DSP digital signal processor
  • GPU graphics processing unit
  • the mapping relationship may be stored in the memory in the form of a mapping relationship table.
  • the first processing module 310 may use the mapping relationship table when processing the initial image.
  • the mapping relationship can also be in the form of a mapping function or any other corresponding relationship that can represent pixel positions.
  • the mapping relationship corresponding to each ROI can be determined according to the mapping relationship of each preprocessing mode required for subsequent image processing of the ROI, or it can also be determined according to the parameters of the matrix operation corresponding to each preprocessing mode .
  • each combination in order to avoid interference to the initial image during the preprocessing process of one combination, thereby affecting the preprocessing corresponding to other combinations, each combination can be corresponding to The original image is copied, but the copy of the original image occupies more resources.
  • the pixel position mapping relationship can store the coordinates of each pixel of the initial image in the preprocessed image.
  • the first processing module 310 can determine the preprocessed image by using the mapping relationship table and the bilinear interpolation equal difference algorithm. Specifically, please refer to the description of FIG. 5 .
  • the initial image may be stored in the memory corresponding to the first processing module 310 or in other memory.
  • the preprocessed image generated by the first processing module 310 may be stored in the memory corresponding to the first processing module 310, the memory corresponding to the second processing module 320, or other storages.
  • FIG. 5 is a schematic diagram of an image processing method provided by an embodiment of the present application.
  • each pixel in the preprocessed image can be understood as coming from the pixels in the initial image before preprocessing, that is, there is a correspondence between the pixel positions in the initial image and the preprocessed image.
  • each pixel on the picture after distortion correction is calculated by the pixel on the distortion map captured by the camera through the internal parameters of the camera and the distortion model.
  • the specific relationship can be expressed as:
  • (x, y) is used to represent the coordinates of a pixel in the initial image
  • (x', y') can be understood as the pixel coordinates in the preprocessed image
  • the function F is used to represent the mapping relationship. That is, the pixel (x',y') in the preprocessed image is the same color as the pixel (x,y) in the original image.
  • x, y are integers
  • x' and/or y' may not be integers.
  • the corresponding relationship between the pixels in the initial image and the preprocessed image can be expressed as a mapping relationship table from the initial image to the preprocessed image.
  • Processor resources such as ISP, GPU, CPU, and DSP can use the mapping relationship F to generate preprocessed images.
  • the mapping relationship F may be a mapping relationship table, that is, the preprocessed image may be obtained by looking up the table.
  • An initial image contains a large number of pixels (such as an image with a resolution of 1920 ⁇ 1080, including 2073600 pixels), and the way of querying the mapping table for each pixel in the initial image to generate a preprocessed image still requires a relatively large amount of space. long processing time.
  • FIG. 5 illustrates by taking an example of increasing the resolution of the image (which can also be understood as the enlargement of the image).
  • the mapping relationship table may include four sub-mapping relationships, each of which corresponds to one of the four regions A1 to A4 in the initial image shown in FIG. 5 . Therefore, when the preprocessed image is generated, the regions A1 to A4 can be mapped in parallel by using each sub-mapping relationship in parallel, and the images of the regions B1 to B4 in the preprocessed image can be generated respectively.
  • the preprocessing method can also be performed by using multiple sub-mapping relationships in the mapping relationship table to perform mapping in parallel when looking up the mapping relationship table.
  • the preprocessed image may be generated by means of image interpolation.
  • Each pixel in the image consists of three types of data: Y, U, and V.
  • Y represents the brightness (luminance or luma), that is, the grayscale value
  • U and V represent the chrominance (chrominance or chroma), which is used to describe the color and saturation of the image, which is used to indicate the pixel. s color.
  • the Y data of each pixel in the image in the memory is arranged in the order of the pixels.
  • the U data and V data of each pixel are adjacent and are arranged in the memory in the order of the pixels. That is, after the Y data of all pixels of the image in memory, the U data and V data of the image are interleaved.
  • each image block needs to be stored as data in YUV format, and then each image block is preprocessed.
  • the storage location in the memory of the image data whose initial image is located in the region corresponding to each sub-mapping relationship can be determined in parallel, thereby realizing parallel image preprocessing.
  • mapping relationship table used to realize the preprocessing of improving the overall resolution of the initial image shown in FIG. 5 is shown.
  • serial image preprocessing method can be understood as querying the mapping table according to the order of each pixel in the initial image to determine the position of each pixel in the initial pixel in the preprocessing image. After that, according to the order of the pixels in the preprocessed image, the color of each pixel is calculated by means of the difference value.
  • mapping relationship table can be queried for the image pixels of the initial image located in the region corresponding to each sub-mapping relationship at the same time.
  • each sub-mapping relationship For the preprocessing shown in Figure 5 for improving the overall resolution of the initial image, four sub-mapping relationships are used to determine the corresponding pixel coordinates of the initial image in the image corresponding to each sub-mapping relationship in the preprocessed image. coordinate.
  • the four sub-mapping relationships correspond to the areas A1 to A4, respectively.
  • the image processing process shown in FIG. 2 can be optimized.
  • the ROI area in the initial image captured by the four-way fisheye camera can be determined, and the ROI area corresponds to the image used to represent the environmental situation on the right side of the vehicle in the ring view.
  • the mapping relationship table is used to represent the corresponding relationship between each pixel in the initial image captured by the four-way fisheye camera and each pixel in the ring view.
  • the preprocessed image is obtained through the mapping table, without the need to perform various operations such as lens distortion correction, inverse perspective transformation, etc., which improves the processing efficiency, avoids the generation and storage of intermediate data, and reduces the processing resources and resources. Occupation of storage resources.
  • FIG. 8 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • the image processing apparatus 200 includes an acquisition module 2010 and a processing module 2020 .
  • the acquiring module 2010 is used for acquiring at least one initial image.
  • the processing module 2020 is configured to obtain a pre-processed first pre-processed image according to the at least one initial image and the first mapping relationship, and there is a difference between the pixel positions of the at least one initial image and the first pre-processed image A first mapping relationship, where the first mapping relationship corresponds to multiple preprocessing modes.
  • the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship.
  • the processing module 2020 is further configured to preprocess the image of the second region located in the second ROI in the at least one initial image by using a mapping relationship corresponding to any one or more or each of the second ROIs, where The second ROI is an ROI other than the first ROI in the at least one ROI.
  • the at least one initial image is from a vehicle-mounted camera, and the position of each of the ROIs is obtained according to the driving state of the vehicle.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI.
  • the processing module 2020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on the images located in each of the sub-regions in the at least one initial image.
  • the processing module 2020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on the images located in each of the sub-regions in the at least one initial image.
  • the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
  • the obtaining module 2010 is further configured to obtain demand information, where the demand information is used to indicate the multiple preprocessing methods;
  • the processing module 2020 is further configured to generate the first mapping relationship according to the requirement information.
  • FIG. 9 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • the image processing apparatus 3000 includes at least one memory 3010 and at least one processor 3020, the at least one memory 3010 is used for storing a program, and the at least one processor 3020 is used for running the program to implement the aforementioned method.
  • the processor 3020 is configured to acquire at least one initial image.
  • the processor 3020 is further configured to obtain a preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship, and the pixel positions between the at least one initial image and the first preprocessed image are There is a first mapping relationship, and the first mapping relationship corresponds to multiple preprocessing modes.
  • the processor 3020 is specifically configured to, according to the first mapping relationship, preprocess the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image, so as to obtain the The first preprocessed image.
  • the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship.
  • the processor 3020 is further configured to preprocess the image of the second region located in the second ROI in the at least one initial image by using a mapping relationship corresponding to any one or more or each of the second ROIs, where The second ROI is an ROI other than the first ROI in the at least one ROI.
  • the at least one initial image is from a vehicle-mounted camera device, the position of each of the ROIs is obtained according to the driving state of the vehicle, and the vehicle-mounted camera device is provided on the vehicle.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI.
  • the processor 3020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
  • the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region.
  • the processor 3020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image
  • the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
  • the processor 3020 is further configured to acquire demand information, where the demand information is used to indicate the multiple preprocessing methods
  • the processor 3020 is further configured to generate the first mapping relationship according to the requirement information.
  • the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), application-specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory Fetch memory
  • direct memory bus random access memory direct rambus RAM, DR RAM
  • Embodiments of the present application further provide a computer-readable storage medium, characterized in that, the computer-readable storage medium has program instructions, and when the program instructions are directly or indirectly executed, the foregoing method can be implemented.
  • Embodiments of the present application also provide a computer program product containing instructions, which, when run on a computing device, cause the computing device to execute the foregoing method, or cause the computing device to implement the functions of the foregoing apparatus.
  • An embodiment of the present application further provides a chip system, characterized in that, the chip system includes at least one processor, and when a program instruction is executed in the at least one processor, the foregoing method can be implemented.
  • An embodiment of the present application further provides a terminal, including the image processing apparatus described above.
  • the terminal may be an intelligent transportation device (vehicle or drone), a smart home device, an intelligent manufacturing device, or a robot, and the like.
  • the intelligent transportation device may be, for example, an automated guided vehicle (AGV), or an unmanned transportation vehicle.
  • AGV automated guided vehicle
  • the above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above-described embodiments may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media.
  • the semiconductor medium may be a solid state drive.
  • At least one means one or more, and “plurality” means two or more.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one (a) of a, b or c may represent: a, b, c, a-b, a-c, b-c or a-b-c, wherein a, b, and c may be single or multiple.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

An image processing method and apparatus, which can be applied to the field of intelligent driving of smart automobiles, self-driving or autonomous driving. The image processing method comprises: acquiring at least one initial image (S210); and according to the at least one initial image and a first mapping relationship, obtaining a first pre-processed image after being subjected to pre-processing, wherein there is a first mapping relationship between the at least one initial image and a pixel position of the first pre-processed image, and the first mapping relationship corresponds to a plurality of pre-processing manners (S220). Pre-processing is performed on an initial image by means of a first mapping relationship, so that there is a first mapping relationship between a first pre-processed image obtained by means of pre-processing and a pixel position of the initial image, avoiding the generation and storage of intermediate data, and reducing the occupancy of storage resources.

Description

图像处理方法和装置Image processing method and device
本申请要求于2021年1月5日提交中国专利局、申请号为202110009291.0、申请名称为“图像处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110009291.0 and the application name "Image Processing Method and Apparatus" filed with the China Patent Office on January 5, 2021, the entire contents of which are incorporated into this application by reference.
技术领域technical field
本申请涉及图像处理领域,具体可以应用于智能驾驶、自动驾驶或者无人驾驶等,并且更具体地,涉及一种图像处理方法和装置。The present application relates to the field of image processing, and can be specifically applied to intelligent driving, automatic driving, or unmanned driving, etc., and more specifically, to an image processing method and apparatus.
背景技术Background technique
在进行图像分析时,图像质量的好坏直接影响识别算法的设计与效果的精度,因此在图像分析(特征提取、分割、匹配和识别等)前,需要进行预处理。图像预处理的主要目的是消除图像中无关的信息,恢复有用的真实信息,增强有关信息的可检测性、最大限度地简化数据,从而改进特征提取、图像分割、匹配和识别的可靠性。During image analysis, the quality of the image directly affects the accuracy of the design and effect of the recognition algorithm. Therefore, preprocessing is required before image analysis (feature extraction, segmentation, matching, and recognition, etc.). The main purpose of image preprocessing is to eliminate irrelevant information in images, restore useful real information, enhance the detectability of relevant information, and simplify data to the greatest extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.
对摄像头采集的初始图像进行预处理操作时,依次进行平移、转置、镜像、旋转、仿射变换、逆透视变换(inverse perspective transformation,IPM)、镜头畸变校正(lens distortion correction,LDC)、分辨率调整等中的多种预处理操作。对初始图像进行预处理的过程中,产生大量的中间计算结果,占用内存或其他存储器的存储资源。When preprocessing the initial image collected by the camera, perform translation, transposition, mirroring, rotation, affine transformation, inverse perspective transformation (IPM), lens distortion correction (LDC), resolution in turn. Various preprocessing operations in rate adjustment, etc. In the process of preprocessing the initial image, a large number of intermediate calculation results are generated, occupying the storage resources of memory or other memory.
发明内容SUMMARY OF THE INVENTION
本申请提供一种图像处理方法和装置,能够降低图像预处理对资源的占用。The present application provides an image processing method and apparatus, which can reduce resource occupation of image preprocessing.
第一方面,提供一种图像处理方法,包括:获取至少一个初始图像;根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。In a first aspect, an image processing method is provided, comprising: acquiring at least one initial image; obtaining a preprocessed first preprocessed image according to the at least one initial image and a first mapping relationship, the at least one initial image and A first mapping relationship exists between pixel positions of the first preprocessed image, and the first mapping relationship corresponds to multiple preprocessing modes.
通过利用第一映射关系对初始图像进行预处理,使得预处理得到的第一预处理图像与初始图像的像素位置之间存在第一映射关系,避免了中间数据的产生和存储,减小了对存储资源的占用。By using the first mapping relationship to preprocess the initial image, there is a first mapping relationship between the first preprocessed image obtained by preprocessing and the pixel positions of the initial image, which avoids the generation and storage of intermediate data, and reduces the need for Occupation of storage resources.
结合第一方面,在一些可能的实现方式中,所述根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,包括:根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。With reference to the first aspect, in some possible implementation manners, the obtaining a preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship includes: according to the first mapping relationship, to A first region image of a first ROI in the at least one region of interest ROI in the at least one initial image is preprocessed to obtain the first preprocessed image.
通过对位于第一ROI中的图像进行预处理,降低需要进行预处理的数据量,降低预处理所需的时间。By preprocessing the image located in the first ROI, the amount of data that needs to be preprocessed is reduced, and the time required for preprocessing is reduced.
结合第一方面,在一些可能的实现方式中,所述至少一个ROI的数量为多个,所述第 一ROI对应于所述第一映射关系,所述方法还包括:采用与第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。With reference to the first aspect, in some possible implementation manners, the number of the at least one ROI is multiple, the first ROI corresponds to the first mapping relationship, and the method further includes: using a method corresponding to the second ROI Preprocessing is performed on the second region image located in the second ROI in the at least one initial image, where the second ROI is an ROI other than the first ROI in the at least one ROI.
如果后续图像处理对图像预处理提出了多种需求,即需要经过不同的预处理方式得到的初始图像的预处理结果,则ROI的数量可以是多个,每个ROI可以对应于一种对预处理方式的需求。采用与每个ROI对应于映射关系进行预处理,提供了一种更加灵活的图像处理方式。If the subsequent image processing puts forward various requirements for image preprocessing, that is, the preprocessing results of the initial image need to be obtained by different preprocessing methods, the number of ROIs can be multiple, and each ROI can correspond to a kind of preprocessing processing needs. Using the mapping relationship corresponding to each ROI for preprocessing provides a more flexible image processing method.
应当理解,每个ROI可以对应于一种映射关系。每个ROI可以均利用初始图像与预处理图像中像素位置的映射关系进行预处理。当每个ROI均需要进行多种预处理方式的预处理时,对位于每个ROI的区域图像均采用映射的方式进行预处理,避免了对每种预处理方式产生的中间数据的存储,减少了对存储资源的占用。It should be understood that each ROI may correspond to a mapping relationship. Each ROI can be preprocessed by using the mapping relationship between the original image and the pixel positions in the preprocessed image. When each ROI needs to be preprocessed by multiple preprocessing methods, the images located in each ROI are preprocessed by mapping, which avoids the storage of the intermediate data generated by each preprocessing method and reduces the consumption of storage resources.
每个ROI可以仅包括一个连续的区域,也可以相互分离的多个连续区域。Each ROI can include only one continuous area, or multiple continuous areas separated from each other.
结合第一方面,在一些可能的实现方式中,所述至少一个初始图像来自车载摄像装置,每个所述ROI的位置是根据所述车辆的行驶状态获取的。With reference to the first aspect, in some possible implementations, the at least one initial image is from a vehicle-mounted camera device, and the position of each of the ROIs is acquired according to the driving state of the vehicle.
根据车辆的行使状态调整ROI的位置,避免由于车辆行驶状态变化导致初始图像位于ROI的区域图像的预处理结果不满足后续图像处理的需求。The position of the ROI is adjusted according to the driving state of the vehicle, so as to avoid that the preprocessing result of the image of the region where the initial image is located in the ROI does not meet the requirements of subsequent image processing due to the change of the driving state of the vehicle.
结合第一方面,在一些可能的实现方式中,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域,所述根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,包括:根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。With reference to the first aspect, in some possible implementations, the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI. The first mapping relationship, performing preprocessing on the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image includes: according to the plurality of sub-mapping relationships, performing preprocessing on the at least one initial image in the first ROI. The images located in each of said sub-regions are preprocessed in parallel.
第一映射关系包括多个子映射关系,利用子映射关系对该子映射关系对应的每个区域中的初始图像并行进行预处理。从而,在并行处理以减小图像预处理的时间的同时,避免了对初始图像的划分,使得对于初始图像的并行预处理更为简便。The first mapping relationship includes a plurality of sub-mapping relationships, and the initial images in each region corresponding to the sub-mapping relationships are preprocessed in parallel by using the sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of the initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
结合第一方面,在一些可能的实现方式中,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域,所述根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,包括:根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。With reference to the first aspect, in some possible implementations, the first mapping relationship includes a plurality of sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region, and the first mapping relationship is based on the at least one initial image and the first The mapping relationship to obtain a preprocessed first preprocessed image includes: performing parallel preprocessing on images located in each of the subregions in the at least one initial image according to the plurality of submapping relationships.
第一映射关系包括多个子映射关系,利用子映射关系对该子映射关系对应的每个区域中的初始图像并行进行预处理。从而,在并行处理以减小图像预处理的时间的同时,避免了对初始图像的划分,使得对于初始图像的并行预处理更为简便。The first mapping relationship includes a plurality of sub-mapping relationships, and the initial images in each region corresponding to the sub-mapping relationships are preprocessed in parallel by using the sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of the initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
结合第一方面,在一些可能的实现方式中,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。应当理解,多种预处理方式还可以包括其他的方式。With reference to the first aspect, in some possible implementation manners, the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation. It should be understood that various preprocessing manners may also include other manners.
结合第一方面,在一些可能的实现方式中,所述至少一个初始图像来自车载摄像装置,所述方法还包括:获取需求信息,所述需求信息用于指示所述多种预处理方式;根据所述需求信息,生成所述第一映射关系。With reference to the first aspect, in some possible implementations, the at least one initial image is from a vehicle-mounted camera device, and the method further includes: acquiring demand information, where the demand information is used to indicate the multiple preprocessing methods; The requirement information generates the first mapping relationship.
根据需求信息,生成第一映射关系。一方面,使得第一映射关系的确定更为灵活;另一方面,无需存储大量映射关系,仅在需要时生成所需的第一映射关系即可,减小了对存 储资源的占用。According to the requirement information, a first mapping relationship is generated. On the one hand, the determination of the first mapping relationship is made more flexible; on the other hand, there is no need to store a large number of mapping relationships, and only the required first mapping relationship can be generated when needed, which reduces the occupation of storage resources.
第二方面,提供一种图像处理的装置,包括获取模块和处理模块,所述获取模块用于获取至少一个初始图像;所述处理模块用于根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。In a second aspect, an image processing apparatus is provided, including an acquisition module and a processing module, where the acquisition module is configured to acquire at least one initial image; the processing module is configured to, according to the at least one initial image and the first mapping relationship, A preprocessed first preprocessed image is obtained, and a first mapping relationship exists between the at least one initial image and the pixel positions of the first preprocessed image, and the first mapping relationship corresponds to multiple preprocessing modes.
结合第二方面,在一些可能的实现方式中,所述处理模块具体用于,根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。With reference to the second aspect, in some possible implementations, the processing module is specifically configured to, according to the first mapping relationship, perform the first mapping of the first ROI located in the first ROI in the at least one region of interest ROI in the at least one initial image. The region image is preprocessed to obtain the first preprocessed image.
结合第二方面,在一些可能的实现方式中,所述至少一个ROI的数量为多个,所述第一ROI对应于所述第一映射关系,所述处理模块还用于,采用与第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。。With reference to the second aspect, in some possible implementations, the number of the at least one ROI is multiple, the first ROI corresponds to the first mapping relationship, and the processing module is further configured to: The mapping relationship corresponding to the ROI preprocesses the second region image located in the second ROI in the at least one initial image, and the second ROI is the ROI other than the first ROI in the at least one ROI . .
结合第二方面,在一些可能的实现方式中,所述至少一个初始图像来自车载摄像装置,所述ROI的位置是根据所述车辆的行驶状态获取的。With reference to the second aspect, in some possible implementations, the at least one initial image is from a vehicle-mounted camera device, and the position of the ROI is obtained according to the driving state of the vehicle.
结合第二方面,在一些可能的实现方式中,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域,所述处理模块具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。With reference to the second aspect, in some possible implementations, the first mapping relationship includes multiple sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region in the first ROI, and the processing module specifically is configured to, according to the plurality of sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
结合第二方面,在一些可能的实现方式中,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域,所述处理模块具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。With reference to the second aspect, in some possible implementations, the first mapping relationship includes multiple sub-mapping relationships, each of the sub-mapping relationships corresponds to a sub-region, and the processing module is specifically configured to, according to the multiple sub-mapping relationships There are sub-mapping relationships, and the images located in each of the sub-regions in the at least one initial image are preprocessed in parallel.
结合第二方面,在一些可能的实现方式中,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。With reference to the second aspect, in some possible implementation manners, the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
结合第二方面,在一些可能的实现方式中,所述获取模块还用于,获取需求信息,所述需求信息用于指示所述多种预处理方式;所述处理模块还用于,根据所述需求信息,生成所述第一映射关系。With reference to the second aspect, in some possible implementations, the obtaining module is further configured to obtain requirement information, where the requirement information is used to indicate the multiple preprocessing methods; the processing module is further configured to, according to the The requirement information is generated, and the first mapping relationship is generated.
第三方面,提供一种图像处理装置,包括至少一个存储器和至少一个处理器,所述至少一个存储器用于存储程序,所述至少一个处理器用于运行所述程序以实现第一方面所述的方法。In a third aspect, an image processing apparatus is provided, comprising at least one memory and at least one processor, wherein the at least one memory is used to store a program, and the at least one processor is used to run the program to implement the first aspect. method.
应当理解,程序也可以称为程序代码、计算机指令、计算机程序、程序指令等。It should be understood that a program may also be referred to as program code, computer instructions, computer programs, program instructions, or the like.
第四方面,提供一种芯片,包括至少一个处理器和接口电路,所述接口电路用于为所述至少一个处理器提供程序指令或者数据,所述至少一个处理器用于执行所述程序指令,以实现第一方面所述的方法。In a fourth aspect, a chip is provided, comprising at least one processor and an interface circuit, the interface circuit is configured to provide program instructions or data for the at least one processor, and the at least one processor is configured to execute the program instructions, to implement the method described in the first aspect.
可选地,作为一种实现方式,所述芯片系统还可以包括存储器,所述存储器中存储有程序,所述处理器用于执行所述存储器上存储的程序,当所述程序被执行时,所述处理器用于执行第一方面中的方法。Optionally, as an implementation manner, the chip system may further include a memory, in which a program is stored, the processor is configured to execute the program stored in the memory, and when the program is executed, the The processor is configured to perform the method in the first aspect.
第五方面,提供一种计算机可读存储介质,所述计算机可读介质存储用于设备执行的程序代码,该程序代码被所述设备执行时,实现第一方面所述的方法。In a fifth aspect, a computer-readable storage medium is provided, where the computer-readable medium stores a program code for execution by a device, and when the program code is executed by the device, the method described in the first aspect is implemented.
第六方面,提供一种计算机程序产品,所述计算机程序产品包括计算机程序,当所述 计算机程序产品被计算机执行时,该计算机执行前述第一方面中的方法。In a sixth aspect, a computer program product is provided, the computer program product comprising a computer program, when the computer program product is executed by a computer, the computer performs the method of the aforementioned first aspect.
应理解,本申请中,第一方面的方法具体可以是指第一方面以及第一方面中各种实现方式中的任意一种实现方式中的方法。It should be understood that, in this application, the method of the first aspect may specifically refer to the method in the first aspect and any one of the various implementation manners of the first aspect.
第七方面,提供一种终端,包括第二方面或第三方面所述的图像处理装置。In a seventh aspect, a terminal is provided, including the image processing apparatus described in the second aspect or the third aspect.
进一步,该终端可以为智能运输设备(车辆或者无人机)、智能家居设备、智能制造设备或者机器人等。该智能运输设备例如可以是自动导引运输车(automated guided vehicle,AGV)、或无人运输车。Further, the terminal may be an intelligent transportation device (vehicle or drone), a smart home device, an intelligent manufacturing device, or a robot, and the like. The intelligent transportation device may be, for example, an automated guided vehicle (AGV), or an unmanned transportation vehicle.
附图说明Description of drawings
图1是一种图像处理系统的示意性结构图。FIG. 1 is a schematic structural diagram of an image processing system.
图2是一种图像处理方法的示意性流程图。FIG. 2 is a schematic flowchart of an image processing method.
图3是本申请实施例提供的一种图像处理方法的示意性流程图。FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
图4是本申请实施例提供的一种图像处理系统的示意性结构图。FIG. 4 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
图5是本申请实施例提供的一种图像处理方法的示意图。FIG. 5 is a schematic diagram of an image processing method provided by an embodiment of the present application.
图6是一种图像存储格式的示意图。FIG. 6 is a schematic diagram of an image storage format.
图7是本申请实施例提供的映射关系表。FIG. 7 is a mapping relationship table provided by an embodiment of the present application.
图8是本申请实施例提供的一种图像处理装置的示意性结构图。FIG. 8 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
图9是本申请实施例提供的另一种图像处理装置的示意性结构图。FIG. 9 is a schematic structural diagram of another image processing apparatus provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
智能驾驶技术依靠计算机视觉、雷达、监控装置和全球定位系统等协同合作,让机动车辆可以在不需要人类主动操作或者需要部分人类操作干预的情况下,实现自动驾驶或者辅助驾驶。智能驾驶的车辆使用各种计算系统来帮助将乘客或者货物从一个位置运输到另一位置。一些智能驾驶车辆可能要求来自操作者(诸如,领航员、驾驶员、或者乘客)的一些初始输入或者连续输入。智能驾驶车辆准许操作者从手动模操作式切换到自动驾驶模式或者介于两者之间的模式。由于自动驾驶技术无需人类来驾驶机动车辆,所以理论上能够有效避免人类的驾驶失误,减少交通事故的发生,且能够提高公路的运输效率。因此,自动驾驶等智能驾驶技术越来越受到重视。Intelligent driving technology relies on the cooperation of computer vision, radar, monitoring devices and global positioning systems, etc., so that motor vehicles can realize automatic driving or assisted driving without the need for human active operation or the need for partial human operation intervention. Intelligently driven vehicles use various computing systems to help transport passengers or cargo from one location to another. Some intelligently driven vehicles may require some initial or continuous input from an operator, such as a pilot, driver, or passenger. Intelligent driving vehicles permit the operator to switch from a manual mode of operation to an autonomous driving mode or a mode in between. Since automatic driving technology does not require humans to drive motor vehicles, it can theoretically effectively avoid human driving errors, reduce the occurrence of traffic accidents, and improve the efficiency of highway transportation. Therefore, more and more attention has been paid to intelligent driving technologies such as autonomous driving.
手动模操作式与自动驾驶模式之间的模式可以称为辅助驾驶模式。辅助驾驶模式下,机动车辆的行使不完全依赖人类的主动操作。自动驾驶与辅助驾驶的实现依赖于智能驾驶技术的发展。The mode between the manual mode operation mode and the automatic driving mode may be referred to as an assisted driving mode. In the assisted driving mode, the driving of the motor vehicle does not completely depend on the active operation of humans. The realization of autonomous driving and assisted driving depends on the development of intelligent driving technology.
智能驾驶技术包括感知、决策、控制等阶段。在感知阶段,可以接收周围环境信息,并根据周围环境信息了解认知所处的环境。在决策阶段,可以利用感知阶段输出的信息,对交通参与者的行为进行预测,从而对自车进行行为决策。在控制阶段,可以根据决策阶段的输出计算车辆的横向加速度和纵向加速度,控制自车行驶。Intelligent driving technology includes perception, decision-making, control and other stages. In the perception stage, information about the surrounding environment can be received, and the environment in which the cognition is located can be understood according to the surrounding environment information. In the decision-making stage, the information output in the perception stage can be used to predict the behavior of traffic participants, so as to make behavioral decisions for the self-vehicle. In the control stage, the lateral acceleration and longitudinal acceleration of the vehicle can be calculated according to the output of the decision-making stage to control the driving of the self-vehicle.
周围环境信息可以包括车载摄像装置采集的图像。在感知阶段,可以通过对车载摄像装置采集的图像进行处理。The surrounding environment information may include images captured by the vehicle-mounted camera device. In the perception stage, the images collected by the on-board camera can be processed.
在对图像进行特征提取、分割、匹配和识别等图像分析时,初始图像质量的好坏直接 影响分析算法的设计与分析结果的精度,因此在图像分析前,需要对图像进行预处理。图像预处理的主要目的是消除图像中的噪声等无关的信息,并增强有效信息的可检测性、最大限度地简化数据,从而改进特征提取、图像分割、匹配和识别的可靠性。In image analysis such as feature extraction, segmentation, matching and recognition, the quality of the initial image directly affects the design of the analysis algorithm and the accuracy of the analysis results. Therefore, the image needs to be preprocessed before image analysis. The main purpose of image preprocessing is to eliminate irrelevant information such as noise in the image, enhance the detectability of effective information, and simplify the data to the greatest extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.
图1是一种图像处理系统的示意性结构图。FIG. 1 is a schematic structural diagram of an image processing system.
图像处理系统100包括预处理模块110和处理模块120。预处理模块110和处理模块120的功能可以通过至少一个处理器实现。The image processing system 100 includes a preprocessing module 110 and a processing module 120 . The functions of the preprocessing module 110 and the processing module 120 may be implemented by at least one processor.
预处理模块110用于对初始图像进行预处理。The preprocessing module 110 is used for preprocessing the initial image.
初始图像可以是至少一个摄像头采集的图像。如图1中所示的初始图像,可以是设置在车辆上的前视摄像头采集的。The initial image may be an image captured by at least one camera. The initial image as shown in FIG. 1 may be collected by a forward-looking camera installed on the vehicle.
预处理模块110可以对初始图像进行平移、转置、镜像、旋转、仿射变换、逆透视变换(inverse perspective transformation,IPM)、镜头畸变校正(lens distortion correction,LDC)、分辨率调整等中的一种或多种操作。The preprocessing module 110 may perform translation, transposition, mirroring, rotation, affine transformation, inverse perspective transformation (IPM), lens distortion correction (LDC), resolution adjustment, etc. on the initial image. one or more operations.
仿射变换用于对图像中每个点的坐标进行线性变换,还可以将线性变换后的坐标平移一定距离。通过仿射变换,图像可以绕任意中心旋转任意角度。Affine transformation is used to linearly transform the coordinates of each point in the image, and it can also translate the linearly transformed coordinates by a certain distance. Through affine transformation, the image can be rotated by any angle around any center.
在自动驾驶、辅助驾驶等智能驾驶领域中,车道线的检测非常重要。在前视摄像头拍摄的图像中,由于透视效应的存在,本来平行的车道线等物体,在图像中有相交的趋势。而逆透视变换可以消除这种透视效应。通过IPM可以得到初始图像中的物体沿竖直向下方向的投影(即正投影)。In the field of intelligent driving such as automatic driving and assisted driving, the detection of lane lines is very important. In the image captured by the front-view camera, due to the existence of perspective effect, objects such as lane lines that are originally parallel tend to intersect in the image. The inverse perspective transform can eliminate this perspective effect. Through IPM, the projection of the object in the initial image along the vertical downward direction (ie, the orthographic projection) can be obtained.
透镜由于制造精度以及组装工艺的偏差会引入畸变,导致原始图像的失真。镜头的畸变分为径向畸变和切向畸变两类。径向畸变就是沿着透镜半径方向分布的畸变,产生原因是光线在原理透镜中心的地方比靠近中心的地方更加弯曲。切向畸变是由于透镜本身与相机传感器平面(成像平面)或图像平面不平行而产生的,这种情况多是由于透镜被粘贴到镜头模组上的安装偏差导致。通过LDC可以减小甚至消除透镜引起的图像失真。Lenses can introduce distortion due to manufacturing accuracy and assembly process deviations, resulting in distortion of the original image. The distortion of the lens is divided into two categories: radial distortion and tangential distortion. Radial distortion is the distortion distributed along the radial direction of the lens, which is caused by the fact that the light rays are more curved at the center of the principle lens than near the center. Tangential distortion is caused by the lens itself being not parallel to the camera sensor plane (imaging plane) or the image plane, which is mostly caused by the installation deviation of the lens being pasted on the lens module. Image distortion caused by the lens can be reduced or even eliminated by LDC.
如图1中所示的预处理后的图像,是经过LDC得到的。The preprocessed image shown in Figure 1 is obtained by LDC.
处理模块120可以对预处理后的图像进行进一步处理。The processing module 120 may further process the preprocessed image.
例如,在自动驾驶领域,预处理后的图像将发送到后端的处理模块120。处理模块120对预处理后的图像进行识别,确定预处理后的图像中的人、车辆、车道线、交通指示标识等。For example, in the field of autonomous driving, the preprocessed image will be sent to the processing module 120 at the back end. The processing module 120 recognizes the preprocessed image, and determines people, vehicles, lane lines, traffic signs and the like in the preprocessed image.
一般情况下,不同类型目标的识别可以使用不同的神经网络模型。图1所示的处理结果以识别车辆为例进行说明。In general, different neural network models can be used for the recognition of different types of targets. The processing result shown in FIG. 1 will be described by taking the recognition of a vehicle as an example.
当初始图像需要经过多种预处理方式的处理才能得到所需的预处理后的图像时,预处理模块110依次采用多种预处理方式对初始图像进行预处理,并需要在每种预处理方式的处理完成后,对该预处理方式得到的数据进行存储。When the initial image needs to undergo multiple preprocessing methods to obtain the required preprocessed image, the preprocessing module 110 sequentially uses multiple preprocessing methods to preprocess the initial image, and needs to perform preprocessing in each preprocessing method. After the processing is completed, the data obtained by the preprocessing method is stored.
如图2所示是一种图像处理方法的示意性流程图。Figure 2 is a schematic flow chart of an image processing method.
很多车辆都设置有车载环视系统,即通过安装在车身四周的至少四个摄像头,通过一系列的图像预处理得到一张环视的逆透视映射(inverse perspective mapping,IPM)图(即鸟瞰图、俯视图),在泊车等场景中对于司机提供辅助。Many vehicles are equipped with in-vehicle surround view systems, that is, through a series of image preprocessing through at least four cameras installed around the body, an inverse perspective mapping (IPM) map (ie, bird's eye view, top view) is obtained. ) to assist the driver in scenarios such as parking.
可以采用鱼眼摄像头进行初始图像的采集。鱼眼摄像头的方位视场角达到360°,俯仰视场角可以达到90°,可以实现大范围无死角的监控。The initial image can be collected using a fisheye camera. The azimuth field of view of the fisheye camera can reach 360°, and the elevation field of view can reach 90°, which can realize a wide range of monitoring without dead angle.
具体地,安装在车身上的四路鱼眼摄像头采集初始图像,预处理模块110可以对每个鱼眼摄像头采集的初始图像分别进行镜头畸变的校正、逆透视变换,之后对该多个初始图像的透视变换之后的结果进行图像拼接,从而得到环视图,环视图即为预处理图像。Specifically, the four-way fisheye cameras installed on the vehicle body collect initial images, and the preprocessing module 110 can respectively perform lens distortion correction and inverse perspective transformation on the initial images collected by each fisheye camera, and then the multiple initial images Image stitching is performed on the result after the perspective transformation of , so as to obtain a ring view, which is the preprocessed image.
对图像的镜头畸变校正、逆透视变换等多种预处理方式中的每种预处理方式,均可以通过矩阵运算或根据该预处理方式处理前后图像中像素之间的映射关系进行映射等方法实现。预处理模块110依次进行多种预处理方式,并在完成每种预处理方式后生成经过该预处理方式对应的预处理结果。Each of the various preprocessing methods such as lens distortion correction and inverse perspective transformation of the image can be realized by matrix operations or mapping according to the mapping relationship between the pixels in the image before and after processing the preprocessing method. . The preprocessing module 110 performs multiple preprocessing modes in sequence, and generates a preprocessing result corresponding to the preprocessing mode after completing each preprocessing mode.
以车辆靠道路右侧行驶为例,在车辆需要侧向停车时,可以根据车辆右侧的环境情况确定车辆的停车路线。可以对预处理后得到的环视图中右侧区域进行图像检测。Taking the vehicle driving on the right side of the road as an example, when the vehicle needs to park sideways, the parking route of the vehicle can be determined according to the environmental conditions on the right side of the vehicle. Image detection can be performed on the right region in the ring view obtained after preprocessing.
按照预处理的流程,对初始图像依次进行多种预处理方式的处理,由于处理器的性能受限,图像的预处理过程较慢。另外,除预处理的流程中最后的预处理方式,每经过一种预处理方式对应的处理,会产生一些中间计算结果,占用内存或其他存储器的存储资源。According to the preprocessing process, multiple preprocessing methods are sequentially performed on the initial image. Due to the limited performance of the processor, the image preprocessing process is slow. In addition, except for the last preprocessing method in the preprocessing process, after each processing corresponding to a preprocessing method, some intermediate calculation results will be generated, occupying the storage resources of memory or other memory.
为了解决上述问题,本申请实施例提供了一种图像预处理的方法,能够减少图像预处理对资源的占用。In order to solve the above problem, an embodiment of the present application provides an image preprocessing method, which can reduce resource occupation of image preprocessing.
图3是本申请实施例提供的一种图像处理方法的示意性流程图。FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
在S210,获取至少一个初始图像。At S210, at least one initial image is acquired.
可以接收其他设备发送的至少一个初始图像。也可以在存储器中读取该至少一个初始图像。At least one initial image sent by other devices can be received. The at least one initial image can also be read in memory.
每个初始图像可以是一个摄像装置采集得到的。每个摄像装置采集初始图像后,将初始图像传输并存储在存储器中。Each initial image may be acquired by a camera. After each camera device captures an initial image, the initial image is transmitted and stored in the memory.
需要说明的是,该至少一个初始图像中的一个或多个也可以是对摄像装置采集得到的图像进行初步的处理得到的。例如,可以对摄像装置采集得到的图像进行至少一种预处理方式的预处理,以得到至少一个初始图像。本申请不对初始图像的获取方式进行限定,以后续能够根据映射关系进行预处理为准。It should be noted that, one or more of the at least one initial image may also be obtained by preliminarily processing the images collected by the camera device. For example, at least one preprocessing method may be performed on the image acquired by the camera to obtain at least one initial image. This application does not limit the acquisition method of the initial image, which is subject to subsequent preprocessing according to the mapping relationship.
在S220,根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。At S220, a preprocessed first preprocessed image is obtained according to the at least one initial image and the first mapping relationship, and a first mapping exists between the at least one initial image and the pixel positions of the first preprocessed image relationship, the first mapping relationship corresponds to multiple preprocessing modes.
第一映射关系对应的多种预处理方式可以包括仿射变换、IPM、LDC、几何变换等中的一种或多种。应当理解,多种预处理方式还可以包括其他的方式。几何变换包括平移、转置、镜像、旋转、分辨率调整等中的至少一个。The multiple preprocessing manners corresponding to the first mapping relationship may include one or more of affine transformation, IPM, LDC, and geometric transformation. It should be understood that various preprocessing manners may also include other manners. The geometric transformation includes at least one of translation, transposition, mirroring, rotation, resolution adjustment, and the like.
也就是说,利用第一映射关系,对初始图像进行处理,可以实现经过该多种预处理方式进行处理后得到的结果。That is to say, by using the first mapping relationship to process the initial image, the result obtained after processing through the various preprocessing methods can be realized.
通过S210至S220,利用第一映射关系实现对至少一个初始图像的预处理,无需分别针对每种预处理方式进行运算,避免了对每种预处理方式产生的中间数据的存储,减少了对存储资源的占用。Through S210 to S220, the first mapping relationship is used to realize the preprocessing of the at least one initial image, and there is no need to perform operations for each preprocessing mode respectively, which avoids the storage of intermediate data generated by each preprocessing mode, and reduces the need for storage. Occupation of resources.
可以获取需求信息,需求信息用于指示所述多种预处理方式。可以根据需求信息,生成第一映射关系。需求信息可以用于指示后续图像处理的对该多种预处理方式的需求。Requirement information can be obtained, and the requirement information is used to indicate the multiple preprocessing methods. The first mapping relationship may be generated according to the requirement information. The requirement information can be used to indicate the requirement of the multiple preprocessing methods for subsequent image processing.
当后续图像处理对预处理方式的需求变化时,用于进行后续图像处理的装置可以生成需求信息,并传输至用于执行S210至S220的图像处理装置。When the requirement of the subsequent image processing on the preprocessing method changes, the apparatus for performing the subsequent image processing may generate the requirement information, and transmit the requirement information to the image processing apparatus for performing S210 to S220.
根据需求信息,生成第一映射关系。一方面,使得第一映射关系的确定更为灵活;另一方面,无需存储大量映射关系,仅在需要时生成所需的第一映射关系即可,减小了对存储资源的占用。According to the requirement information, a first mapping relationship is generated. On the one hand, the determination of the first mapping relationship is made more flexible; on the other hand, there is no need to store a large number of mapping relationships, and only the required first mapping relationship can be generated when needed, which reduces the occupation of storage resources.
其中,可以对每张初始图像的全部区域进行预处理,或者,也可以仅对部分区域进行预处理。Wherein, the preprocessing may be performed on the entire area of each initial image, or only a part of the area may be preprocessed.
进一步,还可以根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域(region of interest,ROI)中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。Further, it is also possible to preprocess the first region image of the first ROI in at least one region of interest (region of interest, ROI) in the at least one initial image according to the first mapping relationship, so as to obtain the first region of interest. A preprocessed image.
通过对位于第一ROI中的图像进行预处理,降低需要进行预处理的数据量,降低预处理所需的时间。应当理解,第一ROI为初始图像中的部分区域。By preprocessing the image located in the first ROI, the amount of data that needs to be preprocessed is reduced, and the time required for preprocessing is reduced. It should be understood that the first ROI is a partial area in the original image.
对于车载摄像装置采用的初始图像,人、车辆、车道线、交通指示标识等在初始图像中的位置区域存在差异。在车辆需要对不同类型的目标进行检测时,可以仅对初始图像中每类目标对应的ROI中的图像进行预处理。For the initial image used by the vehicle-mounted camera device, there are differences in the location areas of people, vehicles, lane lines, and traffic signs in the initial image. When the vehicle needs to detect different types of targets, only the images in the ROI corresponding to each type of target in the initial image can be preprocessed.
可选的,多个ROI可以对应于相同的预处理方式。或者,多个ROI可以与多个预处理方式具有一一对应关系。又或者,多个ROI中可以存在至少两个ROI对应不同的预处理方式。对于每个ROI,可以采用与该ROI对应的预处理方式对该ROI中的区域图像进行预处理。Optionally, multiple ROIs may correspond to the same preprocessing method. Alternatively, multiple ROIs may have a one-to-one correspondence with multiple preprocessing methods. Alternatively, there may be at least two ROIs in the multiple ROIs corresponding to different preprocessing methods. For each ROI, a preprocessing method corresponding to the ROI can be used to preprocess the image of the region in the ROI.
如果后续图像处理仅需要对初始图像的预处理结果中的部分区域进行处理,可以确定该部分区域对应的初始图像中的ROI。仅对初始图像位于ROI中的区域图像进行预处理,减小需要进行预处理的数据,节约处理资源,减小处理时间。If the subsequent image processing only needs to process a partial area in the preprocessing result of the initial image, the ROI in the initial image corresponding to the partial area may be determined. Only preprocess the image of the region where the initial image is located in the ROI, which reduces the data that needs to be preprocessed, saves processing resources, and reduces processing time.
如果后续图像处理对图像预处理提出了多种需求,即需要经过不同的预处理方式得到的初始图像的预处理结果,则ROI的数量可以是多个,每个ROI可以对应于一种对预处理方式的需求。If the subsequent image processing puts forward various requirements for image preprocessing, that is, the preprocessing results of the initial image need to be obtained by different preprocessing methods, the number of ROIs can be multiple, and each ROI can correspond to a kind of preprocessing processing needs.
可以根据多个ROI与多个映射关系的对应关系,采用所述每个ROI对应的映射关系对至少一个初始图像位于该ROI中的区域图像进行预处理。第一ROI对应于第一映射关系,则根据所述第一映射关系对第一ROI的第一区域图像进行预处理。According to the corresponding relationship between the multiple ROIs and the multiple mapping relationships, the mapping relationship corresponding to each ROI can be used to preprocess the image of the region where the at least one initial image is located in the ROI. The first ROI corresponds to the first mapping relationship, and the first region image of the first ROI is preprocessed according to the first mapping relationship.
也就是说,可以采用与任一个或多个第二ROI、或者每个第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。That is, the image of the second region located in the second ROI in the at least one initial image may be preprocessed by using a mapping relationship corresponding to any one or more second ROIs, or each second ROI, The second ROI is an ROI other than the first ROI in the at least one ROI.
应当理解,对于每个第二ROI,采用该第二ROI对应的第二映射关系对至少一个初始图像位于该第二ROI中的第二区域图像进行预处理,可以得到第二预处理图像。至少一个初始图像与该第二预处理图像的像素位置之间存在该第二映射关系。It should be understood that, for each second ROI, using the second mapping relationship corresponding to the second ROI to preprocess at least one second region image where the initial image is located in the second ROI, a second preprocessed image can be obtained. The second mapping relationship exists between the pixel positions of the at least one initial image and the second preprocessed image.
应当理解,每个ROI可以对应于一种映射关系。每个ROI可以均利用初始图像与预处理图像中像素位置的映射关系进行预处理。当每个ROI均需要进行多种预处理方式的预处理时,对位于每个ROI的区域图像均采用映射的方式进行预处理,避免了对每种预处理方式产生的中间数据的存储,减少了对存储资源的占用。It should be understood that each ROI may correspond to a mapping relationship. Each ROI can be preprocessed by using the mapping relationship between the original image and the pixel positions in the preprocessed image. When each ROI needs to be preprocessed by multiple preprocessing methods, the images located in each ROI are preprocessed by mapping, which avoids the storage of intermediate data generated by each preprocessing method and reduces the consumption of storage resources.
应当理解,每个ROI可以仅包括一个连续的区域,也可以相互分离的多个连续区域。当多个ROI采用相同的预处理方式时,该多个ROI之间可以不存在重叠,避免对同一区域的重复处理,提高图像处理效率。当该多个ROI采用不同的预处理方式时,该多个ROI 之间可以存在或不存在重叠。It should be understood that each ROI may include only one continuous area, or may be separated from each other by multiple continuous areas. When the same preprocessing method is used for multiple ROIs, there may be no overlap between the multiple ROIs, which avoids repeated processing of the same region and improves the image processing efficiency. When the multiple ROIs adopt different preprocessing methods, the multiple ROIs may or may not overlap.
对于多个ROI中的区域图像的预处理,可以采用串行或并行的方式进行。采用并行的方式对多个ROI中的区域图像进行预处理,可以减少图像预处理所需的时间。The preprocessing of the region images in multiple ROIs can be performed in a serial or parallel manner. Preprocessing the region images in multiple ROIs in parallel can reduce the time required for image preprocessing.
所述初始图像可以来自车载摄像装置。可以是车载摄像装置采集的。也就是说,步骤S210至S220可以用于对车载摄像装置采集的初始图像进行预处理。对S220得到的预处理图像进一步进行的处理,可以是用于实现自动驾驶/辅助驾驶的图像识别、预测等功能。The initial image may come from an onboard camera. It can be captured by a vehicle-mounted camera. That is to say, steps S210 to S220 may be used to preprocess the initial image collected by the vehicle-mounted camera device. Further processing of the preprocessed image obtained in S220 may be used to realize functions such as image recognition and prediction of automatic driving/assisted driving.
所述至少一个ROI可以是根据车辆的行驶状态确定的,用于进行初始图像采集的车载摄像装置设置于该车辆上。与车辆处于水平行驶的情况相比,车辆处于上坡、下坡或颠簸状态时,车载摄像头采集初始图像的角度发生变化,需要各个类型的目标进行检测的区域发生变化。The at least one ROI may be determined according to the driving state of the vehicle, and the vehicle-mounted camera device used for initial image acquisition is set on the vehicle. Compared with the situation where the vehicle is driving horizontally, when the vehicle is uphill, downhill or bumpy, the angle at which the vehicle camera captures the initial image changes, and the area that needs to be detected by various types of targets changes.
不同的车辆行驶状态可以对应于ROI不同的位置。Different vehicle driving states may correspond to different positions of the ROI.
根据车辆的行使状态调整ROI的位置,避免由于车辆行驶状态变化导致初始图像位于ROI的区域图像的预处理结果不满足后续图像处理的需求。The position of the ROI is adjusted according to the driving state of the vehicle, so as to avoid that the preprocessing result of the image of the region where the initial image is located in the ROI does not meet the requirements of subsequent image processing due to the change of the driving state of the vehicle.
可以获取行驶状态信息,行驶状态信息用于指示车辆的行驶状态信息。可以根据行驶状态信息,确定第一ROI的位置。例如,不同的行驶状态信息可以对应于第一ROI的不同位置。Driving state information can be acquired, and the driving state information is used to indicate the driving state information of the vehicle. The position of the first ROI may be determined according to the driving state information. For example, different driving state information may correspond to different positions of the first ROI.
应当理解,第一映射关系可以用于对初始图像中每个像素进行映射。在对至少一个初始图像中位于第一ROI的第一区域图像进行预处理时,仅对第一区域图像中的各个像素进行映射。It should be understood that the first mapping relationship can be used to map each pixel in the original image. When preprocessing the first region image located in the first ROI in the at least one initial image, only each pixel in the first region image is mapped.
或者,第一映射关系可以仅用于对第一ROI中的各个像素进行映射。在车辆行驶状态变化时,可以根据需求信息,生成新的第一映射关系。Alternatively, the first mapping relationship may only be used to map each pixel in the first ROI. When the driving state of the vehicle changes, a new first mapping relationship may be generated according to the demand information.
对于至少一个初始图像,可以采用串行或并行的方式进行预处理。For at least one initial image, preprocessing can be performed in a serial or parallel manner.
采用串行的方式进行预处理,可以理解为依次对至少一个初始图像中的各个像素进行处理。对于至少一个初始图像中每个待处理像素,可以利用第一映射关系,依次确定该待处理像素在第一预处理图像中的位置,从而生成第一预设图像。该待处理像素可以是至少一个ROI中的像素。Performing the preprocessing in a serial manner can be understood as processing each pixel in the at least one initial image in sequence. For each pixel to be processed in the at least one initial image, the first mapping relationship may be used to sequentially determine the position of the pixel to be processed in the first preprocessed image, thereby generating a first preset image. The pixel to be processed may be a pixel in at least one ROI.
采用并行处理的方式进行预处理,可以理解为同时对至少一个初始图像中的多个像素进行处理。可以利用第一映射关系,同时对至少一个初始图像中多个待处理像素在第一预处理图像中的位置进行确定。Performing preprocessing by means of parallel processing can be understood as processing multiple pixels in at least one initial image at the same time. The positions of the plurality of pixels to be processed in the at least one initial image in the first preprocessed image can be determined at the same time by using the first mapping relationship.
通过并行的方式对至少一个初始图像进行预处理,可以减小图像预处理的时间,提高处理速率。为了实现并行的预处理过程,可以对至少一个初始图像的划分。每个初始图像按照某种格式存储在存储器中。将至少一个初始图像划分为多个图像块,可以理解为,将各个图像块以该格式进行存储。也就是说,在对至少一个初始图像进行划分时,需要对该至少一个初始图像进行拷贝,处理过程较为复杂。By preprocessing at least one initial image in parallel, the time for image preprocessing can be reduced and the processing rate can be improved. In order to implement a parallel preprocessing process, at least one initial image may be divided. Each initial image is stored in memory in some format. Dividing at least one initial image into a plurality of image blocks can be understood as storing each image block in this format. That is, when at least one initial image is divided, the at least one initial image needs to be copied, and the processing process is relatively complicated.
或者,第一映射关系可以包括多个子映射关系,每个子映射关系对应于一个子区域。也就是说,每个子映射关系用于一个子区域中像素位置的映射关系。Alternatively, the first mapping relationship may include multiple sub-mapping relationships, and each sub-mapping relationship corresponds to a sub-region. That is, each sub-mapping relationship is used for the mapping relationship of pixel positions in a sub-region.
可以根据该多个子映射关系,并行对该多个子区域中的初始图像进行预处理。从而,在并行处理以减小图像预处理的时间的同时,避免了对至少一个初始图像的划分,使得对于初始图像的并行预处理更为简便。The initial images in the multiple sub-regions may be preprocessed in parallel according to the multiple sub-mapping relationships. Therefore, while parallel processing is performed to reduce the time of image preprocessing, the division of at least one initial image is avoided, so that the parallel preprocessing of the initial image is more convenient.
应当理解,对于至少一个初始图像位于每个ROI中的区域图像,也可以采用并行的方式进行预处理。例如,对于第一ROI,第一映射关系可以包括多个子映射关系,每个子映射关系对应于第一ROI中的一个子区域。从而,可以根据该多个子映射关系,并行对至少一个初始图像位于第一ROI中的多个子区域中的图像进行预处理。It should be understood that preprocessing can also be performed in a parallel manner for the region images in which at least one initial image is located in each ROI. For example, for the first ROI, the first mapping relationship may include a plurality of sub-mapping relationships, and each sub-mapping relationship corresponds to a sub-region in the first ROI. Thus, images in which at least one initial image is located in multiple sub-regions in the first ROI can be preprocessed in parallel according to the multiple sub-mapping relationships.
本申请实施例提供的图像处理方法可以应用在自动驾驶或辅助驾驶领域,具体地,可以参见图4至图6的说明。初始图像可以是车载摄像头采集的。The image processing methods provided in the embodiments of the present application may be applied in the field of automatic driving or assisted driving. Specifically, reference may be made to the descriptions of FIG. 4 to FIG. 6 . The initial image may be captured by an onboard camera.
本申请实施例提供的图像处理方法也可以应用在安防监控、VR设备、投影设备等需要经过多种预处理方式进行图像处理的场景。The image processing methods provided in the embodiments of the present application can also be applied to scenarios such as security monitoring, VR equipment, and projection equipment that require image processing through various preprocessing methods.
在安防监控场景中,需要对多个用于采集监控图像的摄像头采集的初始图像进行预处理。安装在超市的摄像头,主要针对超市门口,收银台等位置进行集中监测。可以对所有安防摄像头采集的初始图像统一进行预处理。对于多个摄像头采集的初始图像中的多个ROI区域并行进行用于实现LDC、IPM的预处理,再将该多个ROI区域预处理后的图像进行拼接和显示,提供有关人员观看。In a security monitoring scenario, the initial images collected by multiple cameras for collecting monitoring images need to be preprocessed. The cameras installed in supermarkets are mainly used for centralized monitoring of supermarket entrances, cashiers and other locations. The initial images collected by all security cameras can be uniformly preprocessed. The preprocessing for LDC and IPM is performed in parallel for multiple ROI regions in the initial images collected by multiple cameras, and then the preprocessed images of the multiple ROI regions are stitched and displayed for viewing by relevant personnel.
通过对多个摄像头采集的初始图像中的多个ROI区域并行进行预处理,可以提高处理效率。与多个处理器分别对一个摄像头采集的初始图像进行预处理的方式相比,由一个处理器统一对多个ROI区域进行预处理,可以避免不同处理器的处理能力不同导致的对预处理后的初始图像进行拼接后的图像中不同区域的图像对应的时刻不完全相同。By preprocessing multiple ROI regions in the initial images collected by multiple cameras in parallel, the processing efficiency can be improved. Compared with the way that multiple processors preprocess the initial image collected by one camera, one processor preprocesses multiple ROI regions uniformly, which can avoid the preprocessing caused by the different processing capabilities of different processors. The moments corresponding to the images of different regions in the image after stitching the initial image are not exactly the same.
对于VR设备、投影设备,一般需要对获取的初始图像进行分辨率的调整、放射变化等多种预处理方式。采用S210至S220对初始图像进行预处理,可以避免对每种预处理方式产生的中间数据的存储,减少了对存储资源的占用。For VR equipment and projection equipment, it is generally necessary to perform various preprocessing methods such as resolution adjustment and radiation change on the acquired initial image. Using S210 to S220 to preprocess the initial image can avoid the storage of the intermediate data generated by each preprocessing method, and reduce the occupation of storage resources.
图4是本申请实施例提供的一种图像处理系统的示意性结构图。FIG. 4 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
图像处理系统300可以应用于自动驾驶、辅助驾驶等领域。图像处理系统300可以位于车辆中。The image processing system 300 can be applied to the fields of automatic driving, assisted driving, and the like. Image processing system 300 may be located in a vehicle.
图像处理系统300包括第一处理模块310和第二处理模块320。The image processing system 300 includes a first processing module 310 and a second processing module 320 .
第一处理模块310接收摄像头采集的初始图像。The first processing module 310 receives the initial image collected by the camera.
用于采集初始图像的摄像装置可以是车载摄像头。图4以设置在车辆上的前视摄像头采集的初始图像为例进行说明。前视摄像头实时进行图像采集以得到带有畸变的初始图像。The camera device used to capture the initial image may be a vehicle-mounted camera. FIG. 4 takes the initial image collected by the front-view camera installed on the vehicle as an example for description. The forward-looking camera performs image acquisition in real time to obtain the initial image with distortion.
可以根据车辆的行驶状态确定多个ROI的位置。The positions of the multiple ROIs can be determined according to the driving state of the vehicle.
第一处理模块310获取初始图像之后,可以确定初始图像中位于该多个ROI中每个ROI的区域图像。对于每个ROI中的区域图像,用于采用与该ROI对应的像素位置的映射关系进行预处理,从而可以确定该ROI中每个像素在作为预处理结果的预处理图像中的位置。并且,该对于多个ROI中的区域图像的预处理可以并行进行。After acquiring the initial image, the first processing module 310 may determine a region image located in each of the multiple ROIs in the initial image. For the region image in each ROI, it is used for preprocessing using the mapping relationship of the pixel positions corresponding to the ROI, so that the position of each pixel in the ROI in the preprocessing image as the preprocessing result can be determined. Also, the preprocessing of the region images in multiple ROIs can be performed in parallel.
经过第一处理模块310对初始图像的处理,可以得到每个ROI对应的预处理图像。After the first processing module 310 processes the initial image, a preprocessed image corresponding to each ROI can be obtained.
第一处理模块310的预处理,可以实现对图像的仿射变换、逆透视变换、LDC、分辨率调整等中的一种或多种功能。The preprocessing of the first processing module 310 may implement one or more functions of affine transformation, inverse perspective transformation, LDC, resolution adjustment, etc. on the image.
如图4所示,经过第一处理模块310对前视摄像头采集的初始图像的预处理,可以得到三个预处理图像,分别为图像1至图像3。As shown in FIG. 4 , after the first processing module 310 preprocesses the initial image collected by the front-view camera, three preprocessed images can be obtained, which are image 1 to image 3 respectively.
人、车辆、车道线、交通指示标识等目标在初始图像中的位置区域存在差异。例如, 对于前视摄像头采集的初始图像(例如图4中所示的初始图像),交通指示标识一般位于初始图像的靠上方区域,车辆一般位于预处理后的图像的中间区域,车道线一般位于预处理后的图像的靠下方的区域。There are differences in the location areas of objects such as people, vehicles, lane lines, and traffic signs in the initial image. For example, for the initial image collected by the front-view camera (such as the initial image shown in Figure 4), the traffic sign is generally located in the upper area of the initial image, the vehicle is generally located in the middle area of the preprocessed image, and the lane line is generally located in The lower region of the preprocessed image.
图像1对应的ROI,是初始图像中人、车辆这类目标一般出现的区域;图像2对应的ROI,是初始图像中车道线这类目标一般出现的区域;图像3对应的ROI,是初始图像中交通指示标识这类目标一般出现的区域。The ROI corresponding to image 1 is the area where objects such as people and vehicles generally appear in the initial image; the ROI corresponding to image 2 is the area where objects such as lane lines generally appear in the initial image; the ROI corresponding to image 3 is the initial image Medium traffic signs identify areas where such objects typically occur.
第二处理模块320对于不同类型的目标进行处理时,所需的图像的精度不同。例如对于人、车辆这类目标所在区域的图像,需要的分辨率较高,以实现更为准确的车辆行驶规划;而对于车道线这类目标所在区域的图像,利用较低分辨率的图像即可实现车道线检测。When the second processing module 320 processes different types of objects, the required image precision is different. For example, for the image of the area where the targets such as people and vehicles are located, a higher resolution is required to achieve more accurate vehicle driving planning; for the image of the area where the target such as the lane line is located, the lower resolution image is used. Lane detection can be achieved.
每个ROI可以对应于第二处理模块320对图像的不同需求。Each ROI may correspond to different requirements of the second processing module 320 for the image.
图像1实现了LDC和提高分辨率,也就是说,利用图像1对应的映射关系可以用于实现的预处理方式为LDC和提高分辨率。利用图像2对应的映射关系可以用于实现的预处理方式为LDC和降低分辨率。利用图像3对应的映射关系可以用于实现的预处理方式为LDC。Image 1 implements LDC and resolution enhancement, that is to say, the preprocessing method that can be used to achieve LDC and resolution enhancement using the mapping relationship corresponding to image 1 is LDC and resolution enhancement. The preprocessing methods that can be used to implement the mapping relationship corresponding to image 2 are LDC and resolution reduction. The preprocessing method that can be implemented by using the mapping relationship corresponding to image 3 is LDC.
第二处理模块320用于对预处理后的图像进行进一步处理。第二处理模块320可以使用神经网络或者传统的计算机视觉的方法,对预处理后的图像进行目标检测、目标分类、测距等功能。The second processing module 320 is used for further processing the preprocessed image. The second processing module 320 may use a neural network or a traditional computer vision method to perform functions such as target detection, target classification, ranging, etc. on the preprocessed image.
第一处理模块310可以位于图像信号处理器(image signal processor,ISP)中。ISP可以是相机等图像采集设备中处理器。The first processing module 310 may be located in an image signal processor (image signal processor, ISP). The ISP may be a processor in an image acquisition device such as a camera.
第二处理模块320可以使用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal process,DSP)、图形处理器(graphics l processing unit,GPU)等中的一个或多个处理器。The second processing module 320 may use one or more processors from a central processing unit (CPU), a digital signal processor (DSP), a graphics processing unit (GPU), and the like .
映射关系可以以映射关系表的形式保存在存储器中。第一处理模块310可以在对于初始图像进行处理时使用该映射关系表。或者,映射关系也可以是映射函数或其他任何可以表示像素位置的对应关系的形式。The mapping relationship may be stored in the memory in the form of a mapping relationship table. The first processing module 310 may use the mapping relationship table when processing the initial image. Alternatively, the mapping relationship can also be in the form of a mapping function or any other corresponding relationship that can represent pixel positions.
每个ROI对应的映射关系,可以是根据该ROI的后续图像相处理需要的每种预处理方式的映射关系确定的,或者,也可以是根据每种预处理方式对应的矩阵运算的参数确定的。The mapping relationship corresponding to each ROI can be determined according to the mapping relationship of each preprocessing mode required for subsequent image processing of the ROI, or it can also be determined according to the parameters of the matrix operation corresponding to each preprocessing mode .
当某个ROI的后续图像相处理需要进行多种预处理方式的处理时,利用初始图像与预处理后的图像中像素位置的映射关系对于初始图像进行处理,生成预处理后的图像,无需生成中间结果,减少生成的数据量,节约存储资源和处理资源。When the subsequent image processing of a certain ROI requires multiple preprocessing methods, use the mapping relationship between the initial image and the pixel position in the preprocessed image to process the initial image to generate a preprocessed image without generating Intermediate results, reducing the amount of data generated, saving storage resources and processing resources.
在采用矩阵运算或其他方式的运算依次实现每种运算方式的情况下,为了避免一种组合的预处理过程中对初始图像产生干扰,从而影响其他组合对应的预处理,可以对应于每种组合对初始图像进行拷贝,但初始图像的拷贝占用较多的资源。In the case of using matrix operations or other operations to implement each operation mode in turn, in order to avoid interference to the initial image during the preprocessing process of one combination, thereby affecting the preprocessing corresponding to other combinations, each combination can be corresponding to The original image is copied, but the copy of the original image occupies more resources.
采用映射的方式进行预处理时,无需对初始图像的进行拷贝,减小对存储资源的占用。When preprocessing is performed in a mapping manner, there is no need to copy the initial image, which reduces the occupation of storage resources.
像素位置的映射关系中可以保存有初始图像的每个像素在预处理图像中的坐标。第一处理模块310使用该映射关系表,并采用双线性插值等差值算法,可以确定预处理图像,具体地,可以参见图5的说明。The pixel position mapping relationship can store the coordinates of each pixel of the initial image in the preprocessed image. The first processing module 310 can determine the preprocessed image by using the mapping relationship table and the bilinear interpolation equal difference algorithm. Specifically, please refer to the description of FIG. 5 .
应当理解,摄像头采集初始图像后可以将初始图像存储在第一处理模块310对应的内 存或其他存储器中。第一处理模块310生成的预处理图像可以存储在第一处理模块310对应的内存、第二处理模块320对应的内存或其他存储器中。It should be understood that after the camera captures the initial image, the initial image may be stored in the memory corresponding to the first processing module 310 or in other memory. The preprocessed image generated by the first processing module 310 may be stored in the memory corresponding to the first processing module 310, the memory corresponding to the second processing module 320, or other storages.
图5是本申请实施例提供的一种图像处理方法的示意图。FIG. 5 is a schematic diagram of an image processing method provided by an embodiment of the present application.
图像预处理过程,预处理图像中的每一个像素,可以理解为都来自于预处理前的初始图像中的像素,即初始图像与预处理图像中像素位置之间具有对应关系。In the process of image preprocessing, each pixel in the preprocessed image can be understood as coming from the pixels in the initial image before preprocessing, that is, there is a correspondence between the pixel positions in the initial image and the preprocessed image.
以相机畸变校正为例,畸变校正后的图片上的每一个像素点,都是通过相机拍摄后的畸变图上的像素点通过相机内参,畸变模型计算得到,具体的关系可以表示为:Taking the camera distortion correction as an example, each pixel on the picture after distortion correction is calculated by the pixel on the distortion map captured by the camera through the internal parameters of the camera and the distortion model. The specific relationship can be expressed as:
(x',y')=F(x,y)(x',y')=F(x,y)
其中,(x,y)用于表示初始图像中一个像素的坐标,(x',y')可以理解为预处理图像中的像素坐标,函数F用于表示映射关系。也就是说,预处理图像中的像素(x',y')与初始图像中的像素(x,y)的颜色相同。当x、y为整数时,x’和/或y’可能不是整数。可以在确定初始图像中每一个像素在预处理图像中的像素坐标后,可以通过双线性插值等差值算法,确定预处理图像中每个整数坐标表示的像素对应的颜色。Among them, (x, y) is used to represent the coordinates of a pixel in the initial image, (x', y') can be understood as the pixel coordinates in the preprocessed image, and the function F is used to represent the mapping relationship. That is, the pixel (x',y') in the preprocessed image is the same color as the pixel (x,y) in the original image. When x, y are integers, x' and/or y' may not be integers. After determining the pixel coordinates of each pixel in the initial image in the preprocessed image, the color corresponding to the pixel represented by each integer coordinate in the preprocessed image can be determined through a bilinear interpolation and equal difference algorithm.
初始图像与预处理图像中像素具有对应关系可以表示为从初始图像到预处理图像的映射关系表。ISP、GPU、CPU、DSP等处理器资源可以利用映射关系F,生成预处理图像。映射关系F可以是映射关系表,也就是说,可以通过查表的方式,得到预处理图像。The corresponding relationship between the pixels in the initial image and the preprocessed image can be expressed as a mapping relationship table from the initial image to the preprocessed image. Processor resources such as ISP, GPU, CPU, and DSP can use the mapping relationship F to generate preprocessed images. The mapping relationship F may be a mapping relationship table, that is, the preprocessed image may be obtained by looking up the table.
一张初始图形包含大量的像素(如分辨率为1920×1080的图像,包含2073600个像素),依次对初始图像中的每个像素查询映射关系表以生成预处理图像的方式,依然需要占用较长的处理时间。An initial image contains a large number of pixels (such as an image with a resolution of 1920 × 1080, including 2073600 pixels), and the way of querying the mapping table for each pixel in the initial image to generate a preprocessed image still requires a relatively large amount of space. long processing time.
如图5所示,可以对初始图形的多个区域并行处理。图5以提高图像分辨率(也可以理解为图像的放大)为例进行说明。As shown in Figure 5, multiple regions of the initial graph can be processed in parallel. FIG. 5 illustrates by taking an example of increasing the resolution of the image (which can also be understood as the enlargement of the image).
映射关系表可以包括4个子映射关系,每个子映射关系对应于对于图5所示的初始图像中的四个区域A1至A4中的一个区域。从而,在生成预处理图像时,可以通过并行利用每个子映射关系,对区域A1至A4并行进行映射,分别生成预处理图像中区域B1至B4的图像。The mapping relationship table may include four sub-mapping relationships, each of which corresponds to one of the four regions A1 to A4 in the initial image shown in FIG. 5 . Therefore, when the preprocessed image is generated, the regions A1 to A4 can be mapped in parallel by using each sub-mapping relationship in parallel, and the images of the regions B1 to B4 in the preprocessed image can be generated respectively.
对于更复杂一些的图像预处理操作,同样可以采用在查找映射关系表时并行利用该映射关系表中的多个子映射关系进行映射的方式进行预处理。生成预处理图像的过程中,如果映射关系表指示的预处理图像中的像素坐标不是整数,可以采用图像插值的方法生成预处理图像。For more complex image preprocessing operations, the preprocessing method can also be performed by using multiple sub-mapping relationships in the mapping relationship table to perform mapping in parallel when looking up the mapping relationship table. In the process of generating the preprocessed image, if the pixel coordinates in the preprocessed image indicated by the mapping relationship table are not integers, the preprocessed image may be generated by means of image interpolation.
图像在内存中的存储方式有多种格式,图6以YUV格式进行说明。图像中的每一个像素包括Y,U,V三种类型的数据组成。其中,Y表示明亮度(luminance或luma),也就是灰阶值;“U”和“V”表示的则是色度(chrominance或chroma),作用是描述影像色彩及饱和度,用于指示像素的颜色。There are various formats for storing images in memory, and Figure 6 illustrates them in YUV format. Each pixel in the image consists of three types of data: Y, U, and V. Among them, Y represents the brightness (luminance or luma), that is, the grayscale value; "U" and "V" represent the chrominance (chrominance or chroma), which is used to describe the color and saturation of the image, which is used to indicate the pixel. s color.
以YUV格式在存储器中存储的图像,在存储器中图像中各个像素的Y数据按照像素的顺序依次排列。在图像中所有像素的Y数据之后,每个像素的U数据及V数据相邻,在存储器中按照像素的顺序依次排列。也就是说,在存储器中图像的所有像素的Y数据之后,图像的U数据及V数据交错排列。For an image stored in the memory in the YUV format, the Y data of each pixel in the image in the memory is arranged in the order of the pixels. After the Y data of all pixels in the image, the U data and V data of each pixel are adjacent and are arranged in the memory in the order of the pixels. That is, after the Y data of all pixels of the image in memory, the U data and V data of the image are interleaved.
如果采用将YUV格式的初始图像划分为图像块的方式,实现对初始图像的并行预处理,需要将每个图像块存储为YUV格式的数据,之后对每个图像块进行预处理。If the initial image in YUV format is divided into image blocks to realize parallel preprocessing of the initial image, each image block needs to be stored as data in YUV format, and then each image block is preprocessed.
当采用多个子映射关系并行的预处理方式时,根据YUV格式,可以并行确定初始图像位于每个子映射关系对应的区域的图像数据在存储器中的存储位置,从而实现并行的图像预处理。When the preprocessing method with multiple sub-mappings in parallel is adopted, according to the YUV format, the storage location in the memory of the image data whose initial image is located in the region corresponding to each sub-mapping relationship can be determined in parallel, thereby realizing parallel image preprocessing.
如图7所示为用于实现图5所示的提高初始图像的整体分辨率的预处理的映射关系表。As shown in FIG. 7 , a mapping relationship table used to realize the preprocessing of improving the overall resolution of the initial image shown in FIG. 5 is shown.
采用串行的图像预处理方式,可以理解为按照初始图像中各个像素的顺序查询映射关系表,以确定初始像素中每个像素在预处理图像中的位置。之后,按照预处理图像中像素的顺序,采用差值的方式,计算各个像素的颜色。Using the serial image preprocessing method can be understood as querying the mapping table according to the order of each pixel in the initial image to determine the position of each pixel in the initial pixel in the preprocessing image. After that, according to the order of the pixels in the preprocessed image, the color of each pixel is calculated by means of the difference value.
采用并向的图像预处理方式,可以同时对初始图像位于每个子映射关系对应的区域中的图像像素进行映射关系表的查询。By adopting the parallel image preprocessing method, the mapping relationship table can be queried for the image pixels of the initial image located in the region corresponding to each sub-mapping relationship at the same time.
对于图5所示的用于提高初始图像的整体分辨率的预处理,利用4个子映射关系,分别确定初始图像位于每个子映射关系对应的区域的图像中的像素坐标在预处理图像中对应的坐标。4个子映射关系分别对应于区域A1至A4。之后,利用每个区域的Y数据以及U、V数据,对每个区域采用差值等方式计算每个像素坐标为整数的位置处的颜色,从而可以并行的生成预处理图像中区域B1至B4的图像。For the preprocessing shown in Figure 5 for improving the overall resolution of the initial image, four sub-mapping relationships are used to determine the corresponding pixel coordinates of the initial image in the image corresponding to each sub-mapping relationship in the preprocessed image. coordinate. The four sub-mapping relationships correspond to the areas A1 to A4, respectively. After that, using the Y data and U, V data of each area, the color at the position where each pixel coordinate is an integer is calculated for each area by means of difference, so that the areas B1 to B4 in the preprocessed image can be generated in parallel Image.
通过将像素位置的映射关系华为多个子映射,可以实现对初始图像的合理区域划分,采用并行处理的预处理方式,可以节省图像预处理所需的时间,并降低图像预处理的复杂度,节约计算资源,提高图像预处理的效率。By dividing the mapping relationship of pixel positions into multiple sub-maps, a reasonable area division of the initial image can be realized. By using the preprocessing method of parallel processing, the time required for image preprocessing can be saved, and the complexity of image preprocessing can be reduced. Computational resources to improve the efficiency of image preprocessing.
采用本申请实施例提供的图像处理方法,可以对图2所述图像处理过程进行优化。By using the image processing method provided by the embodiment of the present application, the image processing process shown in FIG. 2 can be optimized.
在车辆需要进行侧方停车时,可以确定四路鱼眼摄像头采集初始图像中的ROI区域,ROI区域对应于环视图中用于表示车辆右侧的环境情况的图像。对ROI区域中的图像查找映射关系表,以生成预处理后的右侧环境图像。该映射关系表用于表示四路鱼眼摄像头采集初始图像中的各个像素与环视图中各个像素之间的对应关系。When the vehicle needs to park sideways, the ROI area in the initial image captured by the four-way fisheye camera can be determined, and the ROI area corresponds to the image used to represent the environmental situation on the right side of the vehicle in the ring view. Look up the mapping table for the images in the ROI area to generate the preprocessed right environment image. The mapping relationship table is used to represent the corresponding relationship between each pixel in the initial image captured by the four-way fisheye camera and each pixel in the ring view.
一方面,仅对初始图像中的ROI区域的图像进行预处理,减少了需要进行预处理的数据量,提高处理效率。另一方面,通过映射关系表得到预处理图像,而无需分别进行镜头畸变的校正、逆透视变换等多种操作,提高了处理效率,也避免了中间数据的产生和存储,减少对处理资源和存储资源的占用。On the one hand, only the image of the ROI area in the initial image is preprocessed, which reduces the amount of data that needs to be preprocessed and improves the processing efficiency. On the other hand, the preprocessed image is obtained through the mapping table, without the need to perform various operations such as lens distortion correction, inverse perspective transformation, etc., which improves the processing efficiency, avoids the generation and storage of intermediate data, and reduces the processing resources and resources. Occupation of storage resources.
上文结合图1至图7的描述了本申请实施例的图像处理方法,下面结合图8至图9,描述本申请实施例的图像处理装置。应理解,图像处理装置的描述与图像处理方法的描述相互对应,因此,未详细描述的部分可以参见前面对图像处理方法的说明。The image processing method of the embodiment of the present application is described above with reference to FIG. 1 to FIG. 7 , and the image processing apparatus of the embodiment of the present application is described below with reference to FIG. 8 to FIG. 9 . It should be understood that the description of the image processing apparatus and the description of the image processing method correspond to each other, and therefore, for the parts not described in detail, reference may be made to the foregoing description of the image processing method.
图8是本申请实施例提供的一种图像处理装置的示意性结构图。FIG. 8 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
图像处理装置200包括获取模块2010和处理模块2020。The image processing apparatus 200 includes an acquisition module 2010 and a processing module 2020 .
获取模块2010用于,获取至少一个初始图像。The acquiring module 2010 is used for acquiring at least one initial image.
处理模块2020用于,根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。The processing module 2020 is configured to obtain a pre-processed first pre-processed image according to the at least one initial image and the first mapping relationship, and there is a difference between the pixel positions of the at least one initial image and the first pre-processed image A first mapping relationship, where the first mapping relationship corresponds to multiple preprocessing modes.
可选地,处理模块2020具体用于,根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。Optionally, the processing module 2020 is specifically configured to, according to the first mapping relationship, preprocess the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image, so as to obtain the The first preprocessed image.
可选地,所述至少一个ROI的数量为多个,所述第一ROI对应于所述第一映射关系。Optionally, the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship.
处理模块2020还用于,采用与任一个或多个、或者每个第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。The processing module 2020 is further configured to preprocess the image of the second region located in the second ROI in the at least one initial image by using a mapping relationship corresponding to any one or more or each of the second ROIs, where The second ROI is an ROI other than the first ROI in the at least one ROI.
可选地,所述至少一个初始图像来自车载摄像装置,每个所述ROI的位置是根据所述车辆的行驶状态获取的。Optionally, the at least one initial image is from a vehicle-mounted camera, and the position of each of the ROIs is obtained according to the driving state of the vehicle.
可选地,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域。Optionally, the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI.
处理模块2020具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。The processing module 2020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on the images located in each of the sub-regions in the at least one initial image.
可选地,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域。Optionally, the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region.
处理模块2020具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。The processing module 2020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on the images located in each of the sub-regions in the at least one initial image.
可选地,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。Optionally, the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
可选地,获取模块2010还用于,获取需求信息,所述需求信息用于指示所述多种预处理方式;Optionally, the obtaining module 2010 is further configured to obtain demand information, where the demand information is used to indicate the multiple preprocessing methods;
处理模块2020还用于,根据所述需求信息,生成所述第一映射关系。The processing module 2020 is further configured to generate the first mapping relationship according to the requirement information.
图9是本申请实施例提供的一种图像处理装置的示意性结构图。FIG. 9 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
图像处理装置3000包括至少一个存储器3010和至少一个处理器3020,所述至少一个存储器3010用于存储程序,所述至少一个处理器3020用于运行所述程序,以实现前文所述的方法。The image processing apparatus 3000 includes at least one memory 3010 and at least one processor 3020, the at least one memory 3010 is used for storing a program, and the at least one processor 3020 is used for running the program to implement the aforementioned method.
具体地,处理器3020用于,获取至少一个初始图像。Specifically, the processor 3020 is configured to acquire at least one initial image.
处理器3020还用于,根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。The processor 3020 is further configured to obtain a preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship, and the pixel positions between the at least one initial image and the first preprocessed image are There is a first mapping relationship, and the first mapping relationship corresponds to multiple preprocessing modes.
可选地,处理器3020具体用于,根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。Optionally, the processor 3020 is specifically configured to, according to the first mapping relationship, preprocess the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image, so as to obtain the The first preprocessed image.
可选地,所述至少一个ROI的数量为多个,所述第一ROI对应于所述第一映射关系。Optionally, the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship.
处理器3020还用于,采用与任一个或多个、或者每个第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。The processor 3020 is further configured to preprocess the image of the second region located in the second ROI in the at least one initial image by using a mapping relationship corresponding to any one or more or each of the second ROIs, where The second ROI is an ROI other than the first ROI in the at least one ROI.
可选地,所述至少一个初始图像来自车载摄像装置,每个所述ROI的位置是根据车辆的行驶状态获取的,所述车载摄像装置设置在所述车辆上。Optionally, the at least one initial image is from a vehicle-mounted camera device, the position of each of the ROIs is obtained according to the driving state of the vehicle, and the vehicle-mounted camera device is provided on the vehicle.
可选地,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域。Optionally, the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI.
处理器3020具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于 每个所述子区域的图像并行进行预处理。The processor 3020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
可选地,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域。Optionally, the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region.
处理器3020具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理The processor 3020 is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image
可选地,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。Optionally, the multiple preprocessing manners include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
可选地,处理器3020还用于,获取需求信息,所述需求信息用于指示所述多种预处理方式Optionally, the processor 3020 is further configured to acquire demand information, where the demand information is used to indicate the multiple preprocessing methods
处理器3020还用于,根据所述需求信息,生成所述第一映射关系。The processor 3020 is further configured to generate the first mapping relationship according to the requirement information.
应理解,本申请实施例中的处理器可以为中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), application-specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should also be understood that the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (DRAM) Access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory Fetch memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM).
上述各个附图对应的流程的描述各有侧重,某个流程中没有详述的部分,可以参见其他流程的相关描述。The descriptions of the processes corresponding to the above figures have their own emphasis, and for parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.
本申请实施例还提供一种计算机可读存储介质,其特征在于,所述计算机可读存储介质具有程序指令,当所述程序指令被直接或者间接执行时,使得前文中的方法得以实现。Embodiments of the present application further provide a computer-readable storage medium, characterized in that, the computer-readable storage medium has program instructions, and when the program instructions are directly or indirectly executed, the foregoing method can be implemented.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算设备上运行时,使得计算设备执行前文中的方法,或者使得所述计算设备实现前文中的装置的功能。Embodiments of the present application also provide a computer program product containing instructions, which, when run on a computing device, cause the computing device to execute the foregoing method, or cause the computing device to implement the functions of the foregoing apparatus.
本申请实施例还提供一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得前文中的方法得以实现。An embodiment of the present application further provides a chip system, characterized in that, the chip system includes at least one processor, and when a program instruction is executed in the at least one processor, the foregoing method can be implemented.
本申请实施例还提供一种终端,包括前文所述的图像处理装置。An embodiment of the present application further provides a terminal, including the image processing apparatus described above.
进一步,该终端可以为智能运输设备(车辆或者无人机)、智能家居设备、智能制造设备或者机器人等。该智能运输设备例如可以是自动导引运输车(automated guided  vehicle,AGV)、或无人运输车。Further, the terminal may be an intelligent transportation device (vehicle or drone), a smart home device, an intelligent manufacturing device, or a robot, and the like. The intelligent transportation device may be, for example, an automated guided vehicle (AGV), or an unmanned transportation vehicle.
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media. The semiconductor medium may be a solid state drive.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A、B可以是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。It should be understood that the term "and/or" in this document is only an association relationship to describe associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time , there are three cases of B alone, where A and B can be singular or plural. In addition, the character "/" in this document generally indicates that the related objects before and after are an "or" relationship, but may also indicate an "and/or" relationship, which can be understood with reference to the context.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c或a-b-c,其中a、b、c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b or c may represent: a, b, c, a-b, a-c, b-c or a-b-c, wherein a, b, and c may be single or multiple.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (19)

  1. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, characterized in that the method comprises:
    获取至少一个初始图像;Get at least one initial image;
    根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。According to the at least one initial image and the first mapping relationship, a preprocessed first preprocessed image is obtained, and there is a first mapping relationship between the pixel positions of the at least one initial image and the first preprocessed image, so The first mapping relationship described above corresponds to multiple preprocessing methods.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,包括:根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。The obtaining a preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship includes: according to the first mapping relationship, performing a ROI on at least one region of interest in the at least one initial image The first region image of the first ROI is preprocessed to obtain the first preprocessed image.
  3. 根据权利要求2所述的方法,其特征在于,所述至少一个ROI的数量为多个,所述第一ROI对应于所述第一映射关系,The method according to claim 2, wherein the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship,
    所述方法还包括:The method also includes:
    采用与第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。The second region image located in the second ROI in the at least one initial image is preprocessed by using the mapping relationship corresponding to the second ROI, where the second ROI is the first ROI in the at least one ROI outside ROI.
  4. 根据权利要求2或3所述的方法,其特征在于,所述至少一个初始图像来自车载摄像装置,所述ROI的位置是根据车辆的行驶状态获取的,所述车载摄像装置设置在所述车辆上。The method according to claim 2 or 3, wherein the at least one initial image is from a vehicle-mounted camera device, the position of the ROI is obtained according to the driving state of the vehicle, and the vehicle-mounted camera device is provided on the vehicle superior.
  5. 根据权利要求2-4中任一项所述的方法,其特征在于,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域,The method according to any one of claims 2-4, wherein the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region in the first ROI ,
    所述根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,包括:The preprocessing of the first region image located in the first ROI in the at least one region of interest ROI in the at least one initial image according to the first mapping relationship includes:
    根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。According to the plurality of sub-mapping relationships, the images located in each of the sub-regions in the at least one initial image are preprocessed in parallel.
  6. 根据权利要求1所述的方法,其特征在于,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域,The method according to claim 1, wherein the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region,
    所述根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,包括:根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。The obtaining the preprocessed first preprocessed image according to the at least one initial image and the first mapping relationship includes: according to the plurality of sub-mapping relationships, for each of the sub-maps in the at least one initial image. The images of the regions are preprocessed in parallel.
  7. 根据权利要求1-6中任一项所述的方法,其特在于,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。The method according to any one of claims 1-6, wherein the multiple preprocessing methods include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-7, wherein the method further comprises:
    获取需求信息,所述需求信息用于指示所述多种预处理方式;acquiring demand information, where the demand information is used to indicate the multiple preprocessing methods;
    根据所述需求信息,生成所述第一映射关系。The first mapping relationship is generated according to the requirement information.
  9. 一种图像处理装置,其特征在于,包括:获取模块和处理模块;An image processing device, comprising: an acquisition module and a processing module;
    所述获取模块用于,获取至少一个初始图像;The obtaining module is used to obtain at least one initial image;
    所述处理模块用于,根据所述至少一个初始图像以及第一映射关系,得到预处理后的第一预处理图像,所述至少一个初始图像与所述第一预处理图像的像素位置之间存在第一映射关系,所述第一映射关系对应于多种预处理方式。The processing module is configured to, according to the at least one initial image and the first mapping relationship, obtain a preprocessed first preprocessed image, and the pixel positions between the at least one initial image and the first preprocessed image are There is a first mapping relationship, and the first mapping relationship corresponds to multiple preprocessing modes.
  10. 根据权利要求9所述的装置,其特征在于,The device of claim 9, wherein:
    所述处理模块具体用于,根据所述第一映射关系,对所述至少一个初始图像中位于至少一个兴趣区域ROI中第一ROI的第一区域图像进行预处理,以得到所述第一预处理图像。The processing module is specifically configured to, according to the first mapping relationship, preprocess the first region image of the first ROI in the at least one region of interest ROI in the at least one initial image, so as to obtain the first preliminary image. Process images.
  11. 根据权利要求10所述的装置,其特征在于,所述至少一个ROI的数量为多个,所述第一ROI对应于所述第一映射关系,The device according to claim 10, wherein the number of the at least one ROI is multiple, and the first ROI corresponds to the first mapping relationship,
    所述处理模块还用于,采用与第二ROI对应的映射关系对所述至少一个初始图像中位于所述第二ROI中的第二区域图像进行预处理,所述第二ROI为所述至少一个ROI中所述第一ROI之外的ROI。The processing module is further configured to use a mapping relationship corresponding to a second ROI to preprocess an image of a second region located in the second ROI in the at least one initial image, where the second ROI is the at least one of the at least one initial image. An ROI other than the first ROI in one ROI.
  12. 根据权利要求10或11所述的装置,其特征在于,所述至少一个初始图像来自车载摄像装置,所述ROI的位置是根据所述车辆的行驶状态获取的。The device according to claim 10 or 11, wherein the at least one initial image is from a vehicle-mounted camera device, and the position of the ROI is obtained according to the driving state of the vehicle.
  13. 根据权利要求10-12中任一项所述的装置,其特征在于,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于所述第一ROI中的一个子区域,The apparatus according to any one of claims 10-12, wherein the first mapping relationship includes a plurality of sub-mapping relationships, and each sub-mapping relationship corresponds to a sub-region in the first ROI ,
    所述处理模块具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。The processing module is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
  14. 根据权利要求9所述的装置,其特征在于,所述第一映射关系包括多个子映射关系,每个所述子映射关系对应于一个子区域,The device according to claim 9, wherein the first mapping relationship includes a plurality of sub-mapping relationships, and each of the sub-mapping relationships corresponds to a sub-region,
    所述处理模块具体用于,根据所述多个子映射关系,对所述至少一个初始图像中位于每个所述子区域的图像并行进行预处理。The processing module is specifically configured to, according to the multiple sub-mapping relationships, perform parallel preprocessing on images located in each of the sub-regions in the at least one initial image.
  15. 根据权利要求9-14中任一项所述的装置,其特在于,所述多种预处理方式包括仿射变换、逆透视变换IPM、镜头畸变校正LDC、几何变换中的至少一种。The apparatus according to any one of claims 9-14, wherein the multiple preprocessing methods include at least one of affine transformation, inverse perspective transformation IPM, lens distortion correction LDC, and geometric transformation.
  16. 根据权利要求9-15中任一项所述的装置,其特征在于,The device according to any one of claims 9-15, characterized in that,
    所述获取模块还用于,获取需求信息,所述需求信息用于指示所述多种预处理方式;The obtaining module is further configured to obtain demand information, where the demand information is used to indicate the multiple preprocessing methods;
    所述处理模块还用于,根据所述需求信息,生成所述第一映射关系。The processing module is further configured to generate the first mapping relationship according to the requirement information.
  17. 一种图像处理装置,其特征在于,包括至少一个存储器和至少一个处理器,所述至少一个存储器用于存储程序,所述至少一个处理器用于运行所述程序,以实现权利要求1-8中任一项所述的方法。An image processing device, characterized in that it comprises at least one memory and at least one processor, the at least one memory is used for storing a program, and the at least one processor is used for running the program, so as to realize the claims 1-8 The method of any one.
  18. 一种芯片,其特征在于,包括至少一个处理器和接口电路,所述接口电路用于为所述至少一个处理器提供程序指令或者数据,所述至少一个处理器用于执行所述程序指令,以实现权利要求1-8中任一项所述的方法。A chip, characterized by comprising at least one processor and an interface circuit, wherein the interface circuit is configured to provide program instructions or data for the at least one processor, and the at least one processor is configured to execute the program instructions to Implementing the method of any of claims 1-8.
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读介质存储用于设备执行的程序代码,该程序代码被所述设备执行时,实现如权利要求1-8中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable medium stores program codes for device execution, and when the program codes are executed by the device, the implementation of any one of claims 1-8 Methods.
PCT/CN2021/131470 2021-01-05 2021-11-18 Image processing method and apparatus WO2022148142A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110009291.0A CN114723928A (en) 2021-01-05 2021-01-05 Image processing method and device
CN202110009291.0 2021-01-05

Publications (1)

Publication Number Publication Date
WO2022148142A1 true WO2022148142A1 (en) 2022-07-14

Family

ID=82234901

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131470 WO2022148142A1 (en) 2021-01-05 2021-11-18 Image processing method and apparatus

Country Status (2)

Country Link
CN (1) CN114723928A (en)
WO (1) WO2022148142A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303366A (en) * 2016-08-18 2017-01-04 中译语通科技(北京)有限公司 A kind of method and device of Video coding based on territorial classification coding
CN106937049A (en) * 2017-03-09 2017-07-07 广东欧珀移动通信有限公司 The processing method of the portrait color based on the depth of field, processing unit and electronic installation
CN109218695A (en) * 2017-06-30 2019-01-15 中国电信股份有限公司 Video image enhancing method, device, analysis system and storage medium
US20190279345A1 (en) * 2016-11-08 2019-09-12 Samsung Electronics Co., Ltd. Method for correcting image by device and device therefor
CN111881846A (en) * 2020-07-30 2020-11-03 北京市商汤科技开发有限公司 Image processing method and related device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303366A (en) * 2016-08-18 2017-01-04 中译语通科技(北京)有限公司 A kind of method and device of Video coding based on territorial classification coding
US20190279345A1 (en) * 2016-11-08 2019-09-12 Samsung Electronics Co., Ltd. Method for correcting image by device and device therefor
CN106937049A (en) * 2017-03-09 2017-07-07 广东欧珀移动通信有限公司 The processing method of the portrait color based on the depth of field, processing unit and electronic installation
CN109218695A (en) * 2017-06-30 2019-01-15 中国电信股份有限公司 Video image enhancing method, device, analysis system and storage medium
CN111881846A (en) * 2020-07-30 2020-11-03 北京市商汤科技开发有限公司 Image processing method and related device, equipment and storage medium

Also Published As

Publication number Publication date
CN114723928A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
US20240046654A1 (en) Image fusion for autonomous vehicle operation
US20200193832A1 (en) Image generating apparatus, image generating method, and recording medium
US20220157068A1 (en) System and Method of Determining a Curve
WO2020042858A1 (en) Image stitching method and device, on-board image processing device, electronic apparatus, and storage medium
CN111178236A (en) Parking space detection method based on deep learning
US20230215187A1 (en) Target detection method based on monocular image
WO2020248910A1 (en) Target detection method and device
US11170470B1 (en) Content-adaptive non-uniform image downsampling using predictive auxiliary convolutional neural network
Zhou et al. Adapting semantic segmentation models for changes in illumination and camera perspective
CN115147328A (en) Three-dimensional target detection method and device
CN114339185A (en) Image colorization for vehicle camera images
US20210049382A1 (en) Non-line of sight obstacle detection
WO2019085929A1 (en) Image processing method, device for same, and method for safe driving
CN111210411B (en) Method for detecting vanishing points in image, method for training detection model and electronic equipment
WO2022148142A1 (en) Image processing method and apparatus
Shen et al. Lane line detection and recognition based on dynamic ROI and modified firefly algorithm
Feng et al. Calibration and stitching methods of around view monitor system of articulated multi-carriage road vehicle for intelligent transportation
CN115965831A (en) Vehicle detection model training method and vehicle detection method
CN115565155A (en) Training method of neural network model, generation method of vehicle view and vehicle
CN110677491B (en) Method for estimating position of vehicle
US10936885B2 (en) Systems and methods of processing an image
CN113147746A (en) Method and device for detecting ramp parking space
CN114120260A (en) Method and system for identifying travelable area, computer device, and storage medium
CN110765877A (en) Pedestrian detection method and system based on thermal imager and binocular camera
CN112215748A (en) Image processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21917183

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21917183

Country of ref document: EP

Kind code of ref document: A1