Method and device for correcting central point of target in fisheye image without distortion, medium and product
By obtaining the width, height and center point of the object detection frame in the fisheye camera image, and adjusting the proportion parameters according to the pixel distance, the problem of target center point recognition deviation in the fisheye camera image is solved, and the recognition accuracy is improved .
Patent Information
- Application Number
- CN202411312430.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, there is a deviation in the identification of the center point of the target in the fisheye camera image, especially for the target with higher height or severe distortion, the deviation of the center point of the identified is relatively large.
By obtaining the width and height of the target detection frame in the fisheye camera image that removes the distortion, and the center point of the target detection frame, the horizontal and vertical adjustment ratio parameters are determined according to the pixel distance between the center point and the center point of the image, and the target center is corrected. The horizontal and vertical coordinates of the point to obtain the exact central position.
The accuracy of identifying the target center position is improved, especially in targets with high height or severe distortion, reducing the deviation of center point recognition.
Smart Images

Figure CN119399425A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, medium and product for correcting the center point of an object in a fisheye image for removing distortion. Background Art
[0002] In recent years, with the rapid development of science and technology and the gradual improvement of image processing capabilities, the accuracy of target recognition in images has become an important factor in whether it can achieve rapid development.
[0003] In the vehicle-road collaboration scenario, various sensors such as cameras, millimeter-wave radars, and lidars are installed in road infrastructure to collect road traffic information in real time, providing drivers with a safer driving environment and more efficient traffic flow management. In addition, vehicle-road collaboration also supports the development of autonomous driving technology, which helps achieve a higher level of autonomous driving by enhancing the reliability and safety of individual vehicle intelligence. Therefore, it is critical to provide autonomous driving vehicles with information such as the location, heading, and speed of other traffic participants so that autonomous driving vehicles can make more reliable decisions.
[0004] In the current solutions, the center of the detection frame for target detection is used as the center point of the target. However, due to the perspective principle, this method of determining the center point of the target has deviations. Therefore, how to accurately determine the center point of the target is a problem that technicians in this field need to solve. Summary of the invention
[0005] One purpose of the present application is to provide a method, device, medium and product for correcting the center point of a target in a fisheye image after distortion removal, at least to solve the problem of deviation in the identification of the center point of the target, especially for targets with higher heights and more serious distortion, the deviation of the center point of the identified target will be very large. The present application obtains the width and height of the target detection frame in the fisheye camera image after distortion removal, as well as the center point of the target detection frame, and determines the horizontal adjustment ratio parameter and the vertical adjustment ratio parameter according to the pixel distance between the center point and the image center point of the fisheye camera image, and based on the horizontal adjustment ratio parameter and the vertical adjustment ratio parameter, as well as the width and height of the target detection frame, respectively corrects the horizontal coordinate and the vertical coordinate of the target center point to obtain the accurate center position. By adopting this scheme, the recognition accuracy of the center position of the target can be improved.
[0006] To achieve the above objectives, some embodiments of the present application provide the following aspects:
[0007] In a first aspect, some embodiments of the present application further provide a method for correcting the center point of an object in a fisheye image to remove distortion, the method comprising:
[0008] Obtain the width and height of the target detection frame of the target in the fisheye camera image, as well as the center point of the target detection frame;
[0009] Obtaining a pixel distance between a center point of the target detection frame and an image center point of the fisheye camera image;
[0010] Determining a horizontal adjustment scale parameter and a vertical adjustment scale parameter according to a predetermined secondary transformation coefficient and the pixel distance;
[0011] The horizontal coordinate of the center point of the target detection frame after correction is determined according to the horizontal coordinate of the center point of the target detection frame, the horizontal adjustment ratio parameter and the width of the target detection frame; and the vertical coordinate of the center point of the target detection frame after correction is determined according to the vertical coordinate of the center point of the target detection frame, the vertical adjustment ratio parameter and the height of the target detection frame.
[0012] In a second aspect, some embodiments of the present application further provide an electronic device, comprising: one or more processors; and a memory storing computer program instructions, wherein the computer program instructions, when executed, cause the processor to perform the steps of the method described above.
[0013] In a third aspect, some embodiments of the present application further provide a computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method as described above.
[0014] In a fourth aspect, some embodiments of the present application further provide a computer program product, comprising a computer program / instruction, which implements the steps of the method described above when executed by a processor.
[0015] Compared with the related art, the solution provided by the embodiment of the present application obtains the width and height of the target detection frame in the fisheye camera image after the distortion removal, as well as the center point of the target detection frame, and determines the horizontal adjustment ratio parameter and the vertical adjustment ratio parameter according to the pixel distance between the center point and the image center point of the fisheye camera image, and based on the horizontal adjustment ratio parameter and the vertical adjustment ratio parameter, as well as the width and height of the target detection frame, respectively corrects the horizontal coordinate and the vertical coordinate of the target center point to obtain an accurate center position. By adopting this solution, the recognition accuracy of the center position of the target can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0017] Figure 1 An exemplary flow chart of a method for correcting the center point of an object in a fisheye image to remove distortion according to some embodiments of the present application;
[0018] Figure 2 A schematic diagram of a center point of a target detection frame provided according to some embodiments of the present application;
[0019] Figure 3 A schematic diagram of a corrected center point of a target detection frame provided according to some embodiments of the present application;
[0020] Figure 4 An exemplary structural diagram of the electronic device is disclosed. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] First embodiment
[0023] Step S101, obtaining the width and height of a target detection frame of a target in an image, and the center point of the target detection frame; wherein the image is a fisheye camera image that has been subjected to distortion removal processing;
[0024] Among them, a fisheye camera is a camera with an extreme wide-angle lens. Fisheye cameras have an ultra-wide-angle view and can provide a very wide field of view, usually reaching or even exceeding a 180-degree viewing angle. This enables it to capture a large amount of scene information in a single photo, making it very suitable for shooting grand landscapes, indoor panoramas, and special scenes that require a wide viewing angle. Fisheye cameras have strong distortion, and the images of fisheye cameras have obvious distortion, straight lines become curves, and the shapes of objects are distorted. This distortion can be cleverly used in some cases to create unique artistic effects. Fisheye cameras have unique visual effects, and due to their special optical properties, photos taken with fisheye cameras often have a strong visual impact. Objects in the picture may be stretched, deformed, or appear round or spherical.
[0025] The object detection frame in an image is a rectangular frame used to identify the location and range of a specific object in the image. The object detection frame can clearly indicate the location of the object in the image, helping people to quickly and accurately find the object of interest. For example, in a photo containing multiple objects, the object detection frame can select a specific person, animal, or object for further analysis and processing. The detection frame can not only locate the target, but also give the approximate range of the target. This is very helpful for measuring the size, shape, and relative position relationship of the target with other objects. For example, in industrial inspection, the object detection frame can be used to determine whether the size of the product meets the standard; in traffic monitoring, the distance and position relationship between vehicles can be determined.
[0026] The width and height of the target detection frame may be the number of pixels of the width and height of the detection frame. The center point of the target detection frame may be the position of the intersection of the diagonal lines of the target detection frame, specifically the pixel coordinates of the center point.
[0027] In this solution, the image is a fisheye camera image that has been subjected to distortion removal processing. The distortion removal processing of the fisheye camera image can be achieved by the following methods:
[0028] The latitude and longitude correction method imagines the fisheye image as half the earth, and uses geometric principles to unfold it into a map, spreading the centripetally concentrated pixels out to the surroundings to achieve image dedistortion.
[0029] Read the fisheye image and get the width and height of the image. Calculate the coordinates of the center point of the image. For each pixel in the image, calculate the corresponding longitude and latitude based on its coordinates. Calculate the coordinates of the pixel in the corrected image based on the longitude and latitude. Copy the pixel values in the original image to the corresponding positions in the corrected image.
[0030] Checkerboard correction method uses checkerboard for calibration, calculates the distortion coefficient and internal parameters of the fisheye lens, and uses the functions in the cv2.fisheye module for correction. Print a checkerboard calibration plate and stick it on a plane. Use a fisheye camera to capture an image of the checkerboard calibration plate. Detect the corners of the checkerboard in the image. Calculate the internal parameters and distortion coefficients of the fisheye camera based on the detected corner coordinates and the actual size of the checkerboard. Use the calculated internal parameters and distortion coefficients to correct the fisheye image.
[0031] In addition, other methods can also be used to remove the distortion of fisheye camera images, such as methods based on deep learning.
[0032] The fisheye camera image that has been distorted is removed so that the image changes from a circular shape of the fisheye camera image to a square or a rectangle.
[0033] Step S102, obtaining the pixel distance between the center point of the target detection frame and the center point of the image;
[0034] The image center point of the fisheye camera image may be the center position of the entire fisheye camera image. The pixel distance between the center point of the target detection frame and the image center point of the fisheye camera image may be obtained by subtracting the horizontal coordinate of the center point of the target detection frame from the horizontal coordinate of the image center point of the fisheye camera image, and by subtracting the vertical coordinate of the center point of the target detection frame from the vertical coordinate of the image center point of the fisheye camera image.
[0035] The specific formula can be used to determine:
[0036] diffX=abs(centerX-imageCenterX)
[0037] diffY=abs(centerY-imageCenterY)
[0038] In the formula:
[0039] (centerX, centerY) is the pixel coordinate of the center point of the target detection box, that is Figure 1 The pixel coordinates corresponding to the green point in the middle;
[0040] (imageCenterX, imageCenterY) are the pixel coordinates of the center point of the image.
[0041] Step S103, determining a horizontal adjustment ratio parameter and a vertical adjustment ratio parameter according to a predetermined secondary transformation coefficient and the pixel distance;
[0042] The secondary transform coefficient may be one or more coefficients.
[0043] In this solution, optionally, determining the horizontal adjustment ratio parameter and the vertical adjustment ratio parameter according to the predetermined secondary transformation coefficient and the pixel distance includes:
[0044] Determining a horizontal adjustment scale parameter according to a predetermined secondary transformation coefficient and a horizontal coordinate difference in the pixel distance;
[0045] as well as,
[0046] A vertical adjustment scale parameter is determined according to a predetermined secondary transformation coefficient and a vertical coordinate difference in the pixel distance.
[0047] Specifically, it is determined by the following formula:
[0048] coeX=a*diffX 2 +b*diffX;
[0049] coeY=a*diffY 2 +b*diffY;
[0050] Among them, coeX is the horizontal adjustment scale parameter, diffX is the horizontal coordinate difference, coeY is the vertical adjustment scale parameter, diffY is the vertical coordinate difference, and a and b are predetermined secondary transformation coefficients.
[0051] Among them, a and b are the coefficients of the quadratic curve, calculated as follows:
[0052] a=(m*fn*e) / (e*f*(ef))
[0053] b=m / e-(m*fn*e) / (f*(ef))
[0054] in:
[0055] m, n, e, and f are all hyperparameters that need to be set by yourself. They jointly determine the trend of the quadratic curve. These four parameters actually represent the two points (e, m) and (f, n) through which the quadratic curve passes.
[0056] Here, it should be noted that in the process of determining the adjustment scale parameters for the horizontal and vertical directions, the coefficients of the two quadratic curves a and b are different from each other. This is because the hyperparameters m, n, e, and f for determining a and b are different for the two directions.
[0057] For example, when a truck is at the edge of an image, due to the high height of the vehicle, its distortion will be more obvious at the edge. At the lower left edge of the image, the rear of the vehicle is stretched, and the body is stretched to the left; at the upper left edge of the image, the front of the vehicle is stretched, and the body is stretched to the left. Similarly, when the car is at the lower right edge of the image, the rear of the car is stretched, and the body is stretched to the right; when the car is at the upper right edge of the image, the front of the car is stretched, and the body is stretched to the right. If the existing technology is used, the center point of the target detection frame is simply used as the center point of the target, which has a large deviation from the actual position in the horizontal direction, and even deviates from the lane, and has a significant gap with the actual center position in the vertical direction. By analyzing the distribution state of the target detection frame, this scheme can know that the distortion trend changes with the position of the target in the fisheye camera image after the distortion is removed. According to the different target positions, the target is stretched along the direction vector formed by the image center and the target position, and the stretching amount is related to the 3D real size of the target. According to this target expression form, the center point of the target is estimated.
[0058] The farther the target is from the center of the image, the more it is stretched. It does not follow a linear growth trend, so we use a quadratic curve to describe the degree to which the center point is stretched. The degree of horizontal stretching is not consistent with that of vertical stretching, so we calculate the horizontal and vertical directions separately. This solution corrects the target center point in the opposite direction of the distortion, and considers the size of the target detection frame at the same time, so as to obtain an accurate correction effect.
[0059] Step S104, determining the horizontal coordinate of the corrected target center point according to the horizontal coordinate of the center point of the target detection frame, the horizontal adjustment ratio parameter and the width of the target detection frame; and determining the vertical coordinate of the corrected target center point according to the vertical coordinate of the center point of the target detection frame, the vertical adjustment ratio parameter and the height of the target detection frame.
[0060] In order to facilitate debugging, compensation is performed separately in the horizontal and vertical directions.
[0061] From a horizontal perspective, on the left side of the center of the picture, the side of the car body far from the center of the image is blocked by the roof. Due to the height difference between the roof and the ground, the ground corresponding to the left vehicle boundary line is not the ground corresponding to the left vehicle body. It should actually be on the right side of the boundary line, so the center point of the target detection frame needs to be corrected to the right, and the farther the distance from the center of the picture, the larger the correction value needs to be; similarly, on the right side of the center of the picture, the center point of the target detection frame needs to be corrected to the left, and the farther the distance from the center of the picture, the larger the correction value needs to be. From a vertical perspective, on the lower side of the center of the picture, the rear of the car far from the center of the image is blocked by the roof, and the front of the car accounts for a large proportion. Due to the distance between the roof and the rear of the car, the center point of the target detection frame needs to be corrected downward in the vertical direction. From the figure, the correction amount is small, and the farther the distance from the center of the picture, the larger the correction value needs to be; similarly, on the upper side of the center of the picture, the center point of the target detection frame needs to be corrected upward.
[0062] In this embodiment, optionally, determining the corrected horizontal coordinate of the target center point according to the horizontal coordinate of the center point of the target detection frame, the horizontal adjustment ratio parameter, and the width of the target detection frame includes:
[0063] Determining a horizontal coordinate offset according to the horizontal adjustment ratio parameter and the width of the target detection frame;
[0064] The horizontal coordinate of the corrected target center point is determined according to the horizontal coordinate of the center point of the target detection frame and the horizontal coordinate offset.
[0065] In this embodiment, specifically, the following formula is used to determine:
[0066]
[0067] Among them, centerXNew is the horizontal coordinate of the corrected target center point, centerX is the horizontal coordinate of the center point of the target detection frame, ΔX is the horizontal coordinate offset, and imageCenterX is the horizontal coordinate of the image center point.
[0068] In this embodiment, optionally, determining the corrected vertical coordinate of the target center point according to the vertical coordinate of the center point of the target detection frame, the vertical adjustment ratio parameter, and the width of the target detection frame includes:
[0069] Determining a vertical coordinate offset according to the vertical adjustment ratio parameter and the width of the target detection frame;
[0070] The corrected vertical coordinate of the target center point is determined according to the vertical coordinate of the center point of the target detection frame and the vertical coordinate offset.
[0071] In this embodiment, specifically, the following formula is used to determine:
[0072]
[0073] Among them, centerYNew is the vertical coordinate of the corrected target center point, centerY is the vertical coordinate of the center point of the target detection frame, ΔY is the vertical coordinate offset, and imageCenterY is the vertical coordinate of the center point of the image.
[0074] In the above two embodiments, there are:
[0075] ΔX=coeX*width*0.5
[0076] ΔY=coeY*height*0.5
[0077] Among them, coeX is the horizontal adjustment ratio parameter, width is the width of the target detection box, and 0.5 is the preset coefficient.
[0078] Among them, coeY is the vertical adjustment ratio parameter, height is the height of the target detection box, and 0.5 is the preset coefficient.
[0079] Finally, the proportional parameters coe (coeX and coeY respectively) that need to be adjusted in the horizontal and vertical directions are obtained, and the target center point is adjusted according to the calculation results. Figure 2 is a schematic diagram of a center point of a target detection frame provided according to some embodiments of the present application, Figure 3This is a schematic diagram of a corrected center point of a target detection frame provided according to some embodiments of the present application. By comparison, it can be seen that the center point of the corrected target detection frame is closer to the real center point of the target, and was originally positioned on the isolation belt in the middle of the road, but after correction, it returns to the current driving road area.
[0080] In addition, some embodiments of the present application also provide an electronic device. The electronic device may be a digital computer in various forms, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, etc. The electronic device may also be a mobile device in various forms, such as a personal digital processing, a cellular phone, a smart phone, a wearable device, and other similar computing devices.
[0081] The electronic device includes: one or more processors; and a memory storing computer program instructions, wherein when the computer program instructions are executed, the processor executes the steps of the method provided in any one or more of the above embodiments. Figure 4 An exemplary structural diagram of the electronic device is disclosed. Figure 4 As shown, the electronic device includes: one or more processors 401, memory 402, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Among them, the components shown in this article, their connections and relationships, and their functions are only used as examples, and are not intended to limit the implementation of the present application described and / or required herein.
[0082] The electronic device may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0083] The input device 403 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 404 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0084] To provide interaction with a user, the electronic device may be a computer. The computer has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0085] In the embodiments of the present application, a computer program / instruction is stored on a computer-readable medium, and when the computer program / instruction is executed by a processor, the steps of the method provided by any one or more of the above embodiments are implemented. The computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer-readable instructions.
[0086] The memory 402 can be used as a non-transient computer-readable storage medium, which can be used to store non-transient software programs, non-transient computer executable programs and modules. The processor 401 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 402, so as to implement the program instructions / modules corresponding to the method provided by any one or more of the above embodiments in the embodiments of the present application.
[0087] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0088] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0089] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0090] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0091] In the above-described embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. For example, it can be implemented by using an application specific integrated circuit (ASIC), a general-purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented by hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0092] The computer program product provided in the embodiment of the present application includes one or more computer programs / instructions, and when the computer program / instructions are executed by the processor, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive so lid state di sk (SSD)), etc.
[0093] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0094] The scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim may also be implemented by one unit or device through software or hardware. The words "first", "second", etc. are only used to distinguish the description, and do not indicate any particular order, nor can they be understood as indicating or implying relative importance.
[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily mention changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims, and the above embodiments should be regarded as exemplary and non-restrictive.
Claims
1. A method for correcting the center point of an object in a fisheye image to remove distortion, characterized in that: Obtaining the width and height of a target detection frame of a target in an image, as well as the center point of the target detection frame; wherein the image is a fisheye camera image that has been subjected to distortion removal processing; Obtaining the pixel distance between the center point of the target detection frame and the center point of the image; Determining a horizontal adjustment scale parameter and a vertical adjustment scale parameter according to a predetermined secondary transformation coefficient and the pixel distance; The horizontal coordinate of the center point of the target detection frame after correction is determined according to the horizontal coordinate of the center point of the target detection frame, the horizontal adjustment ratio parameter and the width of the target detection frame; and the vertical coordinate of the center point of the target detection frame after correction is determined according to the vertical coordinate of the center point of the target detection frame, the vertical adjustment ratio parameter and the height of the target detection frame.
2. The method according to claim 1, characterized in that Determining a horizontal adjustment ratio parameter and a vertical adjustment ratio parameter according to a predetermined secondary transformation coefficient and the pixel distance includes: Determining a horizontal adjustment scale parameter according to a predetermined secondary transformation coefficient and a horizontal coordinate difference in the pixel distance; as well as, A vertical adjustment scale parameter is determined according to a predetermined secondary transformation coefficient and a vertical coordinate difference in the pixel distance.
3. The method according to claim 2, characterized in that Determined using the following formula: coeX=a*diffX 2 +b*diffX; coeY=a*diffY 2 +b*diffY; Among them, coeX is the horizontal adjustment scale parameter, diffX is the horizontal coordinate difference, coeY is the vertical adjustment scale parameter, diffY is the vertical coordinate difference, and a and b are predetermined secondary transformation coefficients.
4. The method according to claim 1, characterized in that Determining the corrected horizontal coordinate of the center point of the target detection frame according to the horizontal coordinate of the center point of the target detection frame, the horizontal adjustment ratio parameter, and the width of the target detection frame includes: Determining a horizontal coordinate offset according to the horizontal adjustment ratio parameter and the width of the target detection frame; The corrected horizontal coordinate of the target center point is determined according to the horizontal coordinate of the center point of the target detection frame and the horizontal coordinate offset.
5. The method according to claim 4, characterized in that Determined using the following formula: Among them, centerXNew is the horizontal coordinate of the corrected target center point, centerX is the horizontal coordinate of the center point of the target detection frame, ΔX is the horizontal coordinate offset, and imageCenterX is the horizontal coordinate of the image center point.
6. The method according to claim 1, characterized in that Determining the corrected vertical coordinate of the center point of the target detection frame according to the vertical coordinate of the center point of the target detection frame, the vertical adjustment ratio parameter, and the width of the target detection frame includes: Determining a vertical coordinate offset according to the vertical adjustment ratio parameter and the width of the target detection frame; The corrected vertical coordinate of the target center point is determined according to the vertical coordinate of the center point of the target detection frame and the vertical coordinate offset.
7. The method according to claim 6, characterized in that Determined using the following formula: Among them, centerYNew is the vertical coordinate of the corrected target center point, centerY is the vertical coordinate of the center point of the target detection frame, ΔY is the vertical coordinate offset, and imageCenterY is the vertical coordinate of the center point of the image.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the method as claimed in any one of claims 1 to 7.
9. A computer readable medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Security protection method, electronic equipment, storage medium and computer program
CN120725937A
Image structure dynamic labeling method and system based on artificial intelligence
CN120783343A
An image structure dynamic labeling method and system based on artificial intelligence
CN120783343B