Summary of the invention
In view of this, the present invention provides the image processing method of a kind of image acquiring device and its combined type, it can be simultaneously
Take into account the quality of output image and the light and thin degree of image acquiring device.
The present invention proposes a kind of image processing method of the combined type of image acquiring device, be suitable for the first camera lens and
The image acquiring device of second camera lens, the method include the following steps.Firstly, obtaining one using the first camera lens and the second camera lens
The image of scape, to generate the black white image and color image of this scene respectively.Then, according to the content of above-mentioned scene, dynamic
Ground select main black white image mode, main color image model and pure color processing mode one of those, generate output accordingly
Image, wherein main black white image mode is the mould that the information of color image is fused to black white image to generate output image
Formula, main color image model are the mode that the information of black white image is fused to color image to generate output image, pure coloured silk
Color tupe is the mode merely with color image to generate output image.
In one embodiment of this invention, the above-mentioned content according to scene is dynamically selected main black white image mode, main coloured silk
One of those step of color image model and pure color processing mode includes being obtained according to black white image and color image
The depth bounds and change in depth degree of above-mentioned scene, further according to one of depth bounds and change in depth degree at least,
Be dynamically selected main black white image mode, main color image model and pure color processing mode one of those.
In one embodiment of this invention, above-mentioned one according to depth bounds and change in depth degree at least, dynamic
Ground select main black white image mode, main color image model and pure color processing mode one of those step include first sentence
Whether whether disconnected depth bounds be greater than range gate threshold value or change in depth degree less than the first change in depth degree threshold value.When
When depth bounds are greater than range gate threshold value or change in depth degree less than the first change in depth degree threshold value, main black and white is selected
Image model.When depth bounds are no more than range gate threshold value and change in depth degree is not less than the first change in depth degree threshold
When value, change in depth degree is judged whether less than the second change in depth degree threshold value, wherein the second change in depth degree threshold
Value is greater than the first change in depth degree threshold value.When change in depth degree is less than the second change in depth degree threshold value, selection
Main color image model.When change in depth degree is not less than the second change in depth degree threshold value, pure color processing mould is selected
Formula.
In one embodiment of this invention, the above-mentioned the step of information of color image is fused to black white image include first from
Search for associated with the pixel of black white image multiple correlated color pixels in color image, then by the correlated color pixel
The information of information and the pixel of black white image carries out fusion treatment.
In one embodiment of this invention, the above-mentioned the step of information of black white image is fused to color image include first from
Search and the pixel of color image associated multiple related monochrome pixels in black white image, then by the correlation monochrome pixels
The information of information and the pixel of color image carries out fusion treatment.
The present invention separately proposes a kind of image acquiring device, including the first camera lens, the second camera lens, storage unit and one or more
A processing unit.Storage unit couples the first camera lens and the second camera lens, is obtained to store the first camera lens and the second camera lens
The image taken.Processing unit couples the first camera lens, the second camera lens and storage unit, and including multiple modules, wherein described
Module includes image collection module, mode selection module and image processing module.Image collection module is to utilize the first mirror
Head and the second camera lens obtain the image of a scene, to generate the black white image and color image of above-mentioned scene respectively.Mode
Selecting module is to the content according to above-mentioned scene, dynamically autonomous black white image mode, main color image model and pure coloured silk
Color tupe selects one of those.Image processing module is to generate defeated according to the selected mode of mode selection module
Image out, wherein main black white image mode is the mould that the information of color image is fused to black white image to generate output image
Formula, main color image model are the mode that the information of black white image is fused to color image to generate output image, pure coloured silk
Color tupe is the mode merely with color image to generate output image.
In one embodiment of this invention, mode selection module obtains above-mentioned field according to black white image and color image
The depth bounds and change in depth degree of scape, and one according to depth bounds and change in depth degree at least, dynamic
Ground select main black white image mode, main color image model and pure color processing mode one of those.
In one embodiment of this invention, mode selection module judges whether depth bounds are greater than range gate threshold value or depth
Whether variation degree is spent less than the first change in depth degree threshold value.When depth bounds are greater than range gate threshold value or change in depth
When degree is less than the first change in depth degree threshold value, mode selection module selects main black white image mode.When depth bounds not
Greater than range gate threshold value and when change in depth degree is not less than the first change in depth degree threshold value, mode selection module judgement
Whether change in depth degree is less than the second change in depth degree threshold value, wherein the second change in depth degree threshold value is greater than first
Change in depth degree threshold value.When change in depth degree is less than the second change in depth degree threshold value, mode selection module choosing
Select main color image model.When change in depth degree is not less than the second change in depth degree threshold value, mode selection module choosing
Select pure color processing mode.
In one embodiment of this invention, when mode selection module selects main black white image mode, image processing module
Search for associated with the pixel of black white image multiple correlated color pixels from color image, and by the correlated color picture
The information of the pixel of the information and black white image of element carries out fusion treatment.
In one embodiment of this invention, when mode selection module selects main color image model, image processing module
Search and the associated multiple related monochrome pixels of the pixel of color image from black white image, and by the correlation black and white picture
The information of the pixel of the information and color image of element carries out fusion treatment.
Based on the image processing method of above-mentioned, proposed by the invention image acquiring device and its combined type, utilize double
Camera lens to obtain the black white image and color image of a scene simultaneously, and dynamically switched to according to image information lead it is black
White image mode, main color image model or pure color processing mode are to generate output image.The present invention passes through black white image
And the advantage under color image difference photographed scene, adaptively switch to the image procossing mould for meeting the photographed scene
Formula, can be under the premise of taking into account the light and thin degree of image acquiring device, it is ensured that the output quality of image.
To make the foregoing features and advantages of the present invention clearer and more comprehensible, special embodiment below, and it is detailed to cooperate attached drawing to make
Carefully it is described as follows.
Specific embodiment
Next part embodiment of the invention will cooperate attached drawing to be described in detail, element cited in description below
Symbol will be regarded as the same or similar element when identical component symbol occur in different attached drawings.These embodiments are the present invention
Some, do not disclose all embodiments of the invention.More precisely, these embodiments are patent of the invention
The example of apparatus and method in application range.
Fig. 1 is the block diagram of image acquiring device shown by an embodiment according to the present invention, but this is merely for convenience
Illustrate, is not intended to limit the invention.Fig. 1 first first introduces all components and configuration relation of image acquiring device, in detail
Function will cooperate Fig. 2 to disclose together.
Fig. 1 is please referred to, image acquiring device 100 includes the first camera lens 10a, the second camera lens 10b, storage unit 15 and one
Or multiple processing units 20.In the present embodiment, image acquiring device 100 is, for example, digital camera, slr camera, digital camera
The electronic devices such as machine or other smartphone, tablet computer, personal digital assistants with image-acquisition functions, the present invention
It is not limited.
First camera lens 10a and the second camera lens 10b includes photosensitive element, to detect respectively into the first camera lens 10a with
And second camera lens 10b light intensity, and then generate image respectively.The photosensitive element is, for example, charge coupled cell
(Charge Coupled Device, hereinafter referred to as CCD), Complimentary Metal-Oxide semiconductor (Complementary Metal-
Oxide Semiconductor, hereinafter referred to as CMOS) element or other elements.In the present embodiment, the first camera lens 10a is black
Bai Jingtou (Black-and-White Lens), to obtain subject black white image (Black-and-White Image or
It is Mono Image);Second camera lens 10b is colored camera lens (Color Lens), to obtain the color image (Color of subject
Image)。
Storage unit 15 is, for example, any form of fixed or packaged type random access memory (Random
Access Memory, hereinafter referred to as RAM), read-only memory (Read-Only Memory, hereinafter referred to as ROM), flash
The combination of device (Flash memory), hard disk or other similar device or these devices.Storage unit 15 is coupled to the first camera lens
10a and the second camera lens 10b, to store image acquired in the first camera lens 10a and the second camera lens 10b.
Processing unit 20 may, for example, be central processing unit (Central Processing Unit, hereinafter referred to as
CPU) or at the microprocessor (Microprocessor) of other programmable general services or specific use, digital signal
Manage device (Digital Signal Processor, hereinafter referred to as DSP), programmable controller, special application integrated circuit
(Application Specific Integrated Circuits, hereinafter referred to as ASIC), programmable logic device
The combination of (Programmable Logic Device, hereinafter referred to as PLD) or other similar device or these devices.Processing is single
Member 20 couples the first camera lens 10a, the second camera lens 10b and storage unit 15, for example including image collection module 122, mode
Selecting module 124 and image processing module 126, to execute the figure of combined type to image acquired in image acquiring device 100
As processing function.Embodiment is enumerated below illustrates the image processing method that combined type is executed for image acquiring device 100
Detailed step.
Fig. 2 is the image processing method stream of the combined type of the image acquiring device according to shown by one embodiment of the invention
Cheng Tu, and the image processing method of the combined type of the image acquiring device of Fig. 2 can be with each member of the image acquiring device 100 of Fig. 1
Part is realized.
Referring to Fig. 1 and Fig. 2, firstly, the image collection module 122 of image acquiring device 100 utilizes the first mirror
Head 10a and the second camera lens 10b obtains the image of a scene, to generate the black white image and color image of above-mentioned scene respectively
(step S202).In other words, when user's image acquiring device 100 to be utilized shoots the image of above-mentioned scene, image is obtained
Module 122 will be generated corresponding to the black white image of the first camera lens 10a and corresponding to the color image of the second camera lens 10b.
Then, mode selection module 124 will dynamically autonomous black white image mode, main color image model and pure colour
Tupe selects one of those (step S204), and image processing module 126 will be according to 124 institute of previous mode selecting module
The mode of selection generates output image (step S206).Main black white image mode in this is with black white image as master image,
With color image as assistant images, and the information of color image is fused to black white image by image processing module 126, and then is produced
Raw output image.On the other hand, main color image model is then with color image as master image, with black white image as auxiliary
Image, and the information of black white image is fused to color image by image processing module 126, and then generates output image.Pure colour
Tupe is then that output image is generated merely with color image.
Specifically, since main white-black pattern is adapted to keep texture of the scene in terms of brightness based on plane thin
Section, and main color mode is then suitble to that the color with moderate change in depth scene is maintained to arrange, therefore, in the present embodiment
In, mode selection module 124 adaptively selects image information accessed by foundation image collection module 122 at image
The mode of reason, so that the output image gone out produced by image processing module 126 can have good quality.For example, Fig. 3 is
The image processing method flow chart of the combined type of image acquiring device shown by an embodiment according to the present invention, and Fig. 3
The image processing method of the combined type of image acquiring device can be realized with each element of the image acquiring device 100 of Fig. 1.
Referring to Fig. 1 and Fig. 3, such as step S202, the image collection module 122 of image acquiring device 100 will
The image of a scene is obtained using the first camera lens 10a and the second camera lens 10b, with generate respectively the black white image of above-mentioned scene with
And color image (step S302).Since the first camera lens 10a and the second camera lens 10b can get same scene in different perspectives
Image under (Viewing Angle), therefore in following step, mode selection module 124 can be according between two images
Parallax (Disparity) obtain the depth bounds (Depth Information) and change in depth degree of above-mentioned scene
(Depth Variation) come adaptively select generate output image mode.
Firstly, mode selection module 124 will judge whether depth bounds are greater than range gate threshold value or change in depth degree
Whether less than the first change in depth degree threshold value (step S304).If so, mode selection module 124 will select main artwork master
As mode to generate output image (step S306).Specifically, when the object distance of subject farther out when (e.g. be greater than 3 meters) or
When being that change in depth degree is smaller (scene more plane, e.g. 10 pixels in), image difference accessed by two camera lenses
It is different little.Under this situation, mode selection module 124 will select with the black white image with more details as master image and
With color image as the main black white image mode of assistant images, and image processing module 126 is by place set by mode according to this
Reason mode generates output image.In the present embodiment, image processing module 126 can using the information of color image come with black and white
Image carries out fusion treatment (Fusion).Pixel (hereinafter referred to as " the black and white that image processing module 126 can be with black white image
Pixel ") on the basis of, to search for corresponding pixel (hereinafter referred to as " correlated color pixel ") in the pixel of color image, and
And each corresponding pixel is subjected to fusion treatment.For example, image processing module 126 can be the letter of monochrome pixels
Breath and the information of correlated color pixel carry out fusion treatment, to generate the color image with abundant details.It should be noted that
Above-mentioned image co-registration processing mode is for illustration only, and the invention is not limited to specific image co-registration processing modes.
On the other hand, when mode selection module 124 judge in step s 304 depth bounds no more than range gate threshold value with
And change in depth degree be not less than the first change in depth degree threshold value when, then mode selection module 124 will further be sentenced
Whether change in depth degree of breaking is less than the second change in depth degree threshold value (step S308).If so, mode selection module 124
By selection main color image model to generate output image (step S310).Second change in depth degree threshold value in this is greater than
First change in depth degree threshold value, may, for example, be 20 pixels.Specifically, since there are certain depth for scene
When variation, the regions of certain black white images will shielded in color image (occlusion) and can not be looked in color image
To corresponding region and color information, therefore under this situation, mode selection module 124 will be selected with color image as master map
As and with black white image is as the main color image model of assistant images, and image processing module 126 will be according to this set by mode
Fixed processing mode generates output image.In the present embodiment, image processing module 126 can using the information of black white image come
Fusion treatment is carried out with color image.Image processing module 126 can be on the basis of the pixel of color image, in artwork master
Corresponding pixel (hereinafter referred to as " related monochrome pixels ") is searched in the pixel of picture, and each corresponding pixel is carried out
Fusion treatment.For example, image processing module 126 can be by the information of colour element and the information of related monochrome pixels into
Row fusion treatment can also generate the color image with certain degree details.
However, when mode selection module 124 judges change in depth degree not less than the second change in depth in step S308
When degree threshold value, then mode selection module 124 will select pure color pattern image to generate output image (step S312).?
That is the appearance probability and area of shaded areas are larger, image co-registration when change in depth has been more than tolerable extent and scope
Thus there is the higher risk for generating and discontinuously feeling in such region, therefore under this situation, mode selection module 124 is merely with coloured silk
The information of chromatic graph picture itself generates output image.
The image processing method of the combined type of aforementioned image acquiring device can be using shown by Fig. 4 one embodiment of the invention
Functional flow diagram indicate.
Referring to Fig. 1 and Fig. 4, the method can will be utilized in the image collection module 122 of image acquiring device 100
First camera lens 10a and the second camera lens 10b obtains the image of a scene respectively, generates black white image ImgBW and color image
ImgC.Then, mode selection module 124 will be carried out according to the image information of black white image ImgBW and color image ImgC
Pattern switching MS, dynamically to switch to main black white image mode M1, main color image model M2 and pure color processing mode
One of M3.Main black white image mode M1 is by black white image ImgBW as master image, and is done with color image ImgC
For assistant images, black white image ImgBW is fused to using the information of color image ImgC.Main black white image mode M2 is will be colored
Image ImgC as master image, and with black white image ImgBW as assistant images, melt by the information using black white image ImgBW
Close color image ImgC.Pure color processing mode M3 is that color image ImgC is only carried out processing or directly output.Image
Processing module 126 will generate output image Img according to the selected mode of mode selection module 124.
In conclusion the image processing method of image acquiring device and its combined type proposed by the invention, utilizes double
Camera lens to obtain the black white image and color image of a scene simultaneously, and dynamically switched to according to image information lead it is black
White image mode, main color image model or pure color processing mode are to generate output image.The present invention passes through black white image
And advantage of the color image under different photographed scenes, adaptively switch to the image procossing mould for meeting the photographed scene
Formula, can be under the premise of taking into account the light and thin degree of image acquiring device, it is ensured that the output quality of image.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.