CN111612690A - Image splicing method and system - Google Patents

Image splicing method and system Download PDF

Info

Publication number
CN111612690A
CN111612690A CN201911389991.6A CN201911389991A CN111612690A CN 111612690 A CN111612690 A CN 111612690A CN 201911389991 A CN201911389991 A CN 201911389991A CN 111612690 A CN111612690 A CN 111612690A
Authority
CN
China
Prior art keywords
image
gray
processed
spliced
preset
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
CN201911389991.6A
Other languages
Chinese (zh)
Other versions
CN111612690B (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.)
Suzhou Niumag Analytical Instrument Corp
Original Assignee
Suzhou Niumag Analytical Instrument Corp
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 Suzhou Niumag Analytical Instrument Corp filed Critical Suzhou Niumag Analytical Instrument Corp
Priority to CN201911389991.6A priority Critical patent/CN111612690B/en
Publication of CN111612690A publication Critical patent/CN111612690A/en
Application granted granted Critical
Publication of CN111612690B publication Critical patent/CN111612690B/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
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images

Abstract

The invention discloses an image splicing method and system, wherein the method comprises the following steps: acquiring a sequence image containing an interested target in a preset region as an image to be spliced; determining key areas of the images to be spliced according to the positions of the interested targets in the images, and directly splicing the images to be spliced to obtain an intermediate image to be processed; performing gray stretching treatment on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed; and taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image. The target image is obtained by acquiring the image to be spliced containing the target of interest, performing gray level extension on the intermediate image to be processed and performing gray level gradient processing on the transition area. The image registration in the traditional splicing process is omitted, the calculated amount is reduced, and the speed of splicing the images and the integrity of the images are ensured.

Description

Image splicing method and system
Technical Field
The invention relates to the field of image processing, in particular to an image splicing method and system.
Background
The image stitching technology is an important direction in research in the field of image processing, and is to stitch a plurality of images (possibly obtained at different times and by different instruments) with overlapped parts into a seamless panoramic image, wherein two key technical points of the image stitching technology are image registration and image fusion. Image registration is the basis of image fusion, the calculation amount is large generally, the research on the image registration technology has a long history, the main methods are a method based on the minimum brightness difference of two images and a method based on characteristics, wherein a splicing method based on characteristic template matching characteristic points is used more frequently, and the method allows certain color difference between adjacent images; the image fusion part consumes little time, the algorithm is mature on the whole, the fusion method adopting the absolute value to be large has strong splicing feeling and incomplete structure.
Disclosure of Invention
In view of this, embodiments of the present invention provide an image stitching method and system, which solve the problems of a large amount of calculation, a strong stitching feeling, and an incomplete structure in the existing image stitching technology.
The embodiment of the invention provides an image splicing method, which comprises the following steps: acquiring a sequence image containing an interested target in a preset region as an image to be spliced; determining key areas of the images to be spliced according to the positions of the interested targets in the images, and directly splicing the images to be spliced to obtain an intermediate image to be processed; performing gray stretching treatment on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed; and taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image.
Optionally, the step of acquiring a sequence image containing an object of interest in a preset region as an image to be stitched includes: according to a preset image frame, image acquisition is carried out on the interested target, and a plurality of images which are moved by different distances and contain the interested target are acquired according to a preset moving step length, so that a sequence image is obtained and is used as an image to be spliced.
Optionally, the step of performing gray stretching processing on the intermediate to-be-processed image according to the gray value of each key area to obtain a stretched to-be-processed image includes: acquiring a gray matrix of a key area of each image, and comparing the mean values of the gray matrices of the key areas of two spliced parts of the intermediate image to be processed to obtain a comparison result; and performing gray stretching treatment on the two corresponding spliced parts according to the comparison result and a preset stretching principle to obtain a stretched image to be processed.
Optionally, the step of performing gray scale stretching processing on the two corresponding spliced portions according to the comparison result and a preset stretching principle to obtain a stretched image to be processed includes: determining a gray matrix with a smaller mean value of the gray matrices in the key areas of the two images to be spliced as a small gray matrix, and determining a gray matrix with a larger mean value of the gray matrices in the key areas of the two images to be spliced as a large gray matrix; acquiring the gray value of the spliced part of the middle to-be-processed image where the small gray matrix is located; and stretching the gray value of the splicing part of the middle to-be-processed image where the small gray matrix is located according to a preset stretching principle.
Optionally, the step of stretching the gray value of the spliced portion of the intermediate image to be processed where the small gray matrix is located according to a preset stretching principle includes: multiplying the small gray matrix mean value by a preset coefficient to obtain a corrected gray matrix mean value; subtracting the mean value of the corrected gray matrix from the mean value of the large gray matrix, and continuously correcting the preset coefficient within a preset range until the difference value between the mean value of the corrected gray matrix and the mean value of the large gray matrix is minimum to obtain the current correction coefficient; and stretching the gray value of the spliced part of the middle image to be processed where the small gray matrix is located according to the correction coefficient.
Optionally, the step of performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image includes: acquiring gray values of two spliced parts of the stretched image to be processed; and fusing the gray values of the two spliced parts of the intermediate image to be processed according to a linear weighting method to obtain a target image.
Optionally, the linear weighting is performed by the following formula:
GAi=i/L*G1+(L-i)/L*G2
wherein G isAiGray value of ith column of transition key zone, L width of transition key zone, G1Gray values representing a first stitching of an intermediate image to be processed,G2Representing the gray values of the second stitched part of the intermediate image to be processed.
The embodiment of the invention also provides an image splicing system, which comprises: the acquisition module is used for acquiring sequence images in a preset area and determining images to be spliced according to the sequence images; the image splicing module is used for determining key areas of the images to be spliced according to the real core position and splicing the images to be spliced according to a preset splicing method to obtain the images to be processed; the gray stretching module is used for performing gray stretching processing on the image to be processed according to the gray value of each key area to obtain a stretched image to be processed; and the target image output module is used for acquiring a transition area of the stretched image to be processed and carrying out gray level gradient processing on the transition area according to a preset method to obtain a target image.
The embodiment of the invention also provides a computer-readable storage medium, and the computer-readable storage medium stores computer instructions so as to execute the image splicing method provided by the embodiment of the invention.
An embodiment of the present invention further provides an electronic device, including: the image stitching method comprises a memory and a processor, wherein the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor is used for executing the computer instructions to execute the image stitching method provided by the embodiment of the invention by executing the computer instructions.
The technical scheme of the invention has the following advantages:
1. the image splicing method provided by the invention obtains the images to be spliced containing the interested targets, then determines the key area of each image to be spliced according to the positions of the interested targets in the images, directly splices the images to be spliced, performs gray stretching treatment on the intermediate image to be processed according to the gray values of the key areas, and performs gray gradient treatment on the transition area according to a preset method to obtain the spliced target images. The image registration step in the traditional image splicing process can be omitted, the calculated amount is reduced, and the image splicing speed and the image integrity are ensured.
2. According to the image splicing method provided by the invention, the key area of the image to be spliced is determined, the gray values of two spliced parts are reduced according to the gray matrix of the key area and a preset stretching principle, and then gray gradient processing is carried out on the transition area, so that the target image is obtained. Through multiple times of fusion feature processing, the image after splicing is guaranteed to be clear in texture, incomplete in structure and low in splicing feeling.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a conventional image stitching method provided in an embodiment of the present invention;
FIG. 2 is a flowchart of an image stitching method according to an embodiment of the present invention;
fig. 3 is a flowchart of a gray stretching process of an image stitching method according to an embodiment of the present invention;
fig. 4 is a flowchart of another specific example of the gray stretching process of the image stitching method according to the embodiment of the present invention;
fig. 5 is a flowchart of another specific example of the gray stretching process of the image stitching method according to the embodiment of the present invention;
fig. 6 is a flowchart of a specific example of transition region gradient processing of an image stitching method according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a specific stitching process of an image stitching method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a module of an image stitching system according to an embodiment of the present invention;
fig. 9 is a block diagram of a specific example of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
As shown in fig. 1, general image stitching mainly includes image preprocessing (such as denoising, edge extraction, histogram processing, and the like), image registration (a certain matching strategy is adopted to find out the corresponding positions of feature points or feature regions in the images to be stitched in the reference image, and further determine the transformation relationship between the two images), and image fusion (the overlapped regions of the images to be stitched are fused to obtain a smooth and seamless panoramic image). The image splicing method provided by the embodiment of the invention can be used for splicing a plurality of images, and the image splicing method is used for splicing images for realizing nuclear magnetic resonance imaging of a rock core as an example.
Specifically, as shown in fig. 2, the image stitching method specifically includes:
step S1: and acquiring a sequence image containing the interested target in a preset region as an image to be spliced.
In the embodiment of the invention, the sequence image containing the interested target in the preset area is obtained, the obtained sequence image containing the interested target is determined as the image to be spliced, and the nuclear magnetic resonance image of the rock core is taken as an example for explanation, because the nuclear magnetic imaging signal-to-noise ratio of the rock core is higher, the signal of a background noise area can be ignored relative to the signal of the target rock core area. It should be noted that the preset region in the implementation of the present invention is a region range set according to actual acquisition and splicing needs, and in practical applications, the preset region may also be modified according to actual image needs, which is not limited in the present invention.
Step S2: and determining the key area of each image to be spliced according to the position of the target of interest in the image, and directly splicing the images to be spliced to obtain an intermediate image to be processed.
In the embodiment of the invention, the key area of each image to be spliced is determined according to the position of the target of interest in the image, and the image to be spliced is directly spliced to obtain the intermediate image to be processed. For the core image, namely the area containing the core part in the image is a key area, image splicing is directly carried out on the image to be spliced by adopting the existing splicing algorithm according to the key area to obtain an image to be processed in the middle, and the image to be processed in the middle is divided into a first splicing part and a second splicing part after splicing is finished. It should be noted that any splicing algorithm in the prior art may be selected for the existing splicing algorithm, and the present invention is not limited thereto.
Step S3: and performing gray stretching treatment on the intermediate image to be processed according to the gray value of each key area to obtain the stretched image to be processed.
In the embodiment of the invention, after each key area is determined, the gray value of each key area is obtained, and the gray stretching processing is carried out on two spliced parts in the middle to-be-processed image to obtain the stretched to-be-processed image. It should be noted that the gray stretching requires a certain stretching principle, and the embodiment of the present invention is only illustrated by taking a preset stretching principle as an example, and other stretching principles may also be selected in practical applications, and the present invention is not limited thereto.
Step S4: and taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image.
In the embodiment of the invention, the transition area is an area with the same width as the transition key area in the image to be processed, and after the transition area is determined, gray level gradient processing is carried out on the transition area according to a preset method to obtain a spliced target image.
The image splicing method provided by the invention obtains the images to be spliced containing the interested targets, then determines the key area of each image to be spliced according to the positions of the interested targets in the images, directly splices the images to be spliced, performs gray stretching treatment on the intermediate image to be processed according to the gray values of the key areas, and performs gray gradient treatment on the transition area according to a preset method to obtain the spliced target images. The image registration step in the traditional image splicing process can be omitted, the calculated amount is reduced, and the image splicing speed and the image integrity are ensured.
In a specific embodiment, the process of executing step S1 may specifically include the following steps:
step S11: according to a preset image frame, image acquisition is carried out on the interested target, and a plurality of images which are moved by different distances and contain the interested target are acquired according to a preset moving step length, so that a sequence image is obtained and is used as an image to be spliced.
In the embodiment of the invention, the image is collected according to the preset image frame, so that the sizes of the obtained images can be kept consistent, then the image collection is carried out on the interested target, and a plurality of images containing the interested target after moving different distances are collected according to the preset moving step length. When the image acquisition is carried out on the rock core, a plurality of images containing the rock core after moving different distances are continuously acquired according to a preset moving step length, and the images are determined as images to be spliced. It should be noted that, in the embodiment of the present invention, both the preset image frame and the preset moving step may be adjusted according to actual imaging needs, and the present invention is not limited thereto.
In a specific embodiment, as shown in fig. 3, the process of executing step S3 may specifically include the following steps:
step S31: and obtaining the gray matrix of the key area of each image, and comparing the mean values of the gray matrices of the key areas of the two spliced parts of the intermediate image to be processed to obtain a comparison result.
In the embodiment of the invention, the gray matrix of the key area of each image is obtained, the gray matrices of the key areas of two spliced parts of the spliced intermediate images to be processed are respectively averaged, and the two averaged values are compared to obtain a comparison result.
Step S32: and performing gray stretching treatment on the two corresponding spliced parts according to the comparison result and a preset stretching principle to obtain a stretched image to be processed.
In the embodiment of the invention, the two corresponding splicing parts are subjected to gray level stretching treatment according to the comparison result and the preset stretching principle, the splicing part needing gray level stretching can be determined according to the comparison result, and the part is subjected to gray level stretching treatment according to the preset stretching principle to obtain the stretched image to be processed. It should be noted that the preset stretching principle in the embodiment of the present invention may be adjusted according to actual needs, and the present invention is not limited thereto.
In a specific embodiment, as shown in fig. 4, the process of executing step S32 may specifically include the following steps:
step S321: and determining a gray matrix with a smaller mean value of the gray matrices in the key areas of the two images to be spliced as a small gray matrix, and determining a gray matrix with a larger mean value of the gray matrices in the key areas of the two images to be spliced as a large gray matrix.
In the embodiment of the invention, after the mean values of the gray matrixes of the key areas are compared, the gray matrix with the smaller mean value of the gray matrixes of the key areas of the two images to be spliced is determined as the small gray matrix, and the gray matrix with the larger mean value of the gray matrixes of the key areas of the two images to be spliced is determined as the large gray matrix.
Step S322: and acquiring the gray value of the spliced part of the middle to-be-processed image where the small gray matrix is located.
In the embodiment of the invention, the splicing part of the middle to-be-processed image where the small gray matrix is located is determined according to the comparison result, and then the gray value of the splicing part of the middle to-be-processed image where the small gray matrix is located needs to be obtained, so that the subsequent operation is facilitated.
Step S323: and stretching the gray value of the splicing part of the middle to-be-processed image where the small gray matrix is located according to a preset stretching principle.
In the embodiment of the invention, the part with small gray value needs to be corrected to the part with larger gray value, so that the gray value of the spliced part of the middle image to be processed where the small gray matrix is located is stretched according to the preset stretching principle.
In a specific embodiment, as shown in fig. 5, the process of executing step S323 may specifically include the following steps:
step S3231: and multiplying the small gray matrix mean value by a preset coefficient to obtain a corrected gray matrix mean value.
In the embodiment of the invention, the mean value of the small gray matrix is multiplied by the preset coefficient according to the preset stretching principle to obtain the mean value of the corrected gray matrix, so that the mean value of the small gray matrix is close to the mean value of the large gray matrix. It should be noted that other methods, such as a method of performing linear fitting on the two matrix means, may also be selected as the principle of stretching the gray scale, and the invention is not limited thereto.
Step S3232: and subtracting the mean value of the corrected gray matrix from the mean value of the large gray matrix, and continuously correcting the preset coefficient within a preset range until the difference value between the mean value of the corrected gray matrix and the mean value of the large gray matrix is minimum, so as to obtain the current correction coefficient.
In the embodiment of the invention, the mean value of the corrected gray matrix and the mean value of the large gray matrix are subtracted, and the preset parameters are continuously corrected within a preset range according to the difference value until the difference value between the mean value of the corrected gray matrix and the mean value of the large gray matrix is minimum, and then the current correction parameters are used as coefficients.
Step S3233: and stretching the gray value of the splicing part of the middle to-be-processed image where the small gray matrix mean value is located according to the correction coefficient.
In the embodiment of the invention, the gray value of the splicing part of the middle image to be processed where the small gray matrix is located is stretched according to the correction coefficient, and if the gray matrix of the first splicing part is the small gray matrix, the gray value of the first splicing part is stretched according to the stretching principle. It should be noted that, in the embodiment of the present invention, only the first splicing portion is taken as an example for description, but the present invention is not limited thereto.
In a specific embodiment, as shown in fig. 6, the process of executing step S4 may specifically include the following steps:
step S41: and acquiring gray values of two spliced parts of the stretched image to be processed.
In the embodiment of the invention, for the stretched image to be processed, the gray values of two spliced parts of the stretched image need to be acquired first.
Step S42: and fusing the gray values of the two spliced parts of the intermediate image to be processed according to a linear weighting method to obtain a target image.
In the embodiment of the invention, the gray values of two spliced parts of the intermediate image to be processed are fused by adopting a linear weighting method to obtain a target image, wherein the linear weighting is carried out by the following formula:
GAi=i/L*G1+(L-i)/L*G2(1)
wherein G isAiGray value of ith column of transition key zone, L width of transition key zone, G1Gray value, G, representing a first mosaic of intermediate images to be processed2Representing the gray values of the second stitched part of the intermediate image to be processed.
According to the image splicing method provided by the invention, the key area of the image to be spliced is determined, the gray values of two spliced parts are reduced according to the gray matrix of the key area and a preset stretching principle, and then gray gradient processing is carried out on the transition area, so that the target image is obtained. Through multiple times of fusion feature processing, the image after splicing is guaranteed to be clear in texture, incomplete in structure and low in splicing feeling.
In the embodiment of the present invention, as shown in fig. 7, an image of a core mri is taken as an example for explanation, after an image to be stitched is obtained, a background noise region, that is, a region enclosed by a dotted line in the image, is ignored, then key regions of two images to be stitched are determined according to positions of the core, where the two key regions are respectively represented by a1 and a2, an area of interest after removing the background noise is two regions enclosed by a solid line and are respectively represented by R1 and R2, the two images to be stitched are directly stitched to obtain an intermediate image to be processed, a region having the same key width as the transition region is taken as a transition region of the stretched image to be processed, and the transition key region is a in fig. 7, so that the image to be processed is divided into three parts, that is, a first stitching part 1, a second stitching part 2 and a transition region, where the transition region is the same width as a in fig. 7, the area which is the same as the length of the intermediate image to be processed and contains A. And then carrying out gray stretching treatment on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed, taking an area with the same width as the transition key area as the transition area of the stretched image to be processed, and carrying out gray gradient treatment on the transition area according to a preset method to obtain a spliced target image.
An embodiment of the present invention further provides an image stitching system, as shown in fig. 8, the image stitching system includes:
the acquisition module 1 is configured to acquire a sequence image containing an interested target in a preset region as an image to be stitched. For details, refer to the related description of step S1 in the above method embodiment, and are not described herein again.
And the image splicing module 2 is used for determining the key area of each image to be spliced according to the position of the target of interest in the image, and directly performing image splicing on the images to be spliced to obtain an intermediate image to be processed. For details, refer to the related description of step S2 in the above method embodiment, and are not described herein again.
And the gray stretching module 3 is used for performing gray stretching processing on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed. For details, refer to the related description of step S3 in the above method embodiment, and are not described herein again.
And the target image output module 4 is used for taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image. For details, refer to the related description of step S4 in the above method embodiment, and are not described herein again.
Through the cooperative cooperation of the module components, the image splicing system provided by the invention obtains the images to be spliced containing the interested target, then determines the key area of each image to be spliced according to the position of the interested target in the image, directly splices the images to be spliced, performs gray level stretching treatment on the intermediate image to be processed according to the gray level value of the key area, and performs gray level gradient treatment on the transition area according to a preset method to obtain the spliced target image. The method can save the step of image registration in the traditional image splicing process, reduce the calculated amount, and ensure that the spliced image has clear texture and incomplete structure and reduces the splicing feeling through multiple times of fusion characteristic processing.
An embodiment of the present invention provides a computer device, as shown in fig. 9, including: at least one processor 401, such as a CPU (Central Processing Unit), at least one communication interface 403, memory 404, and at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The communication interface 403 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 403 may also include a standard wired interface and a standard wireless interface. The Memory 404 may be a RAM (random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 404 may optionally be at least one memory device located remotely from the processor 401. Wherein the processor 401 may perform the image stitching method. A set of program codes is stored in the memory 404 and the processor 401 calls the program codes stored in the memory 404 for performing the image stitching method described above.
The communication bus 402 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 9, but this does not represent only one bus or one type of bus.
The memory 404 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviation: HDD), or a solid-state drive (english: SSD); the memory 404 may also comprise a combination of memories of the kind described above.
The processor 401 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The aforementioned PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 404 is also used to store program instructions. The processor 401 may call program instructions to implement the image stitching method as in the present application.
The embodiment of the invention also provides a computer-readable storage medium, wherein computer-executable instructions are stored on the computer-readable storage medium and can execute the image splicing method. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid-State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications of the invention may be made without departing from the spirit or scope of the invention.

Claims (10)

1. An image stitching method, comprising:
acquiring a sequence image containing an interested target in a preset region as an image to be spliced;
determining key areas of the images to be spliced according to the positions of the interested targets in the images, and directly splicing the images to be spliced to obtain an intermediate image to be processed;
performing gray stretching treatment on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed;
and taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and performing gray level gradient processing on the transition region according to a preset method to obtain a spliced target image.
2. The image stitching method according to claim 1, wherein the step of acquiring a sequence image containing an object of interest in a preset region as an image to be stitched comprises:
according to a preset image frame, image acquisition is carried out on the interested target, and a plurality of images which are moved by different distances and contain the interested target are acquired according to a preset moving step length, so that a sequence image is obtained and is used as an image to be spliced.
3. The image stitching method according to claim 1, wherein the step of performing gray stretching processing on the intermediate to-be-processed image according to the gray values of the key regions to obtain a stretched to-be-processed image comprises:
acquiring a gray matrix of a key area of each image, and comparing the mean values of the gray matrices of the key areas of two spliced parts of the intermediate image to be processed to obtain a comparison result;
and performing gray stretching treatment on the two corresponding spliced parts according to the comparison result and a preset stretching principle to obtain a stretched image to be processed.
4. The image stitching method according to claim 3, wherein the step of performing gray scale stretching processing on the two corresponding stitching portions according to the comparison result and a preset stretching principle to obtain a stretched image to be processed comprises:
determining a gray matrix with a smaller mean value of the gray matrices in the key areas of the two images to be spliced as a small gray matrix, and determining a gray matrix with a larger mean value of the gray matrices in the key areas of the two images to be spliced as a large gray matrix;
acquiring the gray value of the spliced part of the middle to-be-processed image where the small gray matrix is located;
and stretching the gray value of the splicing part of the middle to-be-processed image where the small gray matrix is located according to a preset stretching principle.
5. The image stitching method according to claim 4, wherein the step of stretching the gray value of the stitched part of the intermediate image to be processed where the small gray matrix is located according to a preset stretching principle comprises:
multiplying the small gray matrix mean value by a preset coefficient to obtain a corrected gray matrix mean value;
subtracting the mean value of the corrected gray matrix from the mean value of the large gray matrix, and continuously correcting the preset coefficient within a preset range until the difference value between the mean value of the corrected gray matrix and the mean value of the large gray matrix is minimum to obtain the current correction coefficient;
and stretching the gray value of the spliced part of the middle image to be processed where the small gray matrix is located according to the correction coefficient.
6. The image stitching method according to claim 1, wherein the step of performing gray level gradient processing on the transition area according to a preset method to obtain a stitched target image comprises:
acquiring gray values of two spliced parts of the stretched image to be processed;
and fusing the gray values of the two spliced parts of the intermediate image to be processed according to a linear weighting method to obtain a target image.
7. The image stitching method of claim 6, wherein the linear weighting is performed by the following formula:
GAi=i/L*G1+(L-i)/L*G2
wherein G isAiGray value of ith column of transition key zone, L width of transition key zone, G1Gray value, G, representing a first mosaic of intermediate images to be processed2Representing the gray values of the second stitched part of the intermediate image to be processed.
8. An image stitching system, comprising:
the acquisition module is used for acquiring a sequence image containing an interested target in a preset region as an image to be spliced;
the image splicing module is used for determining key areas of the images to be spliced according to the positions of the interested targets in the images, and directly carrying out image splicing on the images to be spliced to obtain an intermediate image to be processed;
the gray stretching module is used for performing gray stretching processing on the intermediate image to be processed according to the gray value of each key area to obtain a stretched image to be processed;
and the target image output module is used for taking the region with the same width as the transition key region as the transition region of the stretched image to be processed, and carrying out gray level gradient processing on the transition region according to a preset method to obtain a spliced target image.
9. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement the image stitching method of any one of claims 1-7.
10. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the image stitching method according to any one of claims 1 to 7.
CN201911389991.6A 2019-12-30 2019-12-30 Image splicing method and system Active CN111612690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911389991.6A CN111612690B (en) 2019-12-30 2019-12-30 Image splicing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911389991.6A CN111612690B (en) 2019-12-30 2019-12-30 Image splicing method and system

Publications (2)

Publication Number Publication Date
CN111612690A true CN111612690A (en) 2020-09-01
CN111612690B CN111612690B (en) 2023-04-07

Family

ID=72195885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911389991.6A Active CN111612690B (en) 2019-12-30 2019-12-30 Image splicing method and system

Country Status (1)

Country Link
CN (1) CN111612690B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862989A (en) * 2022-05-20 2022-08-05 远峰科技股份有限公司 Blind area filling method and device for panoramic all-around image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635603A (en) * 2015-12-31 2016-06-01 天津大学 System for mosaicing videos by adopting brightness and color cast between two videos
CN108257090A (en) * 2018-01-12 2018-07-06 北京航空航天大学 A kind of high-dynamics image joining method that camera is swept towards airborne row
US20190333259A1 (en) * 2018-04-25 2019-10-31 Cognex Corporation Systems and methods for stitching sequential images of an object
CN110473143A (en) * 2019-07-23 2019-11-19 平安科技(深圳)有限公司 A kind of three-dimensional MRA medical image joining method and device, electronic equipment
CN110533670A (en) * 2019-08-16 2019-12-03 大连理工大学 A kind of striation dividing method based on subregion K-means algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635603A (en) * 2015-12-31 2016-06-01 天津大学 System for mosaicing videos by adopting brightness and color cast between two videos
CN108257090A (en) * 2018-01-12 2018-07-06 北京航空航天大学 A kind of high-dynamics image joining method that camera is swept towards airborne row
US20190333259A1 (en) * 2018-04-25 2019-10-31 Cognex Corporation Systems and methods for stitching sequential images of an object
CN110473143A (en) * 2019-07-23 2019-11-19 平安科技(深圳)有限公司 A kind of three-dimensional MRA medical image joining method and device, electronic equipment
CN110533670A (en) * 2019-08-16 2019-12-03 大连理工大学 A kind of striation dividing method based on subregion K-means algorithm

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862989A (en) * 2022-05-20 2022-08-05 远峰科技股份有限公司 Blind area filling method and device for panoramic all-around image
CN114862989B (en) * 2022-05-20 2023-03-28 远峰科技股份有限公司 Blind area filling method and device for panoramic looking-around image

Also Published As

Publication number Publication date
CN111612690B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN108961180B (en) Infrared image enhancement method and system
CN113221925B (en) Target detection method and device based on multi-scale image
CN111667459B (en) Medical sign detection method, system, terminal and storage medium based on 3D variable convolution and time sequence feature fusion
KR20150031241A (en) A device and a method for color harmonization of an image
CN111553841B (en) Real-time video splicing method based on optimal suture line updating
WO2022242122A1 (en) Video optimization method and apparatus, terminal device, and storage medium
CN114219719A (en) CNN medical CT image denoising method based on dual attention and multi-scale features
CN110874855B (en) Collaborative imaging method and device, storage medium and collaborative imaging equipment
CN110880001A (en) Training method, device and storage medium for semantic segmentation neural network
Liu et al. Learning noise-decoupled affine models for extreme low-light image enhancement
CN110717864B (en) Image enhancement method, device, terminal equipment and computer readable medium
CN111612690B (en) Image splicing method and system
CN111325671B (en) Network training method and device, image processing method and electronic equipment
Jeon et al. Low-light image enhancement using inverted image normalized by atmospheric light
CN113781468A (en) Tongue image segmentation method based on lightweight convolutional neural network
CN106971386B (en) Method and device for judging image integrity and page loading degree and client equipment
CN111953888B (en) Dim light imaging method and device, computer readable storage medium and terminal equipment
CN116681636A (en) Light infrared and visible light image fusion method based on convolutional neural network
CN116342446A (en) Multi-focus image fusion method and device, electronic equipment and storage medium
CN105894481B (en) Histogram equalization method and device for video monitoring equipment
CN113888642A (en) Online correction method, system, equipment and medium for panoramic system external parameters
CN114638748A (en) Image processing method, image restoration method, computer device, and storage medium
CN110895790A (en) Scene image super-resolution method based on posterior degradation information estimation
Chen et al. Back-projection residual low-light image enhancement network with color correction matrix
US11943540B2 (en) Method and apparatus for automatic exposure

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