CN114007044A - Opencv-based image splicing system and method - Google Patents

Opencv-based image splicing system and method Download PDF

Info

Publication number
CN114007044A
CN114007044A CN202111260032.1A CN202111260032A CN114007044A CN 114007044 A CN114007044 A CN 114007044A CN 202111260032 A CN202111260032 A CN 202111260032A CN 114007044 A CN114007044 A CN 114007044A
Authority
CN
China
Prior art keywords
picture
frame
image
opencv
panoramic
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.)
Pending
Application number
CN202111260032.1A
Other languages
Chinese (zh)
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.)
Anhui Qizhi Technology Co ltd
Original Assignee
Anhui Qizhi 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 Anhui Qizhi Technology Co ltd filed Critical Anhui Qizhi Technology Co ltd
Priority to CN202111260032.1A priority Critical patent/CN114007044A/en
Publication of CN114007044A publication Critical patent/CN114007044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/698Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/90Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2624Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of whole input images, e.g. splitscreen

Abstract

The invention discloses an opencv-based image splicing system and method, wherein the system comprises the following steps: the device comprises an image acquisition module, a picture splitting module, an image caching module, an image processing module, a picture analysis module and a panoramic picture storage module. The method comprises the following steps: acquiring a plurality of video images at the same visual angle through a camera, and converting the video stream into frame pictures by adopting OpenCV (open channel video coding); further disassembling each frame of picture into pixel points; the key value of each frame picture and the pixel point of the frame picture are disassembled and bound and then sent to a picture storage server for caching; performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture; calling a picture analysis tool, and detecting whether the picture imaging effect is abnormal or not by analyzing the relevant characteristics of the panoramic picture; and storing the spliced panoramic image into a distributed file system for subsequent viewing or calling of specific application. The invention analyzes the imaging effect of the picture, and the imaging effect of the whole picture is better.

Description

Opencv-based image splicing system and method
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an opencv-based image splicing system and method.
Background
OpenCV is a BSD license (open source) based distributed cross-platform computer vision and machine learning software library that can run on Linux, Windows, Android, and Mac OS operating systems. The method is light and efficient, is composed of a series of C functions and a small number of C + + classes, provides interfaces of languages such as Python, Ruby, MATLAB and the like, realizes a plurality of general algorithms in the aspects of image processing and computer vision, comprises a series of basic methods in the aspect of image processing, can be taken for direct use in some methods, and can also carry out a series of optimization operations on the basis of OpenCV native codes and interfaces.
The existing image splicing method only processes how each frame of image of the image is spliced, but does not analyze the imaging effect of the image, so that the imaging effect of the whole image is poor, and some images are blurred.
Disclosure of Invention
The invention provides an opencv-based image splicing system and method, aiming at the problem that the imaging effect of a picture is not analyzed in the prior art, so that the imaging effect of the whole image is poor.
In order to achieve the technical purpose, the technical scheme adopted by the invention is as follows:
an opencv-based image splicing system comprises
The image acquisition module is a multi-angle monitoring camera and is used for acquiring video images by rotating for multiple circles at different elevation angles and converting video streams into frame pictures by using OpenCV (open channel video coding scheme);
the picture splitting module is used for splitting pixel points of each frame of picture;
the image cache module is a picture storage server and is used for sending the key value of each frame of picture and the disassembled and bound frame picture pixel points to the picture storage server for caching;
the image processing module is a picture data splicing processing engine and is used for acquiring cached images in the server; performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture;
the picture analysis module is used for calling a picture analysis tool, detecting whether the imaging effect of the picture is abnormal or not by analyzing the relevant characteristics of the panoramic picture, sending the image to the panoramic picture storage module for storage if the imaging effect is normal, and calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to the image processing module for splicing and replacing abnormal frame picture pixel points if the imaging effect is abnormal;
and the panoramic picture storage module stores the spliced panoramic picture into a distributed file system for calling specific applications.
An opencv-based image splicing method comprises the following steps:
acquiring a plurality of video images at the same visual angle through a camera, and converting the video stream into frame pictures by adopting OpenCV (open channel video coding);
further disassembling each frame of picture into pixel points;
the key value of each frame picture and the pixel point of the frame picture are disassembled and bound and then sent to a picture storage server for caching;
performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture;
calling a picture analysis tool, and detecting whether the picture imaging effect is abnormal or not by analyzing the relevant characteristics of the panoramic picture;
if the imaging effect is normal, sending the image to a panoramic picture storage module for storage, and if the imaging effect is abnormal, calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to an image processing module for splicing and replacing the abnormal frame picture pixel points;
and storing the spliced panoramic image into a distributed file system for subsequent viewing or calling of specific application.
Furthermore, the number of the cameras is 3 or more than 3, and the 3 cameras are arranged in 3 different planes in the space to be photographed.
Further, the cache directory structure of the picture storage server is stored in a form of a queue.
Further, after disassembling and binding the key value of each frame of picture and the pixel point of the frame of picture, sending the key value and the pixel point of the frame of picture to a picture storage server for caching; meanwhile, the key value of each frame of picture and the pixel point of the frame of picture need to be disassembled and bound and then sent to the standby picture storage server for storage.
Furthermore, the key value of each frame of picture has uniqueness, and the key value of each frame of picture corresponds to a frame of picture pixel.
Compared with the prior art, the invention has the following beneficial effects:
by adding the picture analysis module to the existing opencv image splicing system or method, whether the imaging effect of the spliced panoramic picture is abnormal or not is found in time, and then the picture with poor imaging effect is processed in time or spliced for the second time, so that the effect of zero abnormity of the imaging effect of the panoramic picture is realized. And further, the imaging quality of the whole image splicing system or method flow is improved.
Drawings
FIG. 1 is a flow chart of the overall structure of an opencv-based image stitching system according to the present invention;
fig. 2 is a flowchart of an opencv-based image stitching method of the present invention.
Detailed Description
In order to facilitate understanding of those skilled in the art, the present invention will be further described with reference to the following examples and drawings, which are not intended to limit the present invention.
The frame picture is a picture at a certain moment when the camera acquires the image, namely the frame picture is a subset of the acquired image; the pixel points refer to a picture at a certain moment and are further decomposed into a plurality of pixel point pictures, and a set of the plurality of pixel points is a frame picture, namely the pixel points are a subset of the frame picture.
As shown in fig. 1, an opencv-based image stitching system includes: the image acquisition module is a multi-angle monitoring camera and is used for acquiring video images by rotating for multiple circles at different elevation angles and converting video streams into frame pictures by using OpenCV (open channel video coding scheme); the picture splitting module is used for splitting pixel points of each frame of picture; the image cache module is a picture storage server and is used for sending the key value of each frame of picture and the disassembled and bound frame picture pixel points to the picture storage server for caching; the image processing module is a picture data splicing processing engine and is used for acquiring cached images in the server; performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture; the picture analysis module is used for calling a picture analysis tool, detecting whether the imaging effect of the picture is abnormal or not by analyzing the relevant characteristics of the panoramic picture, sending the image to the panoramic picture storage module for storage if the imaging effect is normal, and calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to the image processing module for splicing and replacing abnormal frame picture pixel points if the imaging effect is abnormal; and the panoramic picture storage module stores the spliced panoramic picture into a distributed file system for calling specific applications.
The camera is 3 or more than 3, and 3 cameras set up in waiting 3 different planes in the photographic space. One camera is arranged in a horizontal plane, one camera is arranged in a vertical plane, and the other camera is arranged in the direction of a Z-axis plane; and due to the characteristic of multi-angle steering of the camera, the visual angle of an object to be photographed or any position in the space around the object is ensured. Meanwhile, the overlapped parts of the collected pictures of the cameras at different visual angles at the same moment are ensured, when a certain frame of picture is selected as a splicing background, if part of pixel points of the frame of picture are displayed in a fuzzy or backlight mode, the overlapped parts of other visual angles at the same moment can be used for replacing the picture, and the spliced panoramic image is ensured to be clearer and more complete.
As shown in fig. 2, an opencv-based image stitching method includes the steps of: acquiring a plurality of video images at the same visual angle through a camera, and converting the video stream into frame pictures by adopting OpenCV (open channel video coding); further disassembling each frame of picture into pixel points; the key value of each frame picture and the pixel point of the frame picture are disassembled and bound and then sent to a picture storage server for caching; performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture; calling a picture analysis tool, and detecting whether the picture imaging effect is abnormal or not by analyzing the relevant characteristics of the panoramic picture; if the imaging effect is normal, sending the image to a panoramic picture storage module for storage, and if the imaging effect is abnormal, calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to an image processing module for splicing and replacing the abnormal frame picture pixel points; and storing the spliced panoramic image into a distributed file system for subsequent viewing or calling of specific application.
And the picture storage server caches the directory structure and stores the directory structure in a queue form. The data structure form of the queue helps the image caching module to slow down the storage pressure, after the image processing module extracts the pictures which are firstly input into the queue, the cached data of the pictures are deleted, and then once the processed pictures are extracted, the cached data do not occupy the caching space of the picture storage server any more, and further the storage pressure of the image caching module is slowed down. Meanwhile, the data storage structure form of the queue protects the cached photos at the same time from disordering the splicing sequence for storage, so that the situation of wrong splicing is caused.
The key value of each frame of picture and the pixel point of the frame of picture are disassembled and bound and then sent to a picture storage server for caching; meanwhile, the key value of each frame of picture and the pixel point of the frame of picture need to be disassembled and bound and then sent to the standby picture storage server for storage. The standby picture storage server belongs to a permanent storage server, and when a picture analysis tool is called, before pictures with abnormal imaging effects are spliced again, pixels of the same frame pictures or frame pictures of other cameras stored at the moment need to be called to replace and splice the pictures, so that the panoramic pictures are clearer and more complete. Although the standby picture storage server belongs to a long-term storage server, in the embodiment, the directory structure of the standby picture storage server is stored in a queue manner, so that the manual deleting process is reduced, the storage space of the standby picture storage server is increased, the high-quality pictures can be stored in a full space within a certain time (within 1 month or half year), and the pictures exceeding the maximum storage time limit are automatically deleted.
The key value of each frame of picture has uniqueness, and the key value of each frame of picture corresponds to one frame of picture pixel point. And ensuring that the bound frame picture pixel points have unique attributes, so that after verification is facilitated, the fuzzy or backlight frame picture areas appear, the same frame picture pixel points of other cameras at the same moment are integrally called to replace the fuzzy or backlight frame picture pixel points, and secondary splicing is completed. And further, the imaging efficiency and quality of the verification and splicing panoramic pictures are improved.
Compared with the prior art, the invention has the following beneficial effects:
by adding the picture analysis module to the existing opencv image splicing system or method, whether the imaging effect of the spliced panoramic picture is abnormal or not is found in time, and then the picture with poor imaging effect is processed in time or spliced for the second time, so that the effect of zero abnormity of the imaging effect of the panoramic picture is realized. And further, the imaging quality of the whole image splicing system or method flow is improved.
The opencv-based image stitching system and method provided by the application are described in detail above. The description of the specific embodiments is only intended to facilitate an understanding of the methods of the present application and their core concepts. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (6)

1. An opencv-based image stitching system, comprising:
the image acquisition module is a multi-angle monitoring camera and is used for acquiring video images by rotating for multiple circles at different elevation angles and converting video streams into frame pictures by using OpenCV (open channel video coding scheme);
the picture splitting module is used for splitting pixel points of each frame of picture;
the image cache module is a picture storage server and is used for sending the key value of each frame of picture and the disassembled and bound frame picture pixel points to the picture storage server for caching;
the image processing module is a picture data splicing processing engine and is used for acquiring cached images in the server; performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture;
the picture analysis module is used for calling a picture analysis tool, detecting whether the imaging effect of the picture is abnormal or not by analyzing the relevant characteristics of the panoramic picture, sending the image to the panoramic picture storage module for storage if the imaging effect is normal, and calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to the image processing module for splicing and replacing abnormal frame picture pixel points if the imaging effect is abnormal;
and the panoramic picture storage module stores the spliced panoramic picture into a distributed file system for calling specific applications.
2. An opencv-based image splicing method is characterized by comprising the following steps:
acquiring a video image through a camera, and converting the video stream into frame pictures by adopting OpenCV;
further disassembling each frame of picture into pixel points;
the key value of each frame picture and the pixel point of the frame picture are disassembled and bound and then sent to a picture storage server for caching;
performing pixel point splicing on the acquired images based on an OpenCV panoramic video splicing algorithm to generate a panoramic picture;
calling a picture analysis tool, and detecting whether the picture imaging effect is abnormal or not by analyzing the relevant characteristics of the panoramic picture;
if the imaging effect is normal, sending the image to a panoramic picture storage module for storage, and if the imaging effect is abnormal, calling pixel points of frame pictures of other cameras at the same moment and sending the pixel points to an image processing module for splicing and replacing the abnormal frame picture pixel points;
and storing the spliced panoramic image into a distributed file system for subsequent viewing or calling of specific application.
3. The opencv-based image stitching system according to claim 1, wherein the number of the cameras is 3 or more than 3, and 3 cameras are arranged in 3 different planes in the space to be photographed.
4. The opencv-based image splicing method according to claim 2, wherein the cache directory structure of the image storage server is stored in a form of a queue.
5. The opencv-based image splicing method according to claim 4, wherein the key values of each frame of picture and the pixel points of the frame of picture are disassembled, bound and then sent to the picture storage server for caching; meanwhile, the key value of each frame of picture and the pixel point of the frame of picture need to be disassembled and bound and then sent to the standby picture storage server for storage.
6. The opencv-based image splicing method according to claim 5, wherein the key value of each frame of picture has uniqueness, and the key value of each frame of picture corresponds to a frame of picture pixel.
CN202111260032.1A 2021-10-28 2021-10-28 Opencv-based image splicing system and method Pending CN114007044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111260032.1A CN114007044A (en) 2021-10-28 2021-10-28 Opencv-based image splicing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111260032.1A CN114007044A (en) 2021-10-28 2021-10-28 Opencv-based image splicing system and method

Publications (1)

Publication Number Publication Date
CN114007044A true CN114007044A (en) 2022-02-01

Family

ID=79924421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111260032.1A Pending CN114007044A (en) 2021-10-28 2021-10-28 Opencv-based image splicing system and method

Country Status (1)

Country Link
CN (1) CN114007044A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802039A (en) * 2023-02-10 2023-03-14 天翼云科技有限公司 Interframe coding method and device, electronic equipment and computer readable medium
CN115861082A (en) * 2023-03-03 2023-03-28 无锡沐创集成电路设计有限公司 Low-delay picture splicing system and method
CN117150059A (en) * 2023-10-27 2023-12-01 湖南视觉伟业智能科技有限公司 Fragmented image data storage method based on NVR equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802039A (en) * 2023-02-10 2023-03-14 天翼云科技有限公司 Interframe coding method and device, electronic equipment and computer readable medium
CN115802039B (en) * 2023-02-10 2023-06-23 天翼云科技有限公司 Inter-frame coding method, inter-frame coding device, electronic equipment and computer readable medium
CN115861082A (en) * 2023-03-03 2023-03-28 无锡沐创集成电路设计有限公司 Low-delay picture splicing system and method
CN115861082B (en) * 2023-03-03 2023-04-28 无锡沐创集成电路设计有限公司 Low-delay picture splicing system and method
CN117150059A (en) * 2023-10-27 2023-12-01 湖南视觉伟业智能科技有限公司 Fragmented image data storage method based on NVR equipment
CN117150059B (en) * 2023-10-27 2024-02-13 湖南视觉伟业智能科技有限公司 Fragmented image data storage method based on NVR equipment

Similar Documents

Publication Publication Date Title
CN114007044A (en) Opencv-based image splicing system and method
CN109167924B (en) Video imaging method, system, device and storage medium based on hybrid camera
CN110705405B (en) Target labeling method and device
CN108737738B (en) Panoramic camera and exposure method and device thereof
CN109005334B (en) Imaging method, device, terminal and storage medium
CN111131698B (en) Image processing method and device, computer readable medium and electronic equipment
CN108337505B (en) Information acquisition method and device
EP4044579A1 (en) Main body detection method and apparatus, and electronic device and computer readable storage medium
CN112818947A (en) Test paper image processing method, test paper image processing device and computer readable storage medium
CN112770042B (en) Image processing method and device, computer readable medium, wireless communication terminal
CN109859104B (en) Method for generating picture by video, computer readable medium and conversion system
CN110349161B (en) Image segmentation method, image segmentation device, electronic equipment and storage medium
CN111382647B (en) Picture processing method, device, equipment and storage medium
CN108805799B (en) Panoramic image synthesis apparatus, panoramic image synthesis method, and computer-readable storage medium
US10198842B2 (en) Method of generating a synthetic image
CN113255516A (en) Living body detection method and device and electronic equipment
CN113439227A (en) Capturing and storing magnified images
CN113205011A (en) Image mask determining method and device, storage medium and electronic equipment
CN111126265A (en) Living body detection method, living body detection device, electronic apparatus, and medium
CN114945072A (en) Dual-camera frame synchronization processing method and device, user terminal and storage medium
CN113472998B (en) Image processing method, image processing device, electronic equipment and storage medium
CN113411543A (en) Multi-channel monitoring video fusion display method and system
CN113239931A (en) Logistics station license plate recognition method
CN112004054A (en) Multi-azimuth monitoring method, equipment and computer readable storage medium
CN112634460B (en) Outdoor panorama generation method and device based on Haar-like features

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