CN108668082A - A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing - Google Patents
A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN108668082A CN108668082A CN201810795981.1A CN201810795981A CN108668082A CN 108668082 A CN108668082 A CN 108668082A CN 201810795981 A CN201810795981 A CN 201810795981A CN 108668082 A CN108668082 A CN 108668082A
- Authority
- CN
- China
- Prior art keywords
- image
- visual point
- sampling window
- pan focus
- present
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Abstract
The present invention is suitable for field of computer technology, provides a kind of pan focus image generating method, computer equipment and computer, and this method obtains pending image;Extract multiple visual point images of the pending image;Each visual point image is handled based on interpolation algorithm, generates the sampled images with unidirectional integral image and omnidirectional's integral image;Obtain each depth plane of the sampled images;It determines the sampling window of each depth plane, and calculates the contrast of each sampling window;The extraction wherein highest sampling window of contrast results;Pan focus image is generated according to the highest sampling window of the contrast results and is exported.Implement the present invention, when being shot using single camera, can reach multifocal lens shooting effect, and influenced by external light source environment during shooting smaller, more object high-definition images can be obtained, improve the visual quality of image.
Description
Technical field
The invention belongs to field of computer technology more particularly to a kind of pan focus image generating method, computer equipment and
Computer readable storage medium.
Background technology
Single camera photographic equipment is a kind of common photographic equipment.Existing single-lens photographic equipment uses zoom
Camera lens can only focus on one object to the object of different distance, when the object of different distance needs the same clarity
Aperture can only be turned down, which can not shoot under low light conditions.Also, it is recorded using single camera shooting
In image, due to focusing part and that does not focus be partially contained in the identical visual field, to as in captured image
Other than specific region the case where fuzzy image.Especially powerful camera lens, depth of focus is more shallow, more easy tos produce such existing
As.Such as when with subjects such as the microscope photographing samples for having used high magnification object lens, due to the bumps etc. of sample, in image
In some region in focus, and do not focus in other regions, quilt can not be accurately captured according to image so as to generate
Take the photograph body it is whole as the case where.
It can be seen that using the image of single camera shooting record, there are given zones in captured image in the prior art
Other than domain the case where fuzzy image, and the problem of cannot obtain clearly image under low light conditions.
Invention content
The embodiment of the present invention provides a kind of pan focus image generating method, it is intended to solve single camera in the prior art and take the photograph
Shadow equipment is unable to reach multifocal shooting, and is easy to be influenced by external light source environment, and obtained more subject image quality are relatively low
The problem of.
The embodiment of the present invention is achieved in that a kind of pan focus image generating method, includes the following steps:
Obtain pending image;
Extract multiple visual point images of the pending image;
Each visual point image is handled based on interpolation algorithm, generates and is integrated with unidirectional integral image and omnidirectional
The sampled images of image;
Obtain each depth plane of the sampled images;
The sampling window of each depth plane is chosen, and calculates the contrast of each sampling window;
The extraction wherein highest sampling window of contrast results;
Pan focus image is generated according to the highest sampling window of the contrast results and is exported.
The embodiment of the present invention also provides a kind of computer equipment, including memory and processor, is stored in the memory
There is computer program, when the computer program is executed by the processor so that the processor executes above-mentioned pan focus figure
As each step of generation method.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored on the computer readable storage medium
There is computer program, when the computer program is executed by processor so that the processor executes above-mentioned pan focus image life
At each step of method.
Pan focus image generating method provided in an embodiment of the present invention, based on interpolation algorithm to being extracted from pending image
Multiple visual point images out are handled, and to keep the resolution quality of each visual point image, generate a high-resolution image
Plane-sampled images;By obtaining each depth plane of the sampled images, the sampling window of each depth plane is chosen, is counted
The contrast of each sampling window is calculated, and therefrom extracts the highest sampling window of contrast results, according to the contrast results
Highest sampling window generates each section image that one is included in the area of visual field of the camera lens all clearly pan focus figures relatively
Picture, and when being shot using single camera, multifocal lens shooting effect is can reach, and by ambient light during shooting
The influence of source environment is smaller, and more object high-definition images can be obtained, improve the visual quality of image.
Description of the drawings
Fig. 1 is the implementation flow chart for the pan focus image generating method that first embodiment of the invention provides;
Fig. 2 is visual point image extraction schematic diagram provided in an embodiment of the present invention;
Fig. 3 is the visual point image capture display mode schematic diagram of image to be extracted provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of pan focus video generation device provided in an embodiment of the present invention;
Fig. 5 (a) is the pending image that experimental example one of the present invention provides;
Fig. 5 (b) is the depth map generated according to Fig. 5 (a) that experimental example one of the present invention provides;
Fig. 5 (c) be experimental example one of the present invention provide according to the highest image of non-contrast focuses again in Fig. 5 (b) after
Obtained image;
Fig. 5 (d) be experimental example one of the present invention provide is focused again according to the highest image of contrast in Fig. 5 (b) after must
The image arrived;
Fig. 6 a are visual point image of the pending image of the offer of experimental example two of the present invention in different z values;
Fig. 6 b are focusing in the background of Fig. 6 a of providing of experimental example two of the present invention, the image obtained after focusing again;
Fig. 6 c are focusing in the foreground of Fig. 6 b of providing of experimental example two of the present invention, the image focused again;
Fig. 6 d1 be experimental example two of the present invention provide 7 multiply 7VPs and be absorbed in background and focus obtained image again;
Fig. 6 d2 be experimental example two of the present invention provide focus on obtained image at remote 100mm;
Fig. 6 d3 are the uses 5 that experimental example two of the present invention provides:5 VP (visual point image) concentrates on the obtained figure of background
Picture;
Fig. 6 d4 are focusing on of providing of experimental example two of the present invention apart from obtained image at 1 meter of microlens array.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The term used in embodiments of the present invention is the purpose only merely for description specific embodiment, is not intended to be limiting
The present invention.It is also intended to packet in the "an" and "the" of the embodiment of the present invention and singulative used in the attached claims
Most forms are included, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein is
Refer to and include one or more associated list items purposes any or all may combine.
Pan focus image generating method provided in an embodiment of the present invention, based on interpolation algorithm to being extracted from pending image
Multiple visual point images out are handled, and to keep the resolution quality of each visual point image, generate a high-resolution image
Plane-sampled images;By obtaining each depth plane of the sampled images, the sampling window of each depth plane is chosen, is counted
The contrast of each sampling window is calculated, and therefrom extracts the highest sampling window of contrast results, according to the contrast results
Highest sampling window generates each section image that one is included in the area of visual field of the camera lens all clearly pan focus figures relatively
Picture improves the relative articulation of each section of more subject images.
The technological means and effect taken for the predetermined goal of the invention of realization in order to which the present invention is further explained, below in conjunction with
Attached drawing and preferred embodiment, to specific implementation mode, structure, feature and its effect according to the present invention, detailed description are as follows.
Fig. 1 shows a kind of implementation process for pan focus image generating method that first embodiment of the invention provides, and is described in detail
It is as follows:
In step S101, pending image is obtained.
In embodiments of the present invention, user is obtained manually or the pending image that automatically enters of system, wherein pending
Image includes photographic image, digitized video etc..
In step s 102, multiple visual point images of the pending image are extracted.
In embodiments of the present invention, in conjunction with Fig. 2, for the sake of simplicity it is assumed that only having nine pixels under each lenticule.
The pixel of the same position indicated by different lenticules under model identical is used to form a visual point image.
In embodiments of the present invention, visual point image is that the light from specific direction projects low point on pending image
Resolution orthographic projection, as shown in figure 3, the unidirectional 3D integral images of a capture are shown in upper left side, the visual point image of 67 extractions
In a side for being shown in upper right side.In left side, we have the visual point image of comprehensive integral image and an extraction,
It is also shown in its side.
In step s 103, each visual point image is handled based on interpolation algorithm, generating has unidirectional integral
The sampled images of image and omnidirectional's integral image.
In embodiments of the present invention, each visual point image that above-mentioned steps S102 is extracted is carried out based on interpolation algorithm
Interpolation processing generates the sampled images with unidirectional integral image and omnidirectional's integral image, can be made up and be adopted by interpolation algorithm
With traditional visual point image extracting method extraction visual point image, there are the defects that resolution ratio reduces, and maintain point of pending image
Resolution.
In embodiments of the present invention, interpolation algorithm of the present invention can be roughly divided into four according to the mode of Image Acquisition
Main group:1. different points of view (multiple view analysis);2. different time (more time analyses);3. different sensors (multimode analysis)
And 4. model of place is registrated.In general, method for registering includes four steps:1) feature detects;2) characteristic matching;3) transformation model
Estimation;And 4) image resampling and transformation.By the present invention in that being enhanced with the image resolution ratio in wavelet field, improves and rebuild figure
The clarity of picture.It is related to up-sampling, displacement and the integration of point of observation in the process, it is flat only generates a high-resolution image
Face-sampled images.
In step S104, each depth plane of the sampled images is obtained.
In embodiments of the present invention, depth plane refers to the plan view for having Z axis depth, can be according to each depth of sampled images
Degree plane computations go out the focal length size of pending image, can be in same mirror in order to each object of different distance in pending image
It can clearly be photographed under head.
In embodiments of the present invention,
In step S105, the sampling window of each depth plane is determined, and calculate each sampling window
Contrast.
In embodiments of the present invention, in conjunction with Fig. 2, for example, certain pending image is divided into according to its picture depth
Multiple depth planes, and from each depth plane determine visual point image sampling window, and be based on existing picture contrast
Computational methods calculate the contrast of each sampling window.
In step s 106, the extraction wherein highest sampling window of contrast results.
In embodiments of the present invention, the highest sampling window of contrast result of calculation in extraction above-mentioned steps S105, and will
It is stored in new array.
In step s 107, pan focus image is generated according to the highest sampling window of the contrast results and exported.
In embodiments of the present invention, it is carried out again back to pending image using the sampling window being stored in new array
It focuses, and the position of image shift when using the processing of above-mentioned steps S103 institute is as parallax value generation pan focus image and defeated
Go out.
In embodiments of the present invention, can by check all depth planes and return have more high contrast and it is lower obscure
Region extract pan focus image.Different image shift values will be corresponding to different depth planes.Final total focus figure
As processing is handled by following formula.
F=arg { max { W (S) } } (2);
Wherein, H (S) n, m be high-definition picture as a result, and depth plane depends on carry digit (S), S=1,2, this
Shi Suoyou depth planes are stored in H (S) n, m, and window block () such as formula of their contrast value in W (S)
(3) shown in.The maximum value of selection W (S) is simultaneously stored in F, and therefore, this indicates the depth plane of object focus.It finally renders complete
The AF of window size () of the focus image with H (F) n, the m with relatively low fuzzy higher contrast, such as above formula (1) (2) institute
Show.
Pan focus image generating method provided in an embodiment of the present invention, based on interpolation algorithm to being extracted from pending image
Multiple visual point images out are handled, and to keep the resolution quality of each visual point image, generate a high-resolution image
Plane-sampled images;By obtaining each depth plane of the sampled images, the sampling window of each depth plane is chosen, is counted
The contrast of each sampling window is calculated, and therefrom extracts the highest sampling window of contrast results, according to the contrast results
Highest sampling window generates each section image that one is included in the area of visual field of the camera lens all clearly pan focus figures relatively
Picture, and when being shot using single camera, multifocal lens shooting effect is can reach, and by ambient light during shooting
The influence of source environment is smaller, and more object high-definition images can be obtained, improve the visual quality of image.
In the second embodiment of the present invention, before above-mentioned steps S102, including:Figure is carried out to the pending image
Image distortion corrects.
In embodiments of the present invention, the imaging process of object includes record and playback phase, in the record stage, by micro-
Lens array is to image objects, wherein the perspective 2D elements of each lenticule in microlens array from special angle captures object
Image.In playback phase, worked with the opposite way of pick-up, therefore, can be projected by microlens array EI with it is original
The identical depth of object's position optically rebuilds 3D objects.
Image fault refers to the difference of digital image and true shooting environmental.In general, the reason of causing image fault is substantially
Have;Image is distorted caused by the aberration of imaging system, distortion, bandwidth are limited etc.;Due to image device shooting posture and scan non-
Image geometry distortion caused by linear;Due to image fault caused by motion blur, radiation distortion, introducing noise etc..
In embodiments of the present invention, image distortion correction is carried out before extracting visual point image, can reduced as much as possible
The difference of original image and true shooting environmental so that identical positioning pixel can be correctly extracted at each EI, in order to
The follow-up accurate depth of field for calculating different points of view image.
In embodiments of the present invention, above-mentioned steps S103 is specifically included:
According to formula:It is right
Each visual point image up-sampled, is shifted and integration processing, wherein HijIt is with coordinate i, the product of the visual point image of j
Divide as a result, k, p are the call numbers of the visual point image from 1 to N, Δ is shift parameters, and V is the number of horizontal and vertical resolution ratio EI
Amount, each visual point image are multiplied by the up-sampling factor equal to camera lens number.
In embodiments of the present invention, interpolation calculation is carried out by the visual point image to extraction, can effectively kept pending
The resolution ratio of image, and the height of resolution ratio depends on the quantity of the quantity and viewpoint of lens, above-mentioned formula gives each micro-
Pixel quantity under lens.
In embodiments of the present invention, during generating unidirectional integral image, upper setting one is double in only the horizontal direction
Convex lens sheet is used to converge the light of the point light source from horizontal direction or transmits image to other optical systems.And in omnidirectional
In integral image, it is designed with lens in the horizontal direction and the vertical direction, for converging the point light source in multiple directions
Light transmits image to other optical systems.
In embodiments of the present invention, viewpoint interpolation calculation is carried out to all visual point images that extraction obtains, i.e., all
Visual point image both horizontally and vertically on by N number of digital up-sampled, to keep the resolution ratio of each visual point image.
In the third embodiment of the present invention, before above-mentioned steps S103, including step:Determine multiple viewpoint figures
The quantity of usable visual point image as in.
Above-mentioned steps S103, including:Each usable visual point image is handled based on interpolation algorithm, generates tool
There are the sampled images of unidirectional integral image and omnidirectional's integral image.
In embodiments of the present invention, the number of the usable visual point image currently extracted from pending image is determined
Amount, visual point image workable for selected section or whole, improves the efficiency of operation in workable visual point image.
In the fourth embodiment of the present invention, after above-mentioned steps S105, including step:According to the sampling window
Contrast result of calculation generates the depth map of image.
In embodiments of the present invention, raw according to the contrast results of the above-mentioned steps S105 each sampling windows being calculated
At the depth map with different images depth.
Above-mentioned steps S106 includes:Extract the highest sampling window of contrast results in the depth map.
In embodiments of the present invention, the highest sampling window of comparison degree result in general depth map, picture depth can
The number of colors that can occur is at most or the tonal gradation in gray level image is maximum, and the resolution ratio of image is higher, and image is more clear.
The resolution ratio for the pan focus image that pending image is focused and generated again according to the highest sampling window of contrast results is got over
Height, it is more clear.
Fig. 4 shows that a kind of pan focus video generation device provided in an embodiment of the present invention, the device include:
Pending image capturing unit 401, for obtaining pending image.
In embodiments of the present invention, pending image capturing unit 401 obtains user manually or system automatically enters
Pending image, wherein pending image includes photographic image, digitized video etc..
Visual point image extraction unit 402, multiple visual point images for extracting the pending image.
In embodiments of the present invention, in embodiments of the present invention, in conjunction with Fig. 2, first according to (...) by pending image
It is divided into multiple viewpoint panes ...
In embodiments of the present invention, visual point image is that the light from specific direction projects low point on pending image
Resolution orthographic projection, as shown in Figure 3 ...
Sampled images generation unit 403 is handled each visual point image for being based on interpolation algorithm, generates tool
There are the sampled images of unidirectional integral image and omnidirectional's integral image.
In embodiments of the present invention, sampled images generation unit 403 is based on interpolation algorithm to visual point image extraction unit 402
The each visual point image extracted carries out interpolation processing, generates the sample graph with unidirectional integral image and omnidirectional's integral image
Picture can be made up by interpolation algorithm and extract what visual point image was reduced there are resolution ratio using traditional visual point image extracting method
Defect maintains the resolution ratio of pending image.
In embodiments of the present invention, interpolation algorithm of the present invention can be roughly divided into four according to the mode of Image Acquisition
Main group:1. different points of view (multiple view analysis);2. different time (more time analyses);3. different sensors (multimode analysis)
And 4. model of place is registrated.In general, method for registering includes four steps:1) feature detects;2) characteristic matching;3) transformation model
Estimation;And 4) image resampling and transformation.By the present invention in that being enhanced with the image resolution ratio in wavelet field, improves and rebuild figure
The clarity of picture.It is related to up-sampling, displacement and the integration of point of observation in the process, it is flat only generates a high-resolution image
Face-sampled images.
Depth plane acquiring unit 404, each depth plane for obtaining the sampled images.
In embodiments of the present invention, depth plane refers to the plan view for having Z axis depth, can be according to each depth of sampled images
Degree plane computations go out the focal length size of pending image, can be in same mirror in order to each object of different distance in pending image
It can clearly be photographed under head.
In embodiments of the present invention,
Contrast computing unit 405, the sampling window for determining each depth plane, and calculate each described adopt
The contrast of sample window.
In embodiments of the present invention, in conjunction with Fig. 2, for example, contrast computing unit 405 by certain pending image according to its figure
As depth is divided into multiple depth planes, and the sampling window of visual point image is determined from each depth plane, based on existing
Some picture contrast computational methods calculate the contrast of each sampling window.
Sampling window extraction unit 406, for extracting the wherein highest sampling window of contrast results.
In embodiments of the present invention, sampling window extraction unit 406 is according to the 405 calculated comparison of contrast computing unit
Degree result of calculation extracts the highest sampling window of wherein contrast results, and stores it in new array.
Pan focus image generates output unit 407, complete for being generated according to the highest sampling window of the contrast results
Focus image simultaneously exports.
In embodiments of the present invention, pan focus image generates output unit 407 using the sample window being stored in new array
Generated image shift when mouthful being focused back to pending image, and being handled with sampled images generation unit 403 again
Position generate and pan focus image and export as parallax value.
In embodiments of the present invention, can by check all depth planes and return have more high contrast and it is lower obscure
Region extract pan focus image.Different image shift values will be corresponding to different depth planes.Final total focus figure
As processing is handled by following formula.
F=arg { max { W (S) } } (2);
Wherein, H (S) n, m be high-definition picture as a result, and depth plane depends on carry digit (S), S=1,2, this
Shi Suoyou depth planes are stored in H (S) n, m, and window block () such as formula of their contrast value in W (S)
(3) shown in.The maximum value of selection W (S) is simultaneously stored in F, and therefore, this indicates the depth plane of object focus.It finally renders complete
The AF of window size () of the focus image with H (F) n, the m with relatively low fuzzy higher contrast, such as above formula (1) (2) institute
Show.
Pan focus video generation device provided in an embodiment of the present invention, based on interpolation algorithm to being extracted from pending image
Multiple visual point images out are handled, and to keep the resolution quality of each visual point image, generate a high-resolution image
Plane-sampled images;By obtaining each depth plane of the sampled images, the sampling window of each depth plane is chosen, is counted
The contrast of each sampling window is calculated, and therefrom extracts the highest sampling window of contrast results, according to the contrast results
Highest sampling window generates each section image that one is included in the area of visual field of the camera lens all clearly pan focus figures relatively
Picture, and when being shot using single camera, multifocal lens shooting effect is can reach, and by ambient light during shooting
The influence of source environment is smaller, and more object high-definition images can be obtained, improve the visual quality of image..
In embodiments of the present invention, which further includes image distortion correction unit, for the pending image into
Row image distortion correction.
In embodiments of the present invention, the imaging process of object includes record and playback phase, in the record stage, by micro-
Lens array is to image objects, wherein the perspective 2D elements of each lenticule in microlens array from special angle captures object
Image.In playback phase, worked with the opposite way of pick-up, therefore, can be projected by microlens array EI with it is original
The identical depth of object's position optically rebuilds 3D objects.
Image fault refers to the difference of digital image and true shooting environmental.In general, the reason of causing image fault is substantially
Have;Image is distorted caused by the aberration of imaging system, distortion, bandwidth are limited etc.;Due to image device shooting posture and scan non-
Image geometry distortion caused by linear;Due to image fault caused by motion blur, radiation distortion, introducing noise etc..
In embodiments of the present invention, image distortion correction unit visual point image extraction unit 402 extract visual point image it
Preceding carry out image distortion correction, can reduce the difference of original image and true shooting environmental so that can be every as much as possible
Identical positioning pixel is correctly extracted under a EI, in order to the follow-up accurate depth of field for calculating different points of view image.
In embodiments of the present invention, above-mentioned sampled images generation unit 403 is particularly used in:
According to formula:It is right
Each visual point image up-sampled, is shifted and integration processing, wherein HijIt is with coordinate i, the product of the visual point image of j
Divide as a result, k, p are the call numbers of the visual point image from 1 to N, Δ is shift parameters, and V is the number of horizontal and vertical resolution ratio EI
Amount, each visual point image are multiplied by the up-sampling factor equal to camera lens number.
In embodiments of the present invention, interpolation calculation is carried out by the visual point image to extraction, can effectively kept pending
The resolution ratio of image, and the height of resolution ratio depends on the quantity of the quantity and viewpoint of lens, above-mentioned formula gives each micro-
Pixel quantity under lens.
In embodiments of the present invention, during generating unidirectional integral image, upper setting one is double in only the horizontal direction
Convex lens sheet is used to converge the light of the point light source from horizontal direction or transmits image to other optical systems.And in omnidirectional
In integral image, it is designed with lens in the horizontal direction and the vertical direction, for converging the point light source in multiple directions
Light transmits image to other optical systems.
In embodiments of the present invention, viewpoint interpolation calculation is carried out to all visual point images that extraction obtains, i.e., all
Visual point image both horizontally and vertically on by N number of digital up-sampled, to keep the resolution ratio of each visual point image.
In embodiments of the present invention, which further includes:Visual point image determination unit can be used, it is multiple described for determining
The quantity of usable visual point image in visual point image.
In embodiments of the present invention, sampled images generation unit 403 is specifically additionally operable to:Based on interpolation algorithm to each described
Usable visual point image is handled, and the sampled images with unidirectional integral image and omnidirectional's integral image are generated.
In embodiments of the present invention, the number of the usable visual point image currently extracted from pending image is determined
Amount, visual point image workable for selected section or whole, improves the efficiency of operation in workable visual point image.
In embodiments of the present invention, which further includes:Depth map generation unit, for according to the sampling window
Contrast result of calculation generates the depth map of image.
In embodiments of the present invention, depth map generation unit is respectively adopted according to what contrast computing unit 405 was calculated
The contrast results of sample window generate the depth map with different images depth.
In embodiments of the present invention, sampling window extraction unit 406 is additionally operable to:Extract contrast knot in the depth map
The highest sampling window of fruit.
In embodiments of the present invention, the highest sampling window of comparison degree result in general depth map, picture depth can
The number of colors that can occur is at most or the tonal gradation in gray level image is maximum, and the resolution ratio of image is higher, and image is more clear.
The resolution ratio for the pan focus image that pending image is focused and generated again according to the highest sampling window of contrast results is got over
Height, it is more clear.
The embodiment of the present invention provides a kind of computer equipment, including memory and processor, and calculating is stored in memory
Machine program, when computer program is executed by the processor so that processor executes each of above-mentioned pan focus image generating method
Step.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, is stored on computer readable storage medium
Computer program, when computer program is executed by processor so that processor executes each of above-mentioned pan focus image generating method
Step.
Illustratively, computer program can be divided into one or more modules, one or more module is stored
In memory, and by processor it executes, to complete the present invention.One or more modules can complete specific function
Series of computation machine program instruction section, the instruction segment is for describing implementation procedure of the computer program in computer installation.Example
Such as, the computer program can be divided into the step for the pan focus image generating method that above-mentioned each embodiment of the method provides
Suddenly.
It will be understood by those skilled in the art that the description of above computer device is only example, do not constitute to calculating
The restriction of machine device may include component more more or fewer than foregoing description, either combine certain components or different portions
Part, such as may include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng the processor is the control centre of the computer installation, utilizes various interfaces and the entire user terminal of connection
Various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by running or executing
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of computer installation.The memory can include mainly storing program area and storage data field, wherein storage program
It area can storage program area, the application program (such as sound-playing function, image player function etc.) needed at least one function
Deng;Storage data field can be stored uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.In addition,
Memory may include high-speed random access memory, can also include nonvolatile memory, such as hard disk, memory, grafting
Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card
(Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
If the integrated module/unit of the computer equipment is realized in the form of SFU software functional unit and as independent
Product is sold or in use, can be stored in a computer read/write memory medium.Based on this understanding, the present invention is real
All or part of flow in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program
At the computer program can be stored in a computer readable storage medium, which is being executed by processor
When, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, described
Computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The meter
Calculation machine readable medium may include:Can carry the computer program code any entity or device, recording medium, USB flash disk,
Mobile hard disk, magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory
Device (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..
In order to further illustrate beneficial effects of the present invention, it is described in detail below in conjunction with specific experimental example.
Experimental example one:
In conjunction with Fig. 5 (a), Fig. 5 (b), Fig. 5 (c) and Fig. 5 (d), wherein Fig. 5 (a) is pending image (raw video), figure
5 (b) is the corresponding depth map that Fig. 5 (a) is obtained after the method for the present invention is handled, and Fig. 5 (c) is according in depth map
The highest image of non-contrast focuses the pan focus image of generation again, and Fig. 5 (d) is according to contrast results in depth map
Highest image focuses pending image the pan focus image of generation again.
From Fig. 5 (c) and Fig. 5 (d) as can be seen that the clarity of Fig. 5 (c) is less than Fig. 5 (d), that is to say, that using the present invention
Method focuses pending image again, and the clarity of the pan focus image of generation is higher.
Experimental example two:Use experimental verification of the method for the present invention on unidirectional and omni-directional image
During the experiment, method using the present invention obtains certain pending image A, and provides pending image A not
With z values when visual point image (as shown in Figure 6 a).
The visual point image of 4 different depth planes is extracted from Fig. 6 a, then focus is placed in the background of Fig. 6 a, is obtained
Fig. 6 b (z=4.2 at this time);It is then focused into (z=0.71 at this time) in the foreground of Fig. 6 b, the image after being focused again is (such as
Shown in Fig. 6 c).
Fig. 6 d1 are 7 to multiply 7VPs and be absorbed in background and focus obtained image again;Fig. 6 d2 are to focus on remote 100mm
Locate obtained image;Fig. 6 d3 are to use 5:5 VP (visual point image) concentrates on the obtained image of background.Fig. 6 d4 are to focus
Apart from obtained image at 1 meter of microlens array.
The method of the present invention is used on unidirectional and omni-directional image from can be seen that in the graphical results of Fig. 6 a- Fig. 6 d4,
It has been successfully obtained improved image, that is, has proved that the method for the present invention has feasibility.Meanwhile it also demonstrating the method for the present invention and also can
Being successfully applied in extraction has special depth information image, generates clearly pan focus image.In addition, the method for the present invention can also be
Again improve the visual quality of image after focusing using interpolation method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement etc., should all be included in the protection scope of the present invention made by within refreshing and principle.
Claims (8)
1. a kind of pan focus image generating method, which is characterized in that include the following steps:
Obtain pending image;
Extract multiple visual point images of the pending image;
Each visual point image is handled based on interpolation algorithm, generating has unidirectional integral image and omnidirectional's integral image
Sampled images;
Obtain each depth plane of the sampled images;
It determines the sampling window of each depth plane, and calculates the contrast of each sampling window;
The extraction wherein highest sampling window of contrast results;
Pan focus image is generated according to the highest sampling window of the contrast results and is exported.
2. pan focus image generating method as described in claim 1, which is characterized in that the extraction pending image again
Before multiple visual point images, including:
Image distortion correction is carried out to the pending image.
3. pan focus image generating method as described in claim 1, which is characterized in that the interpolation algorithm that is based on is to each institute
It states visual point image to be handled, generates the sampled images with unidirectional integral image and omnidirectional's integral image, specifically include:
According to formula:P is to each institute
State visual point image up-sampled, shift and integration processing, wherein HijBe with coordinate i, the integral result of the visual point image of j,
K, p are the call numbers of the visual point image from 1 to N, and Δ is shift parameters, and V is the quantity of horizontal and vertical resolution ratio EI, is each regarded
Point image is multiplied by the up-sampling factor equal to camera lens number.
4. pan focus image generating method as described in claim 1, which is characterized in that in the interpolation algorithm that is based on to each
The visual point image is handled, before generating the sampled images with unidirectional integral image and omnidirectional's integral image, including:
Determine the quantity of the usable visual point image in multiple visual point images;
It is described that each visual point image is handled based on interpolation algorithm, it generates and is integrated with unidirectional integral image and omnidirectional
The sampled images of image, including:
Each usable visual point image is handled based on interpolation algorithm, generates and is accumulated with unidirectional integral image and omnidirectional
The sampled images of partial image.
5. pan focus image generating method as described in claim 1, which is characterized in that flat in each depth of the determination
The sampling window in face, and after calculating the contrast of each sampling window, including:
The depth map of image is generated according to the contrast result of calculation of the sampling window;
The extraction wherein highest sampling window of contrast results, including:
Extract the highest sampling window of contrast results in the depth map.
6. pan focus image generating method as described in claim 1, which is characterized in that the visual point image is from certain party
To light low resolution orthographic projection.
7. a kind of computer equipment, which is characterized in that including memory and processor, computer journey is stored in the memory
Sequence, when the computer program is executed by the processor so that the processor perform claim requires any one of 1 to 6 power
Profit requires the step of pan focus image generating method.
8. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, when the computer program is executed by processor so that the processor perform claim requires any one of 1 to 6 right
It is required that the step of pan focus image generating method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810795981.1A CN108668082A (en) | 2018-07-19 | 2018-07-19 | A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810795981.1A CN108668082A (en) | 2018-07-19 | 2018-07-19 | A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108668082A true CN108668082A (en) | 2018-10-16 |
Family
ID=63788556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810795981.1A Pending CN108668082A (en) | 2018-07-19 | 2018-07-19 | A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108668082A (en) |
-
2018
- 2018-07-19 CN CN201810795981.1A patent/CN108668082A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110428366B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
US10567666B2 (en) | Dual aperture zoom camera with video support and switching / non-switching dynamic control | |
JP6929047B2 (en) | Image processing equipment, information processing methods and programs | |
CN107925751B (en) | System and method for multiple views noise reduction and high dynamic range | |
US8229172B2 (en) | Algorithms for estimating precise and relative object distances in a scene | |
EP1924966B1 (en) | Adaptive exposure control | |
CN103826033B (en) | Image processing method, image processing equipment, image pick up equipment and storage medium | |
US8947501B2 (en) | Scene enhancements in off-center peripheral regions for nonlinear lens geometries | |
US9019426B2 (en) | Method of generating image data by an image device including a plurality of lenses and apparatus for generating image data | |
CN110149482A (en) | Focusing method, device, electronic equipment and computer readable storage medium | |
JP5725975B2 (en) | Imaging apparatus and imaging method | |
CN112822402B (en) | Image shooting method and device, electronic equipment and readable storage medium | |
Wu et al. | Geometry based three-dimensional image processing method for electronic cluster eye | |
CN103888663A (en) | Image processing apparatus, image pickup apparatus and image processing method | |
CN112651911A (en) | High dynamic range imaging generation method based on polarization image | |
JP4354096B2 (en) | Imaging device | |
JP5843599B2 (en) | Image processing apparatus, imaging apparatus, and method thereof | |
CN111932462B (en) | Training method and device for image degradation model, electronic equipment and storage medium | |
CN111127379B (en) | Rendering method of light field camera 2.0 and electronic equipment | |
Zhu et al. | Breaking the spatio-angular trade-off for light field super-resolution via lstm modelling on epipolar plane images | |
CN112203023B (en) | Billion pixel video generation method and device, equipment and medium | |
CN108668082A (en) | A kind of pan focus image generating method, computer equipment and readable storage medium storing program for executing | |
CN113592777A (en) | Image fusion method and device for double-shooting and electronic system | |
CN114584688B (en) | Method for photographing and processing digital panoramic image | |
KR102636767B1 (en) | Method for capturing and processing a digital panoramic image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181016 |