CN108259722A - Imaging method and device and electronic equipment - Google Patents

Imaging method and device and electronic equipment Download PDF

Info

Publication number
CN108259722A
CN108259722A CN201810161066.7A CN201810161066A CN108259722A CN 108259722 A CN108259722 A CN 108259722A CN 201810161066 A CN201810161066 A CN 201810161066A CN 108259722 A CN108259722 A CN 108259722A
Authority
CN
China
Prior art keywords
pixel
image
depth
module
camera
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
CN201810161066.7A
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.)
Xiamen Meitu Mobile Technology Co Ltd
Original Assignee
Xiamen Meitu Mobile 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 Xiamen Meitu Mobile Technology Co Ltd filed Critical Xiamen Meitu Mobile Technology Co Ltd
Priority to CN201810161066.7A priority Critical patent/CN108259722A/en
Publication of CN108259722A publication Critical patent/CN108259722A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention relates to the technical field of machine vision, in particular to an imaging method, an imaging device and electronic equipment. The imaging method is applied to electronic equipment provided with a structured light module and a double-camera module, and comprises the following steps: acquiring a first image acquired by a structured light module, and calculating depth-of-field data of each first pixel point in the first image to select the first pixel point of the depth-of-field data in the first image within a preset near-scene depth-of-field range as a first pixel point to be fused; obtaining a second image collected by the double-camera module, calculating the depth of field data of each second pixel point in the second image, and selecting the second pixel point of the depth of field data in the second image within a preset distant view depth range as a second pixel point to be fused; and fusing the first pixel point to be fused and the second pixel point to be fused to obtain a target image. Compared with the prior art, the imaging method, the imaging device and the electronic equipment can ensure better imaging effect.

Description

Imaging method, device and electronic equipment
Technical field
The present invention relates to technical field of machine vision, in particular to a kind of imaging method, device and electronic equipment.
Background technology
In Internet era, mobile phone has become one of highest tool of people's routine use frequency, the work(of taking pictures of mobile phone Can also increasingly it be paid attention to by everybody.In technical field of machine vision, the depth of field data of target scene can be accurately calculated, just The processing of image, optimal imaging effect, so as to simulate the optics special efficacy of various slr cameras can more effectively be carried out.It is but existing Have in technology, mobile phone can not often accurately calculate all depth of field data of target scene, for example, can not accurately calculate simultaneously Close shot depth of field data and distant view depth of field data in target scene, in this way, just can not rejuvenation target scene global three dimensions, So as to ensure the imaging effect of mobile phone photograph.
Invention content
In view of this, the purpose of the present invention is to provide a kind of imaging method, device and electronic equipment, to solve above-mentioned ask Topic.
An embodiment of the present invention provides a kind of imaging method, applied to being equipped with structure light module and double electronics for taking the photograph module Equipment, the method includes:
The first image of the structure light module acquisition is obtained, and calculates each first pixel in described first image Depth of field data, to select first pixel of the depth of field data in default close shot field depth in described first image, as First pixel to be fused;
Double second images taken the photograph module and acquired are obtained, and calculate the scape of each second pixel in second image Deep data, to select the second pixel of depth of field data in second image in default distant view field depth, as second Pixel to be fused;
Described first pixel to be fused and second pixel to be fused are merged, obtain target image.
Further, the structure light module includes light projector and the first camera, obtains the structure light module and adopts First image of collection, and the step of calculate the depth of field data of each first pixel in described first image, including:
The light projector is controlled to target scene projective structure light source, and first camera is controlled to acquire the knot The structure light image that structure light source projects generate after the target scene, as the first image;
The depth of field data of each first pixel in described first image is calculated according to principle of triangulation.
Further, double modules of taking the photograph include the first camera and second camera, obtain double modules of taking the photograph and acquire The second image, and the step of calculate the depth of field data of each second pixel in second image, including:
The image of the first camera acquisition target scene is controlled, as described in the first image to be synthesized and control Second camera acquires the image of the target scene, as the second image to be synthesized;
Described first image to be synthesized and second image to be synthesized are synthesized into second image;
The described first image to be synthesized and second image to be synthesized are compared, obtains each pixel in second image Depth of field data.
Further, first image to be synthesized and second image to be synthesized are compared, obtains second image In each pixel depth of field data the step of, including:
For each second pixel in second image, obtain in first image to be synthesized with second picture The 4th pixel corresponding with second pixel in the corresponding third pixel of vegetarian refreshments and second image to be synthesized Point;
Calculate the parallax value of the third pixel and the 4th pixel;
Obtain the focal length of first camera and the second camera and first camera and described second The centre-to-centre spacing of camera calculates the depth of field of second pixel according to the parallax value, the focal length and the centre-to-centre spacing Data.
Further, first camera be black and white camera, the second camera be colour imagery shot, the side Method further includes:
Described second image to be synthesized is parsed, obtains the color of each 4th pixel in second image to be synthesized Coloured silk value;
For each 5th pixel in the target image, determine in the described second image to be synthesized with the 5th picture Corresponding 4th pixel of vegetarian refreshments, and the color-values of the 4th pixel are obtained, assign the color-values to the 5th picture Vegetarian refreshments, to obtain colored target image.
Further, the electronic equipment is also equipped with the visible ray edge filter for blocking first camera And cutoff filter and position switching is carried out to the visible ray edge filter and the cutoff filter Switching construction, the method further include:
The current operation mode of the electronic equipment is judged;
If the current operation mode of the electronic equipment is structure light module drainage pattern, the switching construction pair is controlled The visible ray edge filter and the cutoff filter carry out position switching, so that the visible ray edge filter Block first camera;
If the current operation mode of the electronic equipment takes the photograph module drainage pattern to be double, the switching construction is controlled to institute It states visible ray edge filter and the cutoff filter carries out position switching, so that the infrared cut of light optical filter hides Keep off first camera.
Further, the close shot field depth is section (0,1), and unit is rice, and the distant view field depth is section [1 ,+∞), unit be rice or, the close shot field depth for section (0,1], unit is rice, and the distant view field depth is area Between (1 ,+∞), unit is rice.
The embodiment of the present invention additionally provides a kind of imaging device, applied to being equipped with structure light module and double electricity for taking the photograph module Sub- equipment, described device include:
First pixel acquisition module for obtaining the first image of the structure light module acquisition, and calculates described The depth of field data of each first pixel in first image, to select in described first image depth of field data in the default close shot depth of field In the range of the first pixel, as the first pixel to be fused;
Second pixel acquisition module described double takes the photograph the second image of module acquisition, and calculate described for obtaining The depth of field data of each second pixel in two images, to select in second image depth of field data in default distant view depth of field model The second pixel enclosed, as the second pixel to be fused;
Target image Fusion Module, for being carried out to the described first pixel to be fused and second pixel to be fused Fusion, obtains target image.
The embodiment of the present invention additionally provides a kind of electronic equipment, and the electronic equipment is equipped with structure light module and takes the photograph mould with double Group, the electronic equipment further include:
Memory;
Processor;And
Imaging device, the software function for being stored in the memory and being performed by the processor including one or more Module, the imaging device include:
First pixel acquisition module for obtaining the first image of the structure light module acquisition, and calculates described The depth of field data of each first pixel in first image, to select in described first image depth of field data in the default close shot depth of field In the range of the first pixel, as the first pixel to be fused;
Second pixel acquisition module described double takes the photograph the second image of module acquisition, and calculate described for obtaining The depth of field data of each second pixel in two images, to select in second image depth of field data in default distant view depth of field model The second pixel enclosed, as the second pixel to be fused;
Target image Fusion Module, for being carried out to the described first pixel to be fused and second pixel to be fused Fusion, obtains target image.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, the computer-readable recording medium storage There is instruction, when executed, realize above-mentioned imaging method.
Imaging method provided in an embodiment of the present invention, device and electronic equipment can be accurately calculated in target scene simultaneously Close shot depth of field data and distant view depth of field data, so as to select the first pixel in default close shot field depth, as One pixel to be fused and the second pixel in default distant view field depth is selected, as the second pixel to be fused, And the described first pixel to be fused and second pixel to be fused are merged, target image is obtained, relative to existing For having technology, it is capable of the global three dimensions of rejuvenation target scene, so as to ensure preferable imaging effect.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range, for those of ordinary skill in the art, without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the structure diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Fig. 2 is the schematic block diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Fig. 3 is a kind of flow diagram of imaging method provided in an embodiment of the present invention.
Fig. 4 is the schematic block diagram of a kind of imaging device provided in an embodiment of the present invention.
Icon:100- electronic equipments;110- structure light modules;120- is bis- to take the photograph module;131- light projectors;132- first takes the photograph As head;133- second cameras;140- imaging devices;141- the first pixel acquisition modules;The second pixels of 142- obtain mould Block;143- target image Fusion Modules;150- processors;160- memories.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be configured to arrange and design with a variety of different herein.Cause This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below Range, but it is merely representative of the selected embodiment of the present invention.Based on the embodiment of the present invention, those skilled in the art are not doing Go out all other embodiments obtained under the premise of creative work, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need to that it is further defined and explained in subsequent attached drawing.Meanwhile the present invention's In description unless specifically defined or limited otherwise, term " installation ", " setting ", " connection " should be interpreted broadly, for example, can To be to be fixedly connected or be detachably connected or be integrally connected;Can be mechanical connection or electrical connection;It can It to be to be connected directly, can also be indirectly connected by intermediary, can be the connection inside two elements.For this field For those of ordinary skill, the concrete meaning of above-mentioned term in the present invention can be understood with concrete condition.
Referring to Fig. 1, to be provided in an embodiment of the present invention a kind of using the imaging method and the electronic equipment 100 of device Structure diagram, the electronic equipment 100 can be that mobile phone, tablet etc. are portable can picture pick-up device.It is described in the present embodiment Electronic equipment 100 is equipped with structure light module 110 and takes the photograph module 120 with double, and the operating mode of the electronic equipment 100 includes structure Optical mode group drainage pattern takes the photograph module drainage pattern with double.As a kind of embodiment, the structure light module 110 includes light projection 131 and first camera 132 of device, double modules 120 of taking the photograph include the first camera 132 and second camera 133, wherein, institute Front or the back side that light projector 131, the first camera 132 and second camera 133 are set to the electronic equipment 100 are stated, And first camera 132 and the second camera 133 are respectively arranged at the both sides of the light projector 131.
Referring to Fig. 2, the schematic block diagram for electronic equipment 100 shown in Fig. 1, the electronic equipment 100 include into As device 140, processor 150 and memory 160.
It is directly or indirectly electrically connected between the processor 150 and memory 160, to realize the transmission of data or friendship Mutually, for example, these elements can realize electric connection by one or more communication bus or signal wire between each other.The imaging Device 140 can be stored in the memory 160 or be cured in the form of software or firmware (Firmware) including at least one Software module in the operating system (Operating System, OS) of the network equipment.The processor 150 is used to hold The executable module stored in line storage 160, for example, software function module and calculating included by the imaging device 140 Machine program etc..The processor 150 can perform the computer program after execute instruction is received.
Wherein, the processor 150 can be a kind of IC chip, have signal handling capacity.The processor 150 can also be general processor, for example, central processing unit (Central Processing Unit, CPU), network processing unit (Network Processing, NP) etc. can also be digital signal processor (DSP), application-specific integrated circuit (ASIC), scene Programmable gate array (FPGA), discrete gate or transistor logic, discrete hardware components, can realize or perform the present invention Disclosed each method, step and logic diagram in embodiment.In addition, general processor can be microprocessor or it is any often Advise processor etc..
The memory 160 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Memory 160 is for storing program, and the processor 150 performs described program after execute instruction is received, and the present invention is any The method performed by the electronic equipment 100 that defines of stream process that embodiment discloses can be applied in processor 150 or by Reason device 150 is realized.
It should be appreciated that structure shown in Fig. 2 is only to illustrate, the electronic equipment 100 can also have less than Fig. 2 or more More component or with the configuration different from shown in Fig. 2.In addition, each component shown in Fig. 2 can by software, hardware or A combination thereof is realized.
Referring to Fig. 3, Fig. 3 is a kind of flow diagram of imaging method provided in an embodiment of the present invention, the imaging side Method is applied to Fig. 1 and electronic equipment shown in Fig. 2 100.It should be noted that imaging method provided by the invention not with Fig. 3 and Particular order as shown below is limitation, and the idiographic flow and step of the imaging method are explained in detail below in conjunction with Fig. 3 It states.
Step S100, obtains the first image of structure light module acquisition, and calculates each the in described first image The depth of field data of one pixel, to select first picture of the depth of field data in default close shot field depth in described first image Vegetarian refreshments, as the first pixel to be fused.
In the present embodiment, the structure light module includes light projector and the first camera, the work of the electronic equipment Pattern includes structure light module drainage pattern.When receiving photographing command, the electronic equipment can be controlled with structure optical mode Group drainage pattern work, to control the light projector to target scene projective structure light source, and controls first camera It acquires the structure light source and is incident upon the structure light image generated after the target scene, as the first image.Wherein, the light The projector is infrared light projector, and the structure light source can be structure light, line-structured light or area-structure light, the present embodiment pair This is not specifically limited.
After described first image is obtained, in the present embodiment, first figure can be calculated according to principle of triangulation The depth of field data of each first pixel as in, that is, the center according to the known light projector and first camera Away from and the structure light source crevice projection angle obtain described first image in each first pixel depth of field data.
In the present embodiment, the electronic equipment for mobile phone, tablet etc. it is portable can picture pick-up device, structure is more compact, Therefore, the light projector and the setting of the centre-to-centre spacing of first camera more limit so that distance institute in target scene Stating the object image information of electronic equipment farther out can not be accurately identified, specifically, through inventor the study found that in target scene Object image information other than 1 meter of the electronic equipment just can not be accurately identified.Based on this, in the present embodiment, counting In calculating described first image after the depth of field data of each first pixel, it will also select depth of field data in described first image and exist The first pixel in default close shot field depth, as the first pixel to be fused.In the present embodiment, the close shot depth of field model Enclose for section (0,1), unit be rice or, the close shot field depth for section (0,1], unit is rice.
Step S200 obtains double second images taken the photograph module and acquired, and calculates each second in second image The depth of field data of pixel, to select the second pixel of depth of field data in second image in default distant view field depth Point, as the second pixel to be fused.
In the present embodiment, double modules of taking the photograph include the first camera and second camera, the work of the electronic equipment Pattern, which further includes, double takes the photograph module drainage pattern.When receiving photographing command, double drainage patterns of taking the photograph can be controlled to work, with The image of the first camera acquisition target scene is controlled, as second camera shooting of the first image to be synthesized and control Head acquires the image of the target scene, as the second image to be synthesized, hereafter, by the described first image to be synthesized and described the Two images to be synthesized synthesize second image.It should be noted that when receiving photographing command, the electronic equipment can It is worked with elder generation with structure light drainage pattern, then the work of module drainage pattern is taken the photograph with double, first can also take the photograph drainage pattern work with double, It is worked again with structure light drainage pattern, the present embodiment is not specifically limited this.
Further, by comparing the described first image to be synthesized and second image to be synthesized, you can obtain described The depth of field data of each pixel in second image.As a kind of embodiment, for each second pixel in second image Point obtains in first image to be synthesized third pixel corresponding with second pixel and described second waits to close The 4th pixel corresponding with second pixel into image, then, calculates the third pixel and the described 4th The parallax value of pixel, and obtain the focal length of first camera and the second camera and first camera With the centre-to-centre spacing of the second camera, described second is calculated further according to the parallax value, the focal length and the centre-to-centre spacing The depth of field data of pixel.
Install it is described it is double take the photograph module when, if the centre-to-centre spacing of first camera and the second camera is too small, mesh The object distance for the arguement that can haggle in scene is marked with regard to close, if wanting to calculate farther distance, must just increase first camera shooting Head and the centre-to-centre spacing of the second camera, but when the centre-to-centre spacing of first camera and the second camera is excessive, by In first camera and the second camera angle of visibility the problem of, it can cause electronic equipment described in distance in target scene The depth of field data of nearer subject image can not be calculated accurately, specifically, through inventor the study found that distance in target scene The depth of field data of subject image within 1 meter of the electronic equipment just can not be calculated accurately.Based on this, in the present embodiment, It calculates in second image after the depth of field data of each second pixel, will also select depth of field data in second image In the second pixel of default distant view field depth, as the second pixel to be fused.In the present embodiment, the close shot depth of field model Enclose for section (0,1), when unit is rice, the distant view field depth for section [1 ,+∞), unit is rice, the close shot depth of field Ranging from section (0,1], unit be rice when, the distant view field depth for section [1 ,+∞), unit is rice.
Step S300 merges the described first pixel to be fused and second pixel to be fused, obtains mesh Logo image.
By upper, by structure light module and double mutual cooperations for taking the photograph module, can accurately calculate in target scene simultaneously Close shot depth of field data and distant view depth of field data, so as to select the first pixel in default close shot field depth, as One pixel to be fused and the second pixel in default distant view field depth is selected, as the second pixel to be fused, The described first pixel to be fused and second pixel to be fused are merged as a result, obtained target image is Complete depth image, thus, the target image has preferable imaging effect, can give the preferable visual experience of user.
Optionally, in the present embodiment, first camera is black and white camera, and the second camera is imaged to be colored Head further, to obtain colored target image, in the present embodiment, will also parse the described second image to be synthesized, The color-values of each 4th pixel in the described second image to be synthesized are obtained, hereafter, for each 5th in the target image Pixel determines the 4th pixel corresponding with the 5th pixel in the described second image to be synthesized, and obtains described The color-values of four pixels assign the color-values to the 5th pixel, to obtain colored target image.
In order to further enhance the imaging effect of the target image, optionally, in the present embodiment, the electronic equipment Be also equipped with visible ray edge filter for blocking first camera and cutoff filter and to it is described can See that light edge filter and the cutoff filter carry out the switching construction of position switching.When receiving photographing command, First, the current operation mode of the electronic equipment is judged, if the current operation mode of the electronic equipment is structure Optical mode group drainage pattern, then control the switching construction to the visible ray edge filter and the cutoff filter into Line position puts switching, so that the visible ray edge filter blocks first camera, if the current work of the electronic equipment Operation mode takes the photograph module drainage pattern to be double, then controls the switching construction to the visible ray edge filter and infrared section described Only optical filter carries out position switching, so that the infrared cut of light optical filter blocks first camera.
In this way, when the electronic equipment is worked with structure light module drainage pattern, can be cut by the visible ray Only optical filter filters out visible ray, only retains infrared light, and visible ray is avoided to be generated when the structure light module acquires the first image Interference, equally, the electronic equipment with it is double take the photograph module drainage pattern work when, the IR cut filter can be passed through Piece filters out infrared light, only retains visible ray, visible infrared is avoided to be generated when taking the photograph module the second image of acquisition for described pair dry It disturbs, enhances the imaging effect of the target image as a result,.
Referring to Fig. 4, the embodiment of the present invention additionally provides a kind of imaging device 140, applied to Fig. 1 and electricity shown in Fig. 2 Sub- equipment 100, the imaging device 140 include the first pixel acquisition module 141, the second pixel acquisition module 142 and mesh Logo image Fusion Module 143.
The first pixel acquisition module 141 is used to obtain the first image of the structure light module acquisition, and calculates Go out the depth of field data of each first pixel in described first image, preset closely with selecting depth of field data in described first image The first pixel in scape field depth, as the first pixel to be fused.About the first pixel acquisition module 141 Description specifically refers to the detailed description to the step S100 shown in Fig. 3, that is, step S100 can be by first pixel Point acquisition module 141 performs.
The second pixel acquisition module 142 is used to obtain double second images taken the photograph module and acquired, and calculate The depth of field data of each second pixel in second image, to select in second image depth of field data in default distant view Second pixel of field depth, as the second pixel to be fused.The description as described in the second pixel acquisition module 142 The detailed description to the step S200 shown in Fig. 3 is specifically referred to, that is, step S200 can be obtained by second pixel Modulus block 142 performs.
The target image Fusion Module 143 is used for the described first pixel to be fused and second pixel to be fused Point is merged, and obtains target image.Institute during the description as described in the target image Fusion Module 143 is specifically referred to Fig. 3 The detailed description of step S300 shown, that is, step S300 can be performed by the target image Fusion Module 143.
In conclusion imaging method provided in an embodiment of the present invention, device and electronic equipment can accurately calculate simultaneously The close shot depth of field data of target scene and distant view depth of field data, so as to select the first pixel in default close shot field depth Point as the first pixel to be fused and selects the second pixel in default distant view field depth, waits to melt as second Pixel is closed, and the described first pixel to be fused and second pixel to be fused are merged, obtains target image, In terms of existing technologies, it is capable of the global three dimensions of rejuvenation target scene, so as to ensure preferable imaging effect.
In embodiment provided herein, it should be understood that disclosed device and method, it can also be by other Mode realize.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are shown Architectural framework in the cards, function and the behaviour of devices in accordance with embodiments of the present invention, method and computer program product Make.In this regard, each box in flow chart or block diagram can represent a part for a module, program segment or code, institute The part for stating module, program segment or code includes the executable instruction that one or more is used to implement defined logic function. It should also be noted that at some as in the realization method replaced, the function that is marked in box can also be to be different from attached drawing The sequence marked occurs.For example, two continuous boxes can essentially perform substantially in parallel, they sometimes can also be by Opposite sequence performs, this is depended on the functions involved.It is also noted that each box in block diagram and/or flow chart, And the combination of the box in block diagram and/or flow chart, function as defined in performing or the dedicated of action can be used to be based on hardware System realize or can be realized with the combination of specialized hardware and computer instruction.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is independent product sale or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be People's computer, server or electronic equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention. And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.It needs Illustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation with Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities The relationship or sequence on border.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or equipment including a series of elements not only include those elements, and And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or equipment institute Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute State in process, method, article or the equipment of element that also there are other identical elements.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, that is made any repaiies Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exists Similar terms are represented in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing It is further defined and is explained.

Claims (10)

1. a kind of imaging method, which is characterized in that described applied to being equipped with structure light module and double electronic equipments for taking the photograph module Method includes:
The first image of the structure light module acquisition is obtained, and calculates the depth of field of each first pixel in described first image Data, to select first pixel of the depth of field data in default close shot field depth in described first image, as first Pixel to be fused;
Double second images taken the photograph module and acquired are obtained, and calculate the depth of field number of each second pixel in second image According to select the second pixel of depth of field data in second image in default distant view field depth, waiting to melt as second Close pixel;
Described first pixel to be fused and second pixel to be fused are merged, obtain target image.
2. imaging method according to claim 1, which is characterized in that the structure light module includes light projector and first Camera, obtains the first image of the structure light module acquisition, and calculates each first pixel in described first image The step of depth of field data, including:
The light projector is controlled to target scene projective structure light source, and first camera is controlled to acquire the structure light Source is incident upon the structure light image generated after the target scene, as the first image;
The depth of field data of each first pixel in described first image is calculated according to principle of triangulation.
3. imaging method according to claim 1, which is characterized in that double modules of taking the photograph include the first camera and second Camera obtains double second images taken the photograph module and acquired, and calculates the scape of each second pixel in second image The step of deep data, including:
The image of the first camera acquisition target scene is controlled, as the first image to be synthesized and control described second Camera acquires the image of the target scene, as the second image to be synthesized;
Described first image to be synthesized and second image to be synthesized are synthesized into second image;
The described first image to be synthesized and second image to be synthesized are compared, obtains the scape of each pixel in second image Deep data.
4. imaging method according to claim 3, which is characterized in that comparison first image to be synthesized and described second Image to be synthesized, the step of obtaining the depth of field data of each pixel in second image, including:
For each second pixel in second image, obtain in first image to be synthesized with second pixel The 4th pixel corresponding with second pixel in corresponding third pixel and second image to be synthesized;
Calculate the parallax value of the third pixel and the 4th pixel;
The focal length and first camera for obtaining first camera and the second camera are imaged with described second The centre-to-centre spacing of head calculates the depth of field data of second pixel according to the parallax value, the focal length and the centre-to-centre spacing.
5. imaging method according to claim 3, which is characterized in that first camera is black and white camera, described Second camera is colour imagery shot, and the method further includes:
Described second image to be synthesized is parsed, obtains the color of each 4th pixel in second image to be synthesized Value;
For each 5th pixel in the target image, determine in the described second image to be synthesized with the 5th pixel Corresponding 4th pixel, and the color-values of the 4th pixel are obtained, assign the color-values to the 5th pixel, To obtain colored target image.
6. the imaging method according to Claims 2 or 3, which is characterized in that the electronic equipment is also equipped with blocking The visible ray edge filter and cutoff filter of first camera and to the visible ray edge filter and The cutoff filter carries out the switching construction of position switching, and the method further includes:
The current operation mode of the electronic equipment is judged;
If the current operation mode of the electronic equipment is structure light module drainage pattern, the switching construction is controlled to described Visible ray edge filter and the cutoff filter carry out position switching, so that the visible ray edge filter blocks First camera;
If the current operation mode of the electronic equipment takes the photograph module drainage pattern to be double, control the switching construction to it is described can See that light edge filter and the cutoff filter carry out position switching, so that the infrared cut of light optical filter blocks institute State the first camera.
7. imaging method according to claim 1, which is characterized in that the close shot field depth be section (0,1), unit For rice, the distant view field depth for section [1 ,+∞), unit be rice or, the close shot field depth for section (0,1], it is single Position is rice, and the distant view field depth is section (1 ,+∞), and unit is rice.
8. a kind of imaging device, which is characterized in that described applied to being equipped with structure light module and double electronic equipments for taking the photograph module Device includes:
First pixel acquisition module for obtaining the first image of the structure light module acquisition, and calculates described first The depth of field data of each first pixel in image, to select in described first image depth of field data in default close shot field depth The first interior pixel, as the first pixel to be fused;
Second pixel acquisition module for obtaining double second images taken the photograph module and acquired, and calculates second figure The depth of field data of each second pixel as in is presetting distant view field depth to select depth of field data in second image Second pixel, as the second pixel to be fused;
Target image Fusion Module, for melting to the described first pixel to be fused and second pixel to be fused It closes, obtains target image.
9. a kind of electronic equipment, which is characterized in that the electronic equipment is equipped with structure light module and takes the photograph module, the electronics with double Equipment further includes:
Memory;
Processor;And
Imaging device is stored in including one or more in the memory and by the processor
The software function module of execution, the imaging device include:
First pixel acquisition module for obtaining the first image of the structure light module acquisition, and calculates described first The depth of field data of each first pixel in image, to select in described first image depth of field data in default close shot field depth The first interior pixel, as the first pixel to be fused;
Second pixel acquisition module for obtaining double second images taken the photograph module and acquired, and calculates second figure The depth of field data of each second pixel as in is presetting distant view field depth to select depth of field data in second image Second pixel, as the second pixel to be fused;
Target image Fusion Module, for melting to the described first pixel to be fused and second pixel to be fused It closes, obtains target image.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has instruction, when Described instruction is performed, and realizes the imaging method described in claim 1-7 any one.
CN201810161066.7A 2018-02-27 2018-02-27 Imaging method and device and electronic equipment Pending CN108259722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810161066.7A CN108259722A (en) 2018-02-27 2018-02-27 Imaging method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810161066.7A CN108259722A (en) 2018-02-27 2018-02-27 Imaging method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN108259722A true CN108259722A (en) 2018-07-06

Family

ID=62745522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810161066.7A Pending CN108259722A (en) 2018-02-27 2018-02-27 Imaging method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108259722A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110441784A (en) * 2019-08-27 2019-11-12 浙江舜宇光学有限公司 Depth image imaging system and method
CN112101338A (en) * 2018-08-14 2020-12-18 成都佳诚弘毅科技股份有限公司 Image restoration method based on VIN image acquisition device
CN113220917A (en) * 2020-02-06 2021-08-06 阿里巴巴集团控股有限公司 Background map recommendation method, device and storage medium
CN113362381A (en) * 2020-03-03 2021-09-07 RealMe重庆移动通信有限公司 Image processing method and device, readable medium and communication terminal
CN114073063A (en) * 2020-05-27 2022-02-18 北京小米移动软件有限公司南京分公司 Image processing method and device, camera assembly, electronic equipment and storage medium
CN115174774A (en) * 2022-06-29 2022-10-11 上海飞机制造有限公司 Depth image compression method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370951A (en) * 2017-08-09 2017-11-21 广东欧珀移动通信有限公司 Image processing system and method
CN107395974A (en) * 2017-08-09 2017-11-24 广东欧珀移动通信有限公司 Image processing system and method
CN107493411A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Image processing system and method
CN107493428A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Filming control method and device
CN107493412A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Image processing system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370951A (en) * 2017-08-09 2017-11-21 广东欧珀移动通信有限公司 Image processing system and method
CN107395974A (en) * 2017-08-09 2017-11-24 广东欧珀移动通信有限公司 Image processing system and method
CN107493411A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Image processing system and method
CN107493428A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Filming control method and device
CN107493412A (en) * 2017-08-09 2017-12-19 广东欧珀移动通信有限公司 Image processing system and method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112101338A (en) * 2018-08-14 2020-12-18 成都佳诚弘毅科技股份有限公司 Image restoration method based on VIN image acquisition device
CN110441784A (en) * 2019-08-27 2019-11-12 浙江舜宇光学有限公司 Depth image imaging system and method
CN113220917A (en) * 2020-02-06 2021-08-06 阿里巴巴集团控股有限公司 Background map recommendation method, device and storage medium
CN113220917B (en) * 2020-02-06 2022-04-12 阿里巴巴集团控股有限公司 Background map recommendation method, device and storage medium
CN113362381A (en) * 2020-03-03 2021-09-07 RealMe重庆移动通信有限公司 Image processing method and device, readable medium and communication terminal
CN113362381B (en) * 2020-03-03 2023-02-17 RealMe重庆移动通信有限公司 Image processing method and device, readable medium and communication terminal
CN114073063A (en) * 2020-05-27 2022-02-18 北京小米移动软件有限公司南京分公司 Image processing method and device, camera assembly, electronic equipment and storage medium
CN114073063B (en) * 2020-05-27 2024-02-13 北京小米移动软件有限公司南京分公司 Image processing method and device, camera assembly, electronic equipment and storage medium
CN115174774A (en) * 2022-06-29 2022-10-11 上海飞机制造有限公司 Depth image compression method, device, equipment and storage medium
CN115174774B (en) * 2022-06-29 2024-01-26 上海飞机制造有限公司 Depth image compression method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108259722A (en) Imaging method and device and electronic equipment
CN109064545B (en) Method and device for data acquisition and model generation of house
US9253390B2 (en) Image processing device, image capturing device, image processing method, and computer readable medium for setting a combination parameter for combining a plurality of image data
CN102843509B (en) Image processing device and image processing method
US11010979B2 (en) Overlay for camera field of vision
CN104363377B (en) Display methods, device and the terminal of focus frame
JP6860433B2 (en) Processing equipment, processing systems, methods and programs
JP2014197824A (en) Image processing apparatus, image capturing apparatus, image processing method, and program
EP2991027B1 (en) Image processing program, image processing method and information terminal
KR20170106325A (en) Method and apparatus for multiple technology depth map acquisition and fusion
CN103188434B (en) Method and device of image collection
KR20140004592A (en) Image blur based on 3d depth information
CN109040596B (en) Method for adjusting camera, mobile terminal and storage medium
WO2020103604A1 (en) Method and device for photographing, terminal, and computer-readable storage medium
CN107945105A (en) Background blurring processing method, device and equipment
CN110213491B (en) Focusing method, device and storage medium
US20190253593A1 (en) Photographing Method for Terminal and Terminal
CN107690673A (en) Image processing method and device and server
CN103916659B (en) For the visual system and method for field depth
CN107622497B (en) Image cropping method and device, computer readable storage medium and computer equipment
CN108776800B (en) Image processing method, mobile terminal and computer readable storage medium
CN105262948A (en) Panorama capturing method and mobile terminal
CN103402058A (en) Shot image processing method and device
CN114788254A (en) Auxiliary focusing method, device and system
JP7013144B2 (en) Image processing equipment, image processing methods and programs

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180706

RJ01 Rejection of invention patent application after publication