CN116452471A - Processing method and device for ultra-high definition image, terminal equipment and computer medium - Google Patents

Processing method and device for ultra-high definition image, terminal equipment and computer medium Download PDF

Info

Publication number
CN116452471A
CN116452471A CN202310732088.5A CN202310732088A CN116452471A CN 116452471 A CN116452471 A CN 116452471A CN 202310732088 A CN202310732088 A CN 202310732088A CN 116452471 A CN116452471 A CN 116452471A
Authority
CN
China
Prior art keywords
image
processed
high definition
ultra
edge contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310732088.5A
Other languages
Chinese (zh)
Other versions
CN116452471B (en
Inventor
王萌
林晓甘
史安邦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jingchuang Technology Electronics Co ltd
Original Assignee
Shenzhen Jingchuang Technology Electronics Co ltd
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 Shenzhen Jingchuang Technology Electronics Co ltd filed Critical Shenzhen Jingchuang Technology Electronics Co ltd
Priority to CN202310732088.5A priority Critical patent/CN116452471B/en
Publication of CN116452471A publication Critical patent/CN116452471A/en
Application granted granted Critical
Publication of CN116452471B publication Critical patent/CN116452471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a processing method, a device, terminal equipment and a computer medium of an ultra-high definition image, wherein the method comprises the steps of obtaining an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image; extracting a part overlapped with an image to be processed from an original ultra-high definition image to obtain a first image; performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed; and carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed. By adopting the technical scheme of the invention, the ultrahigh-definition image after post-processing can be repaired to improve the image definition.

Description

Processing method and device for ultra-high definition image, terminal equipment and computer medium
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a processing method and device of an ultra-high definition image, terminal equipment and a computer medium.
Background
Along with the rapid development of technology, in order to accurately acquire and transmit information, people have higher and higher requirements on image definition, and further, the application scene of ultra-high definition (resolution reaches 3840x2160 and above) images is very wide.
At present, after an original ultra-high definition image is obtained by photographing through a single lens reflex of a mobile phone camera, later image trimming processing such as picture cutting and color adjustment is needed to be carried out on the image, so that the appearance effect of the image is improved, but after the image trimming processing is carried out on the original ultra-high definition image by using image trimming software, the definition of the image is reduced to some extent, and the visual effect of the image is influenced.
In summary, how to repair the ultra-high definition image after post-processing to improve the image definition has become a technical problem to be solved in the technical field of image processing.
Disclosure of Invention
The main object of the present invention is to provide a method, an apparatus, a terminal device and a computer readable storage medium for processing ultra-high definition images. The method aims to improve the definition of the image by repairing the ultra-high definition image after post-processing.
In order to achieve the above object, the present invention provides a processing method of an ultra-high definition image, the processing method of the ultra-high definition image comprising:
Acquiring an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
extracting a part overlapped with the image to be processed from the original ultra-high definition image to obtain a first image;
performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
and carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
Optionally, the step of performing pixel point compensation on the second edge contour image based on the first edge contour image includes:
performing linear fitting processing on pixel points in the second edge contour image based on a random sampling consistency algorithm to obtain a target line segment;
and carrying out pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
Optionally, the step of performing pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image includes:
Acquiring endpoint coordinates corresponding to the target line segment, and determining a first line segment formed by the endpoint coordinates from the first edge contour image based on the endpoint coordinates;
determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, and adding the first pixel point into the second edge contour image to perform pixel point compensation on the second edge contour image.
Optionally, the step of adding the first pixel point to the second edge contour image to perform pixel point compensation on the second edge contour image includes:
determining a first coordinate of the first pixel point in the first edge contour image, adding the first pixel point into the second edge contour image based on the first coordinate, and performing pixel point compensation on the second edge contour image.
Optionally, the method further comprises;
judging whether the image to be processed is the original ultra-high definition image after cutting or not based on the number of pixel points corresponding to the image to be processed and the original ultra-high definition image respectively;
if the image to be processed is the original ultra-high definition image after cutting, executing the step of extracting the part overlapped with the image to be processed from the original ultra-high definition image;
And if the image to be processed is the original ultra-high definition image which is not subjected to clipping, taking the original ultra-high definition image as a first image.
Optionally, the step of determining whether the image to be processed is the original ultra-high-definition image after clipping based on the number of pixels corresponding to each of the image to be processed and the original ultra-high-definition image includes:
detecting whether the number of pixel points corresponding to the image to be processed and the original ultra-high definition image is equal or not;
if the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is detected to be equal, determining that the image to be processed is the original ultra-high definition image which is not cut;
if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image are not equal is detected, determining that the image to be processed is the original ultra-high definition image after cutting.
Optionally, the step of extracting the portion overlapping with the image to be processed from the original ultra-high definition image includes:
and determining a second coordinate of the pixel point at the upper left corner of the image to be processed in the original ultra-high definition image, and extracting a part overlapped with the image to be processed from the original ultra-high definition image based on the second coordinate and the size of the image to be processed.
In addition, in order to achieve the above object, the present invention also provides a processing apparatus for an ultra-high definition image, the processing apparatus for an ultra-high definition image comprising:
the image acquisition module is used for acquiring an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
the coincidence extraction module is used for extracting a part coincided with the image to be processed from the original ultra-high definition image to obtain a first image;
the edge detection module is used for carrying out edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
and the pixel point compensation module is used for carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
In addition, to achieve the above object, the present invention also provides a terminal device including: the processing method comprises the steps of a memory, a processor and a processing program of the ultra-high-definition image, wherein the processing program of the ultra-high-definition image of the terminal equipment is stored in the memory and can be run on the processor, and the processing program of the ultra-high-definition image of the terminal equipment is executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a processing program of an ultra-high-definition image, which when executed by a processor, implements the steps of the processing method of an ultra-high-definition image as described above.
The embodiment of the invention provides a processing method, a device, terminal equipment and a computer readable storage medium for an ultra-high definition image, wherein the method comprises the steps of obtaining an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image; extracting a part overlapped with the image to be processed from the original ultra-high definition image to obtain a first image; performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed; and carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
According to the embodiment of the invention, an original ultra-high definition image and an original ultra-high definition image (namely an image to be processed) subjected to post-processing are obtained, then a part overlapped with the image to be processed is determined from the original ultra-high definition image and is called a first image, the first image and the image to be processed are respectively subjected to edge detection processing to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed, and finally pixel point compensation is performed on the second edge contour image based on the first edge contour image to obtain a compensated image. In this way, the contour extraction is carried out on the original ultra-high definition image and the image to be processed, and the pixel compensation is carried out on the image to be processed by utilizing the contour information extracted from the original ultra-high definition image, so that the contour of the image to be processed is enhanced, and the definition of the image to be processed is further improved.
Drawings
FIG. 1 is a schematic device architecture diagram of a hardware operating environment of a terminal device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for processing an ultra-high definition image according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a processing flow of an ultra high definition image according to an embodiment of the method for processing an ultra high definition image of the present invention;
Fig. 4 is a schematic functional block diagram of an embodiment of an ultra-high definition image processing apparatus according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware running environment of a terminal device according to an embodiment of the present invention.
The terminal equipment of the embodiment of the invention can be the terminal equipment applied to the technical field of image processing. Specifically, the terminal device may be a smart phone, a PC (PerSonal Computer ), a tablet computer, a portable computer, or the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a DiSplay (diselay), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 1 is not limiting of the terminal device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a processing program of an ultra-high definition image may be included in a memory 1005 as one type of computer storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client and communicating data with the client; and the processor 1001 may be configured to call a processing program of the ultra high definition image stored in the memory 1005 and perform the following operations:
acquiring an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
extracting a part overlapped with the image to be processed from the original ultra-high definition image to obtain a first image;
performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
And carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
Alternatively, the processor 1001 may be further configured to call a processing program of the ultra high definition image stored in the memory 1005, and perform the following operations:
performing linear fitting processing on pixel points in the second edge contour image based on a random sampling consistency algorithm to obtain a target line segment;
and carrying out pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
Alternatively, the processor 1001 may be further configured to call a processing program of the ultra high definition image stored in the memory 1005, and perform the following operations:
acquiring endpoint coordinates corresponding to the target line segment, and determining a first line segment formed by the endpoint coordinates from the first edge contour image based on the endpoint coordinates;
determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, and adding the first pixel point into the second edge contour image to perform pixel point compensation on the second edge contour image.
Alternatively, the processor 1001 may be further configured to call a processing program of the ultra high definition image stored in the memory 1005, and perform the following operations:
determining a first coordinate of the first pixel point in the first edge contour image, adding the first pixel point into the second edge contour image based on the first coordinate, and performing pixel point compensation on the second edge contour image.
Optionally, the processor 1001 may be further configured to call a processing program of the ultra-high definition image stored in the memory 1005, and further perform the following operations:
judging whether the image to be processed is the original ultra-high definition image after cutting or not based on the number of pixel points corresponding to the image to be processed and the original ultra-high definition image respectively;
if the image to be processed is the original ultra-high definition image after cutting, executing the step of extracting the part overlapped with the image to be processed from the original ultra-high definition image;
and if the image to be processed is the original ultra-high definition image which is not subjected to clipping, taking the original ultra-high definition image as a first image.
Alternatively, the processor 1001 may be further configured to call a processing program of the ultra high definition image stored in the memory 1005, and perform the following operations:
Detecting whether the number of pixel points corresponding to the image to be processed and the original ultra-high definition image is equal or not;
if the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is detected to be equal, determining that the image to be processed is the original ultra-high definition image which is not cut;
if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image are not equal is detected, determining that the image to be processed is the original ultra-high definition image after cutting.
Alternatively, the processor 1001 may be further configured to call a processing program of the ultra high definition image stored in the memory 1005, and perform the following operations:
and determining a second coordinate of the pixel point at the upper left corner of the image to be processed in the original ultra-high definition image, and extracting a part overlapped with the image to be processed from the original ultra-high definition image based on the second coordinate and the size of the image to be processed.
Based on the terminal equipment, various embodiments of the processing method of the ultra-high definition image are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a processing method of an ultra-high definition image according to a first embodiment of the present invention. It should be noted that although a logical sequence is shown in the flowchart, the processing method of the ultra-high definition image of the present invention may, of course, perform the steps shown or described in a different order than that shown or described herein in some cases.
In a first embodiment of the processing method of an ultra-high definition image of the present invention, the processing method of an ultra-high definition image of the present invention includes:
step S10, obtaining an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
in this embodiment, the terminal device obtains an image to be processed and an original ultra-high-definition image corresponding to the image to be processed, where the definition of the image to be processed is lower than that of the original ultra-high-definition image.
The terminal device acquires the original ultra-high-definition image and the original ultra-high-definition image after post-processing, that is, the above-mentioned image to be processed, and it should be noted that the definition of the original ultra-high-definition image is reduced after post-processing, that is, the definition of the image to be processed is lower than that of the original ultra-high-definition image.
Step S20, extracting a part overlapped with the image to be processed from the original ultra-high definition image to obtain a first image;
in this embodiment, the terminal device extracts a portion overlapping with the image to be processed from the original ultra-high definition image, and obtains a first image.
The terminal device compares an original ultra-high definition image with an image to be processed, judges whether the image to be processed is the original ultra-high definition image after clipping, if the original ultra-high definition image is detected to be in the process of performing post-processing to obtain the image to be processed, the original ultra-high definition image is taken as a first image, and if the original ultra-high definition image is detected to be in the process of performing post-processing to obtain the image to be processed, the part overlapped with the image to be processed, namely the first image, is extracted from the original ultra-high definition image.
Step S30, performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
in this embodiment, the terminal device performs edge detection processing on the first image and the image to be processed respectively, so as to obtain an edge contour map corresponding to the first image (hereinafter referred to as a first edge contour image for illustrating distinction) and an edge contour map corresponding to the image to be processed (hereinafter referred to as a second edge contour image for illustrating distinction);
The terminal device performs gray processing on the first image and the image to be processed respectively to obtain a gray image corresponding to the first image (hereinafter referred to as a first gray image for distinguishing) and a gray image corresponding to the image to be processed (hereinafter referred to as a second gray image for distinguishing), performs gaussian filtering processing on the first gray image and the second gray image, and then highlights points with significant changes in intensity values in the gray point field of the image based on an enhancement algorithm. Finally, since gradient values of a plurality of points in the field are larger in the enhanced image, edge points in the enhanced image need to be selected and removed by a thresholding method, so that a final edge profile is obtained.
And step S40, performing pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
In this embodiment, the terminal device performs pixel point compensation on the second edge contour image based on the first edge contour image, to obtain a to-be-processed image (hereinafter referred to as a target image to show distinction) after the pixel compensation.
Further, in a possible embodiment, the step S40 includes:
step S401, performing linear fitting processing on pixel points in the second edge contour image based on a random sampling coincidence algorithm to obtain a target line segment;
in this embodiment, the terminal device performs linear fitting processing on the pixel points in the first edge contour image based on a random sampling coincidence algorithm, so as to obtain a target line segment.
Illustratively, the terminal device performs linear fitting on pixel points contained in the first edge contour image based on a random sampling coincidence algorithm to obtain a plurality of line segments.
Step S402, performing pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
In this embodiment, the terminal device performs pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
The terminal device performs pixel point compensation on the second edge image based on the plurality of line segments obtained by fitting in the first edge contour image and the first edge contour image.
Further, in a possible embodiment, the step S402 may include:
step A10, obtaining endpoint coordinates corresponding to the target line segment, and determining a first line segment formed by the endpoint coordinates from the first edge contour image based on the endpoint coordinates;
In the present embodiment, the terminal device acquires the end point coordinates corresponding to the target line segment, and then determines a line segment (hereinafter referred to as a first line segment to show distinction) constituted by the end point coordinates from the first edge contour image based on the end point coordinates.
The terminal device obtains coordinates corresponding to two end points of the target line segment in the second edge contour image, namely the end point coordinates, and it should be noted that, since the first image and the image to be processed are two images including the same image content, the coordinate system applied by the first edge contour image and the second edge contour image is the same, that is, the end point coordinates are determined in the first edge contour image, that is, one line segment formed by connecting the end point coordinates, namely the first line segment, is determined.
And step A20, determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, and adding the first pixel point into the second edge contour image so as to perform pixel point compensation on the second edge contour image.
In this embodiment, the terminal device determines a pixel point (hereinafter referred to as a first pixel point for illustrating distinction) in the first edge contour image, where the distance between the first pixel point and the first line segment is smaller than a preset distance, and adds the first pixel point to the second edge contour image to perform pixel point compensation on the second edge contour image.
The terminal device calculates a distance between each pixel point in the first edge contour image and the first line segment after determining the first line segment in the first edge contour image, and adds the current pixel point to the second edge contour image when the distance is smaller than a preset distance so as to perform pixel point compensation on the second edge contour image.
It should be noted that, based on different design requirements of practical applications, in different possible embodiments, the preset distance may be any distance according to practical requirements, and the present invention is not limited to the size of the preset distance.
Further, in a possible embodiment, in the step a20, the step of adding the first pixel to the second edge contour image to perform pixel compensation on the second edge contour image may include:
step a201, determining a first coordinate of the first pixel point in the first edge contour image, and adding the first pixel point to the second edge contour image based on the first coordinate to perform pixel point compensation on the second edge contour image.
In this embodiment, the terminal device determines the coordinates (hereinafter referred to as first coordinates to show distinction) of the first pixel point in the first edge profile image, and adds the first pixel point to the second edge profile image based on the first coordinates to perform pixel point compensation on the second edge profile image.
The terminal device finds a pixel point corresponding to the same coordinate in the second edge contour image according to the coordinate of the first pixel point in the first edge contour image, and then replaces the pixel point with the first pixel point to perform pixel point compensation on each target line segment in the second edge contour image.
In the embodiment, the processing method of the ultra-high definition image acquires the image to be processed and the original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image; extracting a part overlapped with an image to be processed from an original ultra-high definition image to obtain a first image; performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed; performing pixel point compensation on the second edge contour image based on the first edge contour image to obtain a to-be-processed image subjected to pixel compensation; performing linear fitting processing on pixel points in the first edge contour image based on a random sampling consistency algorithm to obtain a target line segment, and performing pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image; acquiring endpoint coordinates corresponding to a target line segment, and determining a first line segment formed by the endpoint coordinates from a first edge contour image based on the endpoint coordinates; determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, determining a first coordinate of the first pixel point in the first edge contour image, and adding the first pixel point into the second edge contour image based on the first coordinate so as to carry out pixel point compensation on the second edge contour image.
In this way, the embodiment of the invention obtains the original ultra-high definition image and the original ultra-high definition image (i.e. the image to be processed) after the post-processing, then determines the part overlapped with the image to be processed from the original ultra-high definition image, called a first image, respectively carries out edge detection processing on the first image and the image to be processed to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed, and finally carries out pixel point compensation on the second edge contour image based on the first edge contour image to obtain the compensated image. In this way, the contour extraction is carried out on the original ultra-high definition image and the image to be processed, and the pixel compensation is carried out on the image to be processed by utilizing the contour information extracted from the original ultra-high definition image, so that the contour of the image to be processed is enhanced, and the definition of the image to be processed is further improved.
Further, based on the above-described first embodiment of the processing method of an ultra high definition image of the present invention, a second embodiment of the processing method of an ultra high definition image of the present invention is proposed.
In this embodiment, the method for processing an ultra-high definition image according to the present invention may further include:
step B10, judging whether the image to be processed is the original ultra-high definition image after cutting or not based on the number of pixel points corresponding to the image to be processed and the original ultra-high definition image respectively;
In this embodiment, the terminal device determines, based on the number of pixels corresponding to each of the image to be processed and the original ultra-high-definition image, whether the image to be processed is the original ultra-high-definition image after clipping.
The terminal device obtains width and height information of the image to be processed, calculates the number of pixels of the image to be processed, similarly calculates the number of pixels of the original ultra-high definition image, and judges whether the original ultra-high definition image is subjected to clipping in the process of performing post-processing to obtain the image to be processed based on the respective number of pixels of the two.
Step B20, if the image to be processed is the original ultra-high definition image after clipping, executing the step of extracting the part overlapped with the image to be processed from the original ultra-high definition image;
in this embodiment, if the terminal device detects that the image to be processed is the original ultra-high definition image after clipping, a portion overlapping with the image to be processed is extracted from the original ultra-high definition image.
And step B30, if the image to be processed is the original ultra-high definition image which is not subjected to clipping, taking the original ultra-high definition image as a first image.
In this embodiment, if the terminal device detects that the image to be processed is not the original ultra-high-definition image after clipping, the original ultra-high-definition image is taken as the first image.
For example, if the terminal device detects that the original ultra-high-definition image is not subjected to clipping in the process of performing post-processing to obtain the image to be processed, the terminal device directly takes the original ultra-high-definition image as the first image.
Further, in a possible embodiment, the step B10 includes:
step B101, detecting whether the number of pixel points corresponding to each of the image to be processed and the original ultra-high definition image is equal;
step B102, if the fact that the number of pixel points corresponding to the image to be processed and the original ultra-high definition image is equal is detected, determining that the image to be processed is the original ultra-high definition image which is not cut;
and step B103, if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is not equal is detected, determining that the image to be processed is the original ultra-high definition image after cutting.
In this embodiment, the terminal device detects whether the numbers of pixels corresponding to the to-be-processed image and the original ultra-high definition image are equal, if the numbers of pixels corresponding to the to-be-processed image and the original ultra-high definition image are detected to be equal, determines that the to-be-processed image is not the original ultra-high definition image after clipping, and if the numbers of pixels corresponding to the to-be-processed image and the original ultra-high definition image are detected to be unequal, determines that the to-be-processed image is the original ultra-high definition image after clipping.
Further, in a possible embodiment, the step of extracting the portion overlapping with the image to be processed from the original ultra-high definition image in the step S20 may include:
step S201, determining a second coordinate of an upper left corner pixel point of the to-be-processed image in the original ultra-high definition image, and extracting a portion overlapping with the to-be-processed image from the original ultra-high definition image based on the second coordinate and the size of the to-be-processed image.
In this embodiment, the terminal device determines the coordinates (hereinafter referred to as second coordinates to show distinction) of the upper left corner pixel point of the image to be processed in the original ultra-high definition image, and extracts the portion overlapping with the image to be processed from the original ultra-high definition image based on the second coordinates and the size of the image to be processed.
The terminal device determines coordinates, i.e., second coordinates, of the upper left corner pixel point of the image to be processed in the original ultra-high-definition image after determining that the image to be processed is the cropped original ultra-high-definition image, and then determines a portion, i.e., a first image, overlapping with the image to be processed in the original ultra-high-definition image based on the second coordinates and the size of the image to be processed.
As shown in fig. 3, an ultra-high definition image processing flow is illustrated, firstly, a terminal device acquires an original ultra-high definition image and an ultra-high definition image with reduced definition after post-processing, namely an image to be processed with improved definition is required, then, whether the original ultra-high definition image is cut in the process of post-processing is judged, if yes, a part containing the same content as the image to be processed is extracted from the original ultra-high definition image to be used as a first image; if not, the original ultra-high definition image is directly taken as a first image. After the first image is obtained, edge detection is carried out on the first image and the image to be processed, a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed are obtained, pixel compensation is carried out on the second edge contour image based on pixel points in the first edge contour image, and the compensated image to be processed, namely the image to be processed with improved definition is generated.
In this embodiment, the processing method of the ultra-high definition image detects whether the number of pixels corresponding to each of the image to be processed and the original ultra-high definition image is equal; if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is equal is detected, determining that the image to be processed is not the original ultra-high definition image after cutting; if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image are not equal is detected, determining that the image to be processed is the original ultra-high definition image after cutting; if the image to be processed is detected to be the original ultra-high definition image after cutting, extracting a part overlapped with the image to be processed from the original ultra-high definition image; and if the image to be processed is detected not to be the original ultra-high definition image after cutting, taking the original ultra-high definition image as a first image.
Therefore, by judging whether the original ultra-high definition image is cut in advance in the process of performing the post-processing to generate the image to be processed or not, the two images for pixel point compensation have the same content, so that the coordinates of the pixels are the same, and further the pixel point compensation of the image to be processed is facilitated.
In addition, the embodiment of the invention also provides a processing device of the ultra-high definition image.
Referring to fig. 4, fig. 4 is a schematic functional block diagram of an embodiment of an apparatus for processing an ultra-high definition image according to the present invention, and as shown in fig. 4, the apparatus for processing an ultra-high definition image according to the present invention includes:
the image acquisition module 10 is configured to acquire an image to be processed and an original ultra-high definition image corresponding to the image to be processed, where the sharpness of the image to be processed is lower than that of the original ultra-high definition image;
the coincidence extraction module 20 is configured to extract a portion that coincides with the image to be processed from the original ultra-high definition image, so as to obtain a first image;
the edge detection module 30 is configured to perform edge detection processing on the first image and the image to be processed, so as to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
And the pixel point compensation module 40 is configured to perform pixel point compensation on the second edge contour image based on the first edge contour image, so as to obtain a target image corresponding to the image to be processed.
Optionally, the pixel compensation module 40 includes:
the linear fitting processing unit is used for carrying out linear fitting processing on the pixel points in the second edge contour image based on a random sampling coincidence algorithm to obtain a target line segment;
and the pixel point compensation unit is used for carrying out pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
Optionally, the pixel compensation unit includes:
the first line segment subunit is used for acquiring endpoint coordinates corresponding to the target line segment and determining a first line segment formed by the endpoint coordinates from the first edge contour image based on the endpoint coordinates;
and the pixel point compensation subunit is used for determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, and adding the first pixel point into the second edge contour image so as to carry out pixel point compensation on the second edge contour image.
Optionally, the pixel point compensation subunit is further configured to determine a first coordinate of the first pixel point in the first edge contour image, and add the first pixel point to the second edge contour image based on the first coordinate to perform pixel point compensation on the second edge contour image.
Optionally, the processing device for ultra-high definition image of the present invention further comprises:
the judging module is used for judging whether the image to be processed is the original ultra-high definition image after cutting or not based on the number of pixel points corresponding to the image to be processed and the original ultra-high definition image respectively;
the clipping module is used for executing the step of extracting the part overlapped with the image to be processed from the original ultra-high definition image if the image to be processed is the original ultra-high definition image after clipping;
and the unclamping module is used for taking the original ultra-high definition image as a first image if the image to be processed is the original ultra-high definition image which is not subjected to clipping.
Optionally, the judging module includes:
the detection unit is used for detecting whether the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is equal or not;
The clipping unit is used for determining that the image to be processed is the original ultra-high definition image which is not clipped if the number of pixel points corresponding to the image to be processed and the original ultra-high definition image are detected to be equal;
and the unclamping unit is used for determining that the image to be processed is the original ultra-high definition image after cutting if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image are not equal is detected.
Optionally, the coincidence extraction module 20 further includes:
and the coincidence extraction unit is used for determining a second coordinate of the pixel point at the upper left corner of the image to be processed in the original ultra-high definition image, and extracting a part coincided with the image to be processed from the original ultra-high definition image based on the second coordinate and the size of the image to be processed.
The present invention also provides a computer storage medium having stored thereon a processing program for an ultra-high definition image, which when executed by a processor, implements the steps of the processing program method for an ultra-high definition image according to any one of the above embodiments.
The specific embodiments of the computer storage medium of the present invention are substantially the same as the embodiments of the processing program method for ultra-high definition images of the present invention, and are not described herein.
The present invention also provides a computer program product, which comprises a computer program, and the computer program when executed by a processor implements the steps of the method for processing an ultra-high definition image according to any one of the above embodiments, which is not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a TWS headset or the like) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The processing method of the ultra-high definition image is characterized by comprising the following steps of:
acquiring an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
extracting a part overlapped with the image to be processed from the original ultra-high definition image to obtain a first image;
performing edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
and carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
2. The method of processing an ultra-high definition image according to claim 1, wherein the step of performing pixel compensation on the second edge profile image based on the first edge profile image comprises:
Performing linear fitting processing on pixel points in the second edge contour image based on a random sampling consistency algorithm to obtain a target line segment;
and carrying out pixel point compensation on the second edge contour image based on the target line segment and the first edge contour image.
3. The method of processing an ultra-high definition image according to claim 2, wherein the step of performing pixel point compensation on the second edge profile image based on the target line segment and the first edge profile image comprises:
acquiring endpoint coordinates corresponding to the target line segment, and determining a first line segment formed by the endpoint coordinates from the first edge contour image based on the endpoint coordinates;
determining a first pixel point, the distance between the first pixel point and the first line segment of which is smaller than a preset distance, in the first edge contour image, and adding the first pixel point into the second edge contour image to perform pixel point compensation on the second edge contour image.
4. The method of processing an ultra high definition image according to claim 3, wherein the step of adding the first pixel to the second edge contour image to perform pixel compensation on the second edge contour image comprises:
Determining a first coordinate of the first pixel point in the first edge contour image, adding the first pixel point into the second edge contour image based on the first coordinate, and performing pixel point compensation on the second edge contour image.
5. The method for processing an ultra-high definition image according to claim 4, further comprising;
judging whether the image to be processed is the original ultra-high definition image after cutting or not based on the number of pixel points corresponding to the image to be processed and the original ultra-high definition image respectively;
if the image to be processed is the original ultra-high definition image after cutting, executing the step of extracting the part overlapped with the image to be processed from the original ultra-high definition image;
and if the image to be processed is the original ultra-high definition image which is not subjected to clipping, taking the original ultra-high definition image as a first image.
6. The method for processing an ultra-high definition image according to claim 5, wherein the step of determining whether the image to be processed is the original ultra-high definition image after clipping based on the number of pixels corresponding to each of the image to be processed and the original ultra-high definition image comprises:
Detecting whether the number of pixel points corresponding to the image to be processed and the original ultra-high definition image is equal or not;
if the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image is detected to be equal, determining that the image to be processed is the original ultra-high definition image which is not cut;
if the fact that the number of the pixel points corresponding to the image to be processed and the original ultra-high definition image are not equal is detected, determining that the image to be processed is the original ultra-high definition image after cutting.
7. The method of processing an ultra high definition image according to any one of claims 1 to 6, wherein the step of extracting a portion overlapping with the image to be processed from the original ultra high definition image comprises:
and determining a second coordinate of the pixel point at the upper left corner of the image to be processed in the original ultra-high definition image, and extracting a part overlapped with the image to be processed from the original ultra-high definition image based on the second coordinate and the size of the image to be processed.
8. An ultrahigh-definition image processing apparatus, characterized by comprising:
the image acquisition module is used for acquiring an image to be processed and an original ultra-high definition image corresponding to the image to be processed, wherein the definition of the image to be processed is lower than that of the original ultra-high definition image;
The coincidence extraction module is used for extracting a part coincided with the image to be processed from the original ultra-high definition image to obtain a first image;
the edge detection module is used for carrying out edge detection processing on the first image and the image to be processed respectively to obtain a first edge contour image corresponding to the first image and a second edge contour image corresponding to the image to be processed;
and the pixel point compensation module is used for carrying out pixel point compensation on the second edge contour image based on the first edge contour image to obtain a target image corresponding to the image to be processed.
9. A terminal device, characterized in that the terminal device comprises: memory, a processor and a processing program of an ultra high definition image stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the processing method of an ultra high definition image according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein a processing program of an ultra high definition image is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the processing method of an ultra high definition image according to any one of claims 1 to 7.
CN202310732088.5A 2023-06-20 2023-06-20 Processing method and device for ultra-high definition image, terminal equipment and computer medium Active CN116452471B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310732088.5A CN116452471B (en) 2023-06-20 2023-06-20 Processing method and device for ultra-high definition image, terminal equipment and computer medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310732088.5A CN116452471B (en) 2023-06-20 2023-06-20 Processing method and device for ultra-high definition image, terminal equipment and computer medium

Publications (2)

Publication Number Publication Date
CN116452471A true CN116452471A (en) 2023-07-18
CN116452471B CN116452471B (en) 2023-10-13

Family

ID=87132505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310732088.5A Active CN116452471B (en) 2023-06-20 2023-06-20 Processing method and device for ultra-high definition image, terminal equipment and computer medium

Country Status (1)

Country Link
CN (1) CN116452471B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018228310A1 (en) * 2017-06-16 2018-12-20 Oppo广东移动通信有限公司 Image processing method and apparatus, and terminal
CN109727198A (en) * 2019-01-03 2019-05-07 成都品果科技有限公司 A kind of brightness of image optimization method based on Face Detection
CN112308872A (en) * 2020-11-09 2021-02-02 西安工程大学 Image edge detection method based on multi-scale Gabor first-order derivative
CN114255153A (en) * 2021-11-30 2022-03-29 北京新奥特图腾科技有限公司 Ultrahigh-definition image hybrid processing method and device
CN116012398A (en) * 2021-10-21 2023-04-25 中国石油化工股份有限公司 Image stitching and tampering detection method, electronic device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018228310A1 (en) * 2017-06-16 2018-12-20 Oppo广东移动通信有限公司 Image processing method and apparatus, and terminal
CN109727198A (en) * 2019-01-03 2019-05-07 成都品果科技有限公司 A kind of brightness of image optimization method based on Face Detection
CN112308872A (en) * 2020-11-09 2021-02-02 西安工程大学 Image edge detection method based on multi-scale Gabor first-order derivative
CN116012398A (en) * 2021-10-21 2023-04-25 中国石油化工股份有限公司 Image stitching and tampering detection method, electronic device and storage medium
CN114255153A (en) * 2021-11-30 2022-03-29 北京新奥特图腾科技有限公司 Ultrahigh-definition image hybrid processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑丽萍 等: "医学图像中组织轮廓提取方法的改进", 计算机仿真, no. 03, pages 271 - 274 *

Also Published As

Publication number Publication date
CN116452471B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
US10438086B2 (en) Image information recognition processing method and device, and computer storage medium
US20170208207A1 (en) Method and device for correcting document image captured by image pick-up device
RU2721188C2 (en) Improved contrast and noise reduction on images obtained from cameras
KR20160048140A (en) Method and apparatus for generating an all-in-focus image
CN110414649B (en) DM code positioning method, device, terminal and storage medium
KR20110124965A (en) Apparatus and method for generating bokeh in out-of-focus shooting
CN111507324B (en) Card frame recognition method, device, equipment and computer storage medium
CN109543534B (en) Method and device for re-detecting lost target in target tracking
CN111881846B (en) Image processing method, image processing apparatus, image processing device, image processing apparatus, storage medium, and computer program
CN111899270A (en) Card frame detection method, device and equipment and readable storage medium
CN111079730A (en) Method for determining area of sample image in interface image and electronic equipment
CN113657370B (en) Character recognition method and related equipment thereof
CN111209908A (en) Method and device for updating label box, storage medium and computer equipment
CN116452471B (en) Processing method and device for ultra-high definition image, terminal equipment and computer medium
US10373329B2 (en) Information processing apparatus, information processing method and storage medium for determining an image to be subjected to a character recognition processing
CN112532884A (en) Identification method and device and electronic equipment
CN108647680B (en) Image positioning frame detection method and device
CN111008987A (en) Method and device for extracting edge image based on gray background and readable storage medium
US10354125B2 (en) Photograph processing method and system
CN112749769B (en) Graphic code detection method, graphic code detection device, computer equipment and storage medium
CN112634298B (en) Image processing method and device, storage medium and terminal
WO2017219562A1 (en) Method and apparatus for generating two-dimensional code
CN110913193B (en) Image processing method, device, apparatus and computer readable storage medium
CN109741426B (en) Cartoon form conversion method and device
CN112580638A (en) Text detection method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant