CN112258427A - Infrared image restoration method and device - Google Patents

Infrared image restoration method and device Download PDF

Info

Publication number
CN112258427A
CN112258427A CN202011498802.1A CN202011498802A CN112258427A CN 112258427 A CN112258427 A CN 112258427A CN 202011498802 A CN202011498802 A CN 202011498802A CN 112258427 A CN112258427 A CN 112258427A
Authority
CN
China
Prior art keywords
image
infrared image
infrared
target
straight line
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
CN202011498802.1A
Other languages
Chinese (zh)
Other versions
CN112258427B (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.)
Beijing Hongpu Weishi Image Technology Co ltd
Original Assignee
Beijing Hongpu Weishi Image Technology 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 Beijing Hongpu Weishi Image Technology Co ltd filed Critical Beijing Hongpu Weishi Image Technology Co ltd
Priority to CN202011498802.1A priority Critical patent/CN112258427B/en
Publication of CN112258427A publication Critical patent/CN112258427A/en
Application granted granted Critical
Publication of CN112258427B publication Critical patent/CN112258427B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a method and a device for repairing an infrared image, which relate to the technical field of image processing, and are used for effectively repairing a defective infrared image with misplaced image data so as to enable the defective image which can only be discarded originally to have use value again, wherein the main technical scheme of the invention is as follows: reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images; identifying whether each infrared image has a split screen characteristic in the infrared image file; and if so, repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic. The method is applied to repairing the defect infrared image with the misplaced image data.

Description

Infrared image restoration method and device
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for repairing an infrared image.
Background
The infrared image is formed by receiving infrared rays reflected by ground objects or emitted by the infrared remote sensor, people use methods such as verification to ensure the integrity of data since the image is stored in a digital mode, and basically adopt methods such as redundancy verification and the like for recovering defective data. However, the image feature-based restoration method is not common in the past due to the computer computing capability, and now relies on more powerful hardware, so that the image feature-based restoration becomes practical.
At present, bit Check and the like are generally adopted in the existing image restoration technology, and an image file format is added to detect the data integrity of an image, for example, Cyclic Redundancy Check (CRC) calculation is performed on one piece of image data, and then the result is compared with a Check value at the tail of a file, so as to judge whether the image has defects, and if the image has defects of misplaced image data, processing such as discarding/not displaying/ignoring is performed.
However, the prior art focuses on ensuring that image data cannot be modified in the storage process, and a found defective image cannot be repaired by various verification algorithms basically, and no effective image repairing method exists.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for repairing an infrared image, and mainly aims to effectively repair a defective infrared image with misaligned image data, so that the defective image that originally can only be discarded has a new use value.
In order to achieve the above purpose, the present invention mainly provides the following technical solutions:
the first aspect of the present application provides a method for repairing an infrared image, including:
reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images;
identifying whether each infrared image has a split screen characteristic in the infrared image file;
and if so, repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic.
In some modified embodiments of the first aspect of the present application, the identifying whether a split-screen feature exists in each infrared image in the infrared image file includes:
acquiring each infrared image in the infrared image file;
identifying whether a target straight line exists in each infrared image, wherein the target straight line is a straight line in the horizontal direction and/or the vertical direction in the image;
if yes, acquiring the target straight line;
if the number of the target straight lines is multiple, judging whether the length of the longest straight line in the multiple target straight lines is larger than a preset threshold value;
and if so, determining the longest straight line as the corresponding screen splitting characteristic.
In some modified embodiments of the first aspect of the present application, each of the infrared images is arranged in sequence according to a shooting order and forms an image queue, and if it is identified that the split-screen feature exists in the infrared image file, the method further includes:
acquiring the sorting position of the infrared image corresponding to the split screen feature in the image queue by searching the image queue;
and according to the sequencing position, forming the infrared images adjacent to each other into a target image group, wherein a plurality of images in the target image group are arranged in sequence according to the shooting sequence.
In some modified embodiments of the first aspect of the present application, the repairing the infrared image in an image stitching and combining manner according to the split-screen feature includes:
acquiring an infrared image at the head of the sequence from the target image group;
identifying a corresponding image dislocation area according to the split screen characteristics existing on the infrared image at the head of the sequence, wherein the image dislocation area is an area in which the next image in two adjacent infrared images is stored in the previous storage space;
reserving the dislocation area in the infrared image of the sequencing head and deleting other partial images to be used as a head image to be repaired;
and in the target image group, starting from the first image to be modified, and successively utilizing the next adjacent image to splice and supplement the previous image so as to synthesize a complete infrared image.
The second aspect of the present application provides a device for repairing an infrared image, the device comprising:
the reading unit is used for reading an infrared image file to be stored, and the infrared image file comprises a plurality of shot continuous infrared images;
the identification unit is used for identifying whether each infrared image has a split screen characteristic in the infrared image file read by the reading unit;
and the repairing unit is used for repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic when the infrared image is identified by the identification unit to have the split screen characteristic.
In some modified embodiments of the second aspect of the present application, the identification unit includes:
the first acquisition module is used for acquiring each infrared image in the infrared image file;
the identification module is used for identifying whether a target straight line exists in each infrared image acquired by the first acquisition module, wherein the target straight line is a straight line in the horizontal direction and/or the vertical direction in the image;
the second acquisition module is used for acquiring a target straight line when the identification module identifies that the target straight line exists in the infrared image;
the judging module is further configured to judge whether the length of the longest straight line in the plurality of target straight lines is greater than a preset threshold value when the plurality of target straight lines are acquired by the second acquiring module;
and the determining module is used for determining the longest straight line as the corresponding screen splitting characteristic when the judging module judges that the length of the longest straight line in the target straight lines is greater than a preset threshold value.
In some modified embodiments of the second aspect of the present application, each of the infrared images is arranged in sequence according to a shooting order and forms an image queue, and the apparatus further includes:
the acquisition unit is used for acquiring the sorting position of the infrared image corresponding to the split screen feature in the image queue by searching the image queue if the split screen feature is identified in the infrared image file;
and the composition unit is used for composing the infrared images adjacent to each other into a target image group according to the sequencing position acquired by the acquisition unit, and a plurality of images in the target image group are arranged in sequence according to the shooting sequence.
In some modified embodiments of the second aspect of the present application, the repair unit includes:
the acquisition module is used for acquiring the infrared image at the head of the sequence in the target image group;
the identification module is used for identifying a corresponding image dislocation area according to the split screen characteristics existing on the infrared image at the head of the sequence acquired by the acquisition module, wherein the image dislocation area is an area in which the next image in two adjacent infrared images is stored in the previous storage space;
the execution module is used for reserving the dislocation area in the infrared image of the first sorting position identified by the identification module and deleting other partial images to be used as an image to be repaired at the first position;
and the splicing and synthesizing module is used for splicing and complementing the previous image by successively utilizing the next adjacent image by taking the first image to be modified obtained by the execution module as a start in the target image group so as to synthesize a complete infrared image.
The third aspect of the present application provides a storage medium, the storage medium includes a stored program, wherein, when the program runs, a device where the storage medium is located is controlled to execute the infrared image restoration method.
A fourth aspect of the present application provides an electronic device comprising at least one processor, and at least one memory, a bus, connected to the processor;
the processor and the memory complete mutual communication through the bus;
the processor is used for calling the program instructions in the memory so as to execute the infrared image restoration method.
By the technical scheme, the technical scheme provided by the invention at least has the following advantages:
the invention provides a method and a device for restoring infrared images, which are characterized in that an infrared image file to be stored is read, whether each infrared image has a split screen characteristic or not is identified in the infrared image file, if the split screen phenomenon is detected, the split screen characteristics of a plurality of continuous infrared images which are usually shot can almost appear at the same position, and then the infrared images which are complete and do not contain the split screen characteristics are processed in the defective infrared images in an image splicing and synthesizing mode according to the split screen characteristics. Compared with the prior art, the method solves the technical problem that an effective image repairing method is not available for the found defect image, and can effectively repair the defect infrared image with misplaced image data, so that the defect image which can only be discarded originally has a use value again.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a method for repairing an infrared image according to an embodiment of the present invention;
fig. 2 is a flowchart of another infrared image restoration method according to an embodiment of the present invention;
FIG. 3 is an exemplary infrared image including both horizontal and vertical split screen features in accordance with an embodiment of the present invention;
fig. 4 is a block diagram of an infrared image restoration apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of another infrared image restoration apparatus according to an embodiment of the present invention;
fig. 6 is an electronic device for repairing an infrared image according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a method for repairing an infrared image, as shown in fig. 1, the method is used for effectively repairing a defect infrared image with misplaced image data, so that the defect image which can only be discarded originally has a use value again, and the following specific steps are provided for the embodiment of the invention:
101. and reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images.
In the embodiment of the invention, the infrared images are shot by using equipment firstly, and a large number of shot infrared images are also orderly arranged according to the shooting time sequence to form a corresponding infrared image file. For the embodiment of the invention, when the infrared image file is stored, whether a defect image with misplaced image data exists is detected, and if the defect image exists, the defect image is timely repaired to ensure that the infrared image contained in the finally stored infrared image file is complete and has no defect.
102. And identifying whether the split screen characteristic exists in each infrared image in the infrared image file.
The split-screen feature refers to that for a defect image with misplaced image data, in the process of continuously shooting the infrared image, the next image is stored in the storage space of the previous image.
In the embodiment of the present invention, in the process of continuously capturing infrared images by using a device, if a split-screen feature occurs in one infrared image, then a plurality of adjacent continuous images of the infrared image also have the split-screen feature at almost the same position, that is: such as: for an infrared image file consisting of 500 continuously shot infrared images, if image data is misaligned, it may be continuously detected that the 100 infrared images have a split-screen feature at the same position in the image, that is, in general, if image data is misaligned, it is not only one image defect, but also the integrity of many continuous images will be affected.
103. And if the split screen characteristic exists, repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic.
In the embodiment of the invention, if the infrared image is detected to have the split-screen feature, the defective infrared images are found and repaired in the defective infrared images in an image splicing and synthesizing mode according to the specific position of the split-screen feature, for example, in two adjacent infrared images, the next image is spliced to complete the previous image, so that the finally repaired infrared image is complete and has no split-screen feature.
The embodiment of the invention provides an infrared image restoration method, which is characterized in that an infrared image file to be stored is read, whether each infrared image has a split screen characteristic or not is identified in the infrared image file, if the split screen phenomenon is detected, the split screen characteristics of a plurality of continuous infrared images which are usually shot can almost occur at the same position, and then the infrared images which are complete and do not contain the split screen characteristics are processed in the defective infrared images in an image splicing and synthesizing mode according to the split screen characteristics. Compared with the prior art, the method and the device solve the technical problem that no effective image repairing method is available for the found defective image, and the embodiment of the invention can effectively repair the defective infrared image with misplaced image data, so that the defective image which can only be discarded originally has use value again.
In order to explain the above embodiments in more detail, the embodiment of the present invention further provides another infrared image restoration method, as shown in fig. 2, which further states whether a split-screen feature exists in an infrared image or not, and effectively restores the split-screen feature, and for this embodiment of the present invention, the following specific steps are provided:
201. and reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images.
In the embodiment of the invention, the infrared images are shot by using equipment firstly, and a large number of shot infrared images are also orderly arranged according to the shooting time sequence to form a corresponding infrared image file. For the embodiment of the invention, when the infrared image file is stored, whether a defect image with misplaced image data exists is detected, and if the defect image exists, the defect image is timely repaired to ensure that the infrared image contained in the finally stored infrared image file is complete and has no defect.
202. And identifying whether the split screen characteristic exists in each infrared image in the infrared image file.
The split-screen feature refers to a defect image with misplaced image data, and in the process of continuously shooting the infrared image, the next image is stored in the storage space of the previous image
In the embodiment of the invention, in the process of continuously shooting the infrared images by using the equipment, if the split-screen feature appears in one infrared image, the split-screen features appear in the adjacent continuous images of the infrared image at almost the same position. Specifically, the detailed statement of the step 202 may include the following steps:
firstly, each infrared image in the infrared image file is obtained, whether a target straight line exists in each infrared image is identified, and the target straight line refers to a straight line in the horizontal direction and/or the vertical direction in the infrared image. Specifically, the target line may appear in the horizontal direction, the vertical direction, and both directions.
Secondly, since the original content information of the infrared image may also include some straight lines in the horizontal direction or the vertical direction, and these straight lines may be some edge in the captured image, these straight lines are not the split screen feature, and such infrared image also has no image data misalignment. Therefore, in the embodiment of the present invention, after the target straight line is identified in the infrared image, it is further necessary to further determine whether the target straight line belongs to the split-screen feature or the original content information of the image.
Specifically, a preset threshold may be used for comparison, and whether the length of the target straight line is greater than the preset threshold is determined, if yes, the target straight line is determined to be a split-screen feature, and in a detailed manner, the preset thresholds set in the horizontal direction or the vertical direction may be the same or different.
Further, it should be noted that, in the process of comparing the target straight line with the preset threshold, if a target straight line in the horizontal direction or the vertical direction is identified to be unique, the unique target straight line may be compared, but if a plurality of target straight lines are identified in one direction, a longest straight line is selected in one direction (i.e., the horizontal direction or the vertical direction), and the longest straight line is used to compare with the preset threshold, and if the longest straight line is greater than the preset threshold, the target straight line is determined as the split-screen feature in the direction.
It should be noted that, for image data misalignment, the split-screen feature appearing in the infrared image may be horizontal, vertical, or in both directions, that is: if the split screen feature is in the horizontal direction, the split screen feature is equivalent to that an infrared image is divided into an upper part and a lower part, but the two parts cannot form complete image content; if the split screen feature is in the vertical direction, the split screen feature is equivalent to that an infrared image is divided into a left part and a right part, but the two parts cannot form complete image content; if the split-screen feature exists in both directions, the infrared image including the split-screen feature as illustrated in fig. 3 is equivalent to dividing one infrared image into 4 parts, but the four parts cannot form the complete image content.
203. And after the infrared image file is identified to have the split screen feature, the image queue is searched to obtain the sequencing position of the infrared image corresponding to the split screen feature in the image queue.
In the embodiment of the invention, a large number of infrared images are obtained according to the shooting sequence and are correspondingly sequenced according to the sequence, so that an image queue is formed. In addition, if image data is misaligned, it is not only a defect of one image but also affects a plurality of continuous images, so that the defective images need to be searched from the image queue so as to form a new image group, and then the new image group is subjected to a repairing operation in a targeted manner.
204. And according to the sequencing position, forming the infrared images adjacent to each other into a target image group, wherein a plurality of images in the target image group are arranged in sequence according to the shooting sequence.
In the embodiment of the invention, the sorting position of the split-screen characteristic image in the image queue is searched, and then the infrared images adjacent to the sorting position form a target image group according to the sorting position, namely form a new image group, and a plurality of images in the new image group are arranged in sequence according to the shooting sequence.
205. And repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic.
In the embodiment of the present invention, the repairing operation on the defective image in the target image group according to the split-screen feature may specifically include the following steps:
firstly, acquiring an infrared image at the head of a sequence from a target image group, and identifying a corresponding image dislocation area according to the split screen characteristics existing on the infrared image at the head of the sequence, wherein the image dislocation area is an area in which the next image in two adjacent infrared images is stored in the previous storage space.
It should be noted that, for the misalignment of the image data, it is not an image defect, but it affects a plurality of continuous images, for example, the next image in these images is saved to the last region of the storage space, so that an infrared image is divided into a plurality of parts by the position of the split-screen feature, but these parts cannot constitute the whole image content, such as the infrared image containing the split-screen feature illustrated in fig. 3.
Then, according to the storage rule that the next image is stored in the previous storage space when the image data is misaligned, the start position of the image data misalignment is found, that is: the first image (i.e., the infrared image of the first order) can facilitate the restoration of the adjacent subsequent continuous images.
And secondly, reserving a dislocation area in the infrared image at the head of the sequence and deleting other partial images to be used as an image to be repaired at the head, and sequentially splicing and complementing the previous image by using the next adjacent image in the target image group by taking the image to be modified at the head as a start to synthesize a complete infrared image.
Specifically, for example, for an infrared image with a split screen characteristic in the horizontal direction or the vertical direction, the lower part or the right part of the top image in the sequence stores the next adjacent image content information, i.e., the image data misplaced area, then the misplaced area is retained, and the other partial images are deleted, that is: according to this example, the upper part or the left part of the top-ranked image is deleted, the related contents are copied from the adjacent next image to stitch and complement the top-ranked image to synthesize a complete infrared image, and the previous image is successively stitched and complemented with the adjacent next image successively according to the above-described operation to finally complete the image restoration operation for the target image group.
Further, for the split-screen feature that includes both the horizontal direction and the vertical direction as exemplified in fig. 3, the upper left 1/4 may be deleted, and then the split-screen feature in the vertical direction is deleted, and the repairing process is performed according to the remaining split-screen feature in the horizontal direction (single direction), and the specific repairing operation steps are as described above and will not be described herein again.
Further, as an implementation of the method shown in fig. 1 and fig. 2, an embodiment of the present invention provides an infrared image restoration apparatus. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. The device is applied to repair the defective infrared image with misplaced image data, and specifically as shown in fig. 4, the device comprises:
a reading unit 31 configured to read an infrared image file to be stored, where the infrared image file includes a plurality of captured continuous infrared images;
an identifying unit 32 configured to identify whether a split-screen feature exists in each infrared image in the infrared image file read by the reading unit 31;
and the repairing unit 33 is configured to repair the infrared image in an image splicing and synthesizing manner according to the split-screen feature when the infrared image is identified by the identifying unit 32 to have the split-screen feature.
Further, as shown in fig. 5, the identification unit 32 includes:
a first obtaining module 321, configured to obtain each infrared image in the infrared image file;
an identifying module 322, configured to identify whether a target straight line exists in each infrared image acquired by the first acquiring module 321, where the target straight line is a straight line in a horizontal direction and/or a vertical direction in the image;
a second obtaining module 323, configured to obtain a target straight line when the recognition module 322 recognizes that the target straight line exists in the infrared image;
the determining module 324 is further configured to, when a plurality of target straight lines are acquired by the second acquiring module 323, determine whether a length of a longest straight line in the plurality of target straight lines is greater than a preset threshold;
a determining module 325, configured to determine, when the determining module 324 determines that the length of the longest straight line in the multiple target straight lines is greater than a preset threshold, the longest straight line as the corresponding split-screen feature.
Further, as shown in fig. 5, in the infrared images, each infrared image is arranged in sequence according to the shooting order and forms an image queue, and the apparatus further includes:
an obtaining unit 34, configured to, if a split-screen feature is identified in the infrared image file, obtain, by searching the image queue, a sorting position of the infrared image corresponding to the split-screen feature in the image queue;
and a forming unit 35, configured to form a target image group from the infrared images adjacent to each other according to the sorting position acquired by the acquiring unit 34, where multiple images in the target image group are arranged in sequence according to a shooting order.
Further, as shown in fig. 5, the repair unit 33 includes:
the acquiring module 331 is configured to acquire an infrared image at the top of the sequence in the target image group;
the identifying module 332 is configured to identify a corresponding image misalignment region according to the split-screen feature existing on the first infrared image in the sequence acquired by the acquiring module 331, where the image misalignment region is a region where a next image in two adjacent infrared images is stored in a previous storage space;
an executing module 333, configured to reserve the misalignment area in the infrared image with the top rank identified by the identifying module 332 and delete other partial images as a top image to be repaired;
a stitching and synthesizing module 334, configured to stitch and complement the previous image successively by using the next adjacent image, starting with the first image to be modified obtained by the executing module 333, in the target image group, so as to synthesize a complete infrared image.
In summary, embodiments of the present invention provide a method and an apparatus for repairing an infrared image, where an infrared image file to be stored is read, and whether a split-screen feature exists in each infrared image is identified in the infrared image file, and if a split-screen phenomenon is detected, a plurality of continuous infrared images that are usually captured will have a split-screen feature in almost the same position, then the infrared images that are defective are processed in an image stitching and synthesizing manner according to the split-screen feature, so as to finally obtain an infrared image that is complete and does not include the split-screen feature. Compared with the prior art, the method and the device solve the technical problem that no effective image repairing method is available for the found defective image, and the embodiment of the invention can effectively repair the defective infrared image with misplaced image data, so that the defective image which can only be discarded originally has use value again.
The infrared image restoration device comprises a processor and a memory, wherein the reading unit, the identification unit, the restoration unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the defect infrared image with the misplaced image data is effectively repaired by adjusting the kernel parameters, so that the defect image which can only be discarded originally has a use value again.
An embodiment of the present invention provides a storage medium, on which a program is stored, which, when executed by a processor, implements the infrared image restoration method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the infrared image restoration method is executed when the program runs.
An embodiment of the present invention provides an electronic device 40, as shown in fig. 6, the device includes at least one processor 401, and at least one memory 402 and a bus 403 connected to the processor 401; the processor 401 and the memory 402 complete communication with each other through the bus 403; the processor 401 is configured to call the program instructions in the memory 402 to execute the above-mentioned infrared image restoration method.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
a method of inpainting an infrared image, the method comprising: reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images; identifying whether each infrared image has a split screen characteristic in the infrared image file; and if so, repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic 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. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for restoring an infrared image, the method comprising:
reading an infrared image file to be stored, wherein the infrared image file comprises a plurality of shot continuous infrared images;
identifying whether each infrared image has a split screen characteristic in the infrared image file;
and if so, repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic.
2. The method of claim 1, wherein identifying whether a split-screen feature exists in each infrared image in the infrared image file comprises:
acquiring each infrared image in the infrared image file;
identifying whether a target straight line exists in each infrared image, wherein the target straight line is a straight line in the horizontal direction and/or the vertical direction in the image;
if yes, acquiring the target straight line;
if the number of the target straight lines is multiple, judging whether the length of the longest straight line in the multiple target straight lines is larger than a preset threshold value;
and if so, determining the longest straight line as the corresponding screen splitting characteristic.
3. The method of claim 1, wherein each of the infrared images is arranged in sequence in the shooting order and forms an image queue, and wherein the method further comprises, if the presence of the split-screen feature is recognized in the infrared image file:
acquiring the sorting position of the infrared image corresponding to the split screen feature in the image queue by searching the image queue;
and according to the sequencing position, forming the infrared images adjacent to each other into a target image group, wherein a plurality of images in the target image group are arranged in sequence according to the shooting sequence.
4. The method according to claim 3, wherein the repairing the infrared image in an image splicing and synthesizing manner according to the split screen feature comprises:
acquiring an infrared image at the head of the sequence from the target image group;
identifying a corresponding image dislocation area according to the split screen characteristics existing on the infrared image at the head of the sequence, wherein the image dislocation area is an area in which the next image in two adjacent infrared images is stored in the previous storage space;
reserving the dislocation area in the infrared image of the sequencing head and deleting other partial images to be used as a head image to be repaired;
and in the target image group, starting from the first image to be restored, and successively utilizing the next adjacent image to splice and complement the previous image so as to synthesize a complete infrared image.
5. An infrared image restoration device, comprising:
the reading unit is used for reading an infrared image file to be stored, and the infrared image file comprises a plurality of shot continuous infrared images;
the identification unit is used for identifying whether each infrared image has a split screen characteristic in the infrared image file read by the reading unit;
and the repairing unit is used for repairing the infrared image in an image splicing and synthesizing mode according to the split screen characteristic when the infrared image is identified by the identification unit to have the split screen characteristic.
6. The apparatus of claim 5, wherein the identification unit comprises:
the first acquisition module is used for acquiring each infrared image in the infrared image file;
the identification module is used for identifying whether a target straight line exists in each infrared image acquired by the first acquisition module, wherein the target straight line is a straight line in the horizontal direction and/or the vertical direction in the image;
the second acquisition module is used for acquiring a target straight line when the identification module identifies that the target straight line exists in the infrared image;
the judging module is further configured to judge whether the length of the longest straight line in the plurality of target straight lines is greater than a preset threshold value when the plurality of target straight lines are acquired by the second acquiring module;
and the determining module is used for determining the longest straight line as the corresponding screen splitting characteristic when the judging module judges that the length of the longest straight line in the target straight lines is greater than a preset threshold value.
7. The apparatus according to claim 5, wherein each of the infrared images is arranged in sequence in the shooting order and forms an image queue, the apparatus further comprising:
the acquisition unit is used for acquiring the sorting position of the infrared image corresponding to the split screen feature in the image queue by searching the image queue if the split screen feature is identified in the infrared image file;
and the composition unit is used for composing the infrared images adjacent to each other into a target image group according to the sequencing position acquired by the acquisition unit, and a plurality of images in the target image group are arranged in sequence according to the shooting sequence.
8. The apparatus of claim 7, wherein the repair unit comprises:
the acquisition module is used for acquiring the infrared image at the head of the sequence in the target image group;
the identification module is used for identifying a corresponding image dislocation area according to the split screen characteristics existing on the infrared image at the head of the sequence acquired by the acquisition module, wherein the image dislocation area is an area in which the next image in two adjacent infrared images is stored in the previous storage space;
the execution module is used for reserving the dislocation area in the infrared image of the first sorting position identified by the identification module and deleting other partial images to be used as an image to be repaired at the first position;
and the splicing and synthesizing module is used for splicing and complementing the previous image by successively utilizing the next adjacent image by taking the first image to be modified obtained by the execution module as a start in the target image group so as to synthesize a complete infrared image.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the infrared image restoration method according to any one of claims 1-4.
10. An electronic device, comprising at least one processor, and at least one memory, bus connected to the processor;
the processor and the memory complete mutual communication through the bus;
the processor is used for calling the program instructions in the memory to execute the infrared image restoration method according to any one of claims 1 to 4.
CN202011498802.1A 2020-12-18 2020-12-18 Infrared image restoration method and device Active CN112258427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011498802.1A CN112258427B (en) 2020-12-18 2020-12-18 Infrared image restoration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011498802.1A CN112258427B (en) 2020-12-18 2020-12-18 Infrared image restoration method and device

Publications (2)

Publication Number Publication Date
CN112258427A true CN112258427A (en) 2021-01-22
CN112258427B CN112258427B (en) 2021-03-30

Family

ID=74225008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011498802.1A Active CN112258427B (en) 2020-12-18 2020-12-18 Infrared image restoration method and device

Country Status (1)

Country Link
CN (1) CN112258427B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100079448A1 (en) * 2008-09-30 2010-04-01 Liang-Gee Chen 3D Depth Generation by Block-based Texel Density Analysis
CN104318516A (en) * 2014-07-24 2015-01-28 浙江工商大学 Image zooming method based on kerf alignment and deformation correction
CN104794683A (en) * 2015-05-05 2015-07-22 中国人民解放军国防科学技术大学 Video connecting method based on planar scanning around gradient joint regions
CN105205812A (en) * 2015-09-01 2015-12-30 哈尔滨工业大学 Multiframe image reconstruction method based on microsatellite constellation
CN107085842A (en) * 2017-04-01 2017-08-22 上海讯陌通讯技术有限公司 The real-time antidote and system of self study multiway images fusion
CN108550113A (en) * 2018-04-17 2018-09-18 东莞市金翔光电科技有限公司 Image scanning output method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100079448A1 (en) * 2008-09-30 2010-04-01 Liang-Gee Chen 3D Depth Generation by Block-based Texel Density Analysis
CN104318516A (en) * 2014-07-24 2015-01-28 浙江工商大学 Image zooming method based on kerf alignment and deformation correction
CN104794683A (en) * 2015-05-05 2015-07-22 中国人民解放军国防科学技术大学 Video connecting method based on planar scanning around gradient joint regions
CN105205812A (en) * 2015-09-01 2015-12-30 哈尔滨工业大学 Multiframe image reconstruction method based on microsatellite constellation
CN107085842A (en) * 2017-04-01 2017-08-22 上海讯陌通讯技术有限公司 The real-time antidote and system of self study multiway images fusion
CN108550113A (en) * 2018-04-17 2018-09-18 东莞市金翔光电科技有限公司 Image scanning output method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112258427B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN110705405B (en) Target labeling method and device
CN110147722A (en) A kind of method for processing video frequency, video process apparatus and terminal device
US8842889B1 (en) System and method for automatic face recognition
CN112926531A (en) Feature information extraction method, model training method and device and electronic equipment
JPH0546591B2 (en)
KR20220093187A (en) Positioning method and apparatus, electronic device, computer readable storage medium
CN107748780A (en) A kind of restoration methods and device of recycle bin file
CN112052702A (en) Method and device for identifying two-dimensional code
CN111597553A (en) Process processing method, device, equipment and storage medium in virus searching and killing
CN112634286B (en) Image clipping method and device
CN112884866B (en) Coloring method, device, equipment and storage medium for black-and-white video
US10303950B1 (en) Automated video correction
CN112258427B (en) Infrared image restoration method and device
CN110796129A (en) Text line region detection method and device
CN110059563B (en) Text processing method and device
WO2023160061A1 (en) Method and apparatus for determining moving object in image, electronic device, and storage medium
CN106161743B (en) Media resource processing method, device and terminal
US20220122341A1 (en) Target detection method and apparatus, electronic device, and computer storage medium
CN114155471A (en) Design drawing and object verification method, device, computer equipment and system
US11995144B2 (en) Webpage illustration processing method, system, device and storage medium
CN113591656A (en) Image processing method, system, device, equipment and computer storage medium
CN113435312A (en) Method and device for monitoring interrogation scene and storage medium
CN113222826A (en) Document shadow removing method and device
CN111833232A (en) Image processing device
CN113449713B (en) Method and device for cleaning training data of face detection model

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