Summary of the invention
Object of the present invention is intended at least solve one of above-mentioned technological deficiency.
For this reason, first object of the present invention is to propose a kind of three-dimensional scenic object boundary detection method, can detect fast and effectively the border of object in three-dimensional scenic, the impact of the texture that significantly reduces shade and body surface on border recognition effect, has improved the precision of Boundary Detection.
For achieving the above object, the embodiment of first aspect present invention has proposed a kind of three-dimensional scenic object boundary detection method, the differential of the one or more features that comprise the steps: each pixel of calculating 3-D view in multiple directions, wherein, described one or more feature comprises brightness, color characteristic, luminance texture feature and color and vein feature; The differential of the differential of the described brightness on the equidirectional of described each pixel and described luminance texture feature is merged to generate the first differential, and the differential of the differential of the described color characteristic on equidirectional and described color and vein feature is merged to generate the second differential; Multiple the first differential in the described multiple directions of described each pixel are merged to generate the 3rd differential, and multiple the second differential in described multiple directions are merged to generate the 4th differential; The probability that is frontier point according to each pixel described in described the 3rd differential of described each pixel and described the 4th differential calculation, obtains object boundary figure.
According to the three-dimensional scenic object boundary detection method of the embodiment of the present invention, can detect fast and effectively the border of object in three-dimensional scenic, the impact of the texture that significantly reduces shade and body surface on border recognition effect, has improved the precision of Boundary Detection.
In one embodiment of the invention, establish current pixel point P, centered by pixel P, along direction θ, choose the window of 2W × W, and described window is laterally divided into the subwindow of 4 W/2 × W, then calculate the brightness histogram of each window
and color histogram
the numbering that wherein i is subwindow.
In one embodiment of the invention, according to the brightness histogram of described each window
and color histogram
calculate respectively the differential of brightness, differential, the differential of luminance texture feature and the differential of color and vein feature of color characteristic, wherein, the differential of the brightness of described pixel P on direction θ is:
the differential of the color characteristic of described pixel P on direction θ is:
the differential of the luminance texture feature of described pixel P on direction θ is:
the differential of the color and vein feature of described pixel P on direction θ is:
In one embodiment of the invention, described the first differential is:
described the second differential is:
In one embodiment of the invention, described the 3rd differential is:
described the 4th differential is:
In one embodiment of the invention, the described probability that is frontier point according to each pixel described in described the 3rd differential of described each pixel and described the 4th differential calculation
Pb (P)=α G
brt(P)+(1-α) G
clr(P), wherein, Pb (P) for pixel P be the probability of frontier point, α is that brightness is as the shared weight of edge determination factor.
The embodiment of a second aspect of the present invention has proposed a kind of three-dimensional scenic object boundary pick-up unit, comprise: differential calculation module, differential for one or more features of each pixel of calculating 3-D view in multiple directions, wherein, described one or more feature comprises brightness, color characteristic, luminance texture feature and color and vein feature; Differential merges module, for merging the differential of described pixel multiple features in the same direction, and merges the differential of described pixel in multiple directions; Probability calculation module, for calculating the probability that described each pixel is frontier point.
According to the three-dimensional scenic object boundary pick-up unit of the embodiment of the present invention, can detect fast and effectively the border of object in three-dimensional scenic, the impact of the texture that significantly reduces shade and body surface on border recognition effect, has improved the precision of Boundary Detection.
In one embodiment of the invention, establish current pixel point P, described differential calculation module is centered by pixel P, along direction θ, choose the window of 2W × W, and described window is laterally divided into the subwindow of 4 W/2 × W, then calculate the brightness histogram of each window
and color histogram
the numbering that wherein i is subwindow.
In one embodiment of the invention, described differential calculation module is according to the brightness histogram of described each window
and color histogram
calculate respectively the differential of brightness, differential, the differential of luminance texture feature and the differential of color and vein feature of color characteristic, wherein, the differential of the brightness of described pixel P on direction θ is:
the differential of the color characteristic of described pixel P on direction θ is:
the differential of the luminance texture feature of described pixel P on direction θ is:
the differential of the color and vein feature of described pixel P on direction θ is:
In one embodiment of the invention, described differential merges module the differential of the differential of the described brightness on the equidirectional of described each pixel and described luminance texture feature is merged to generate the first differential, and the computing formula of described the first differential is
and the differential of the differential of the described color characteristic on equidirectional and described color and vein feature is merged to generate the second differential, the computing formula of described the second differential is
In one embodiment of the invention, described differential merges module multiple the first differential in the described multiple directions of described each pixel is merged to generate the 3rd differential, and the computing formula of described the 3rd differential is
and multiple the second differential in described multiple directions are merged to generate the 4th differential, the computing formula of described the 4th differential is
The computing formula of the probability that in one embodiment of the invention, described probability calculation module is frontier point according to each pixel described in described the 3rd differential of described each pixel and described the 4th differential calculation is
Pb (P)=α G
brt(P)+(1-α) G
clr(P), wherein, Pb (P) for pixel P be the probability of frontier point, α is that brightness is as the shared weight of edge determination factor.
The aspect that the present invention is additional and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Be exemplary below by the embodiment being described with reference to the drawings, only for explaining the present invention, and can not be interpreted as limitation of the present invention.
Disclosing below provides many different embodiment or example to be used for realizing different structure of the present invention.Of the present invention open in order to simplify, hereinafter the parts to specific examples and setting are described.Certainly, they are only example, and object does not lie in restriction the present invention.In addition, the present invention can be in different examples repeat reference numerals and/or letter.This repetition is in order to simplify and object clearly, itself do not indicate the relation between discussed various embodiment and/or setting.In addition, the various specific technique the invention provides and the example of material, but those of ordinary skill in the art can recognize the property of can be applicable to of other techniques and/or the use of other materials.In addition, First Characteristic described below Second Characteristic it " on " structure can comprise that the first and second Characteristics creations are the direct embodiment of contact, also can comprise the embodiment of other Characteristics creation between the first and second features, such the first and second features may not be direct contacts.
In description of the invention, it should be noted that, unless otherwise prescribed and limit, term " installation ", " being connected ", " connection " should be interpreted broadly, for example, can be mechanical connection or electrical connection, also can be the connection of two element internals, can be to be directly connected, and also can indirectly be connected by intermediary, for the ordinary skill in the art, can understand as the case may be the concrete meaning of above-mentioned term.
With reference to description and accompanying drawing below, these and other aspects of embodiments of the invention will be known.In these descriptions and accompanying drawing, specifically disclose some specific implementations in embodiments of the invention, represent some modes of the principle of implementing embodiments of the invention, but should be appreciated that the scope of embodiments of the invention is not limited.On the contrary, embodiments of the invention comprise all changes, amendment and the equivalent within the scope of spirit and the intension that falls into additional claims.
As shown in Figure 1, according to the three-dimensional scenic object boundary detection method of first aspect present invention embodiment, comprise the following steps:
S101: the differential of one or more features of each pixel of calculating 3-D view in multiple directions, wherein, one or more features comprise brightness, color characteristic, luminance texture feature and color and vein feature etc.
As shown in Figure 2, establish current pixel point P, centered by pixel P, along direction θ, choose the window of 2W × W, and described window is laterally divided into the subwindow of 4 W/2 × W, be numbered 1,2,3,4, then calculate the brightness histogram of each window
and color histogram
the numbering that wherein i is subwindow.In Fig. 2, choosing θ is 90 °.
The differential of the brightness of described pixel P on direction θ and the differential of color characteristic are respectively:
Wherein, f and d are mathematical functions, f (x)=1-exp (Cx), and C is constant, d (g, h)=∑ [g (n)-h (n)]
2,
for brightness differential,
for color characteristic differential.
The differential of the luminance texture feature of described pixel P on direction θ and the differential of color and vein feature are respectively:
wherein
for luminance texture characteristic differentiation,
for color and vein characteristic differentiation.
Particularly, according to f (x)=1-exp (Cx), C is constant, d (g, h)=∑ [g (n)-h (n)]
2, known
The rest may be inferred for the differential of other features, do not repeat them here.
S102: the differential of the differential of the brightness on the equidirectional of each pixel and luminance texture feature is merged to generate the first differential, and the differential of the differential of the color characteristic on equidirectional and color and vein feature is merged to generate the second differential.
Wherein, the computing formula of the first differential is:
The computing formula of the second differential is:
S103: multiple the first differential in the multiple directions of each pixel are merged to generate the 3rd differential, and multiple the second differential in multiple directions are merged to generate the 4th differential.
Wherein, the computing formula of the 3rd differential is:
The computing formula of the 4th differential is:
S104: the probability that is frontier point according to the 3rd differential of each pixel and the each pixel of the 4th differential calculation, obtains object boundary figure.
Particularly, the probability that pixel is frontier point is: Pb (P)=α G
brt(P)+(1-α) G
clr(P)
Wherein, Pb (P) for pixel P be the probability of frontier point, α is that brightness is as the shared weight of edge determination factor.
Pb (P) is converted to 0~255 integer gray-scale value and just obtains object boundary figure.Probability threshold value also can be set, and the whole pixels that the probability of frontier point exceeded to probability threshold value combine, and obtain the object boundary figure of binaryzation.
According to the three-dimensional scenic object boundary detection method of the embodiment of the present invention, can detect fast and effectively the border of object in three-dimensional scenic, the impact of the texture that significantly reduces shade and body surface on border recognition effect, has improved the precision of Boundary Detection.
In one embodiment of the invention, the testing process of three-dimensional scenic object boundary as shown in Figure 3.Fig. 3 (a) is 3-D view to be detected.Calculate brightness, color characteristic, luminance texture feature and the differential of color and vein feature in multiple directions of each pixel of this 3-D view, the differential of the differential of the brightness on the equidirectional of each pixel and luminance texture feature is merged to generate the first differential, and the differential of the differential of the color characteristic on equidirectional and color and vein feature is merged to generate the second differential.Then, multiple the first differential in the described multiple directions of described each pixel are merged to generate the 3rd differential, the boundary graph now obtaining is brightness boundary graph, as Fig. 3 (b); Multiple the second differential in described multiple directions are merged to generate the 4th differential, and the boundary graph now obtaining is color boundaries figure, as Fig. 3 (c).Finally, the probability that is frontier point according to the 3rd differential of each pixel and the each pixel of the 4th differential calculation, Pb (P)=α G
brt(P)+(1-α) G
clr(P), wherein, G
brt(P) be the 3rd differential, G
clr(P) be the 4th differential, Pb (P) for pixel P be the probability of frontier point, α be brightness as the shared weight of edge determination factor, value α=0.5 in the present embodiment, obtains last object boundary figure, as Fig. 3 (d).
As shown in Figure 4, according to the three-dimensional scenic object boundary pick-up unit of the embodiment of second aspect present invention, comprising: differential calculation module 410, differential merge module 420 and probability calculation module 430.Wherein, differential calculation module 410 is the differential in multiple directions for one or more features of each pixel of calculating 3-D view, and wherein, described one or more features comprise brightness, color characteristic, luminance texture feature and color and vein feature etc.Differential merges module 420 for merging the differential of pixel multiple features in the same direction, and merges the differential of pixel in multiple directions.Probability calculation module 430 is for calculating the probability that described each pixel is frontier point.
Particularly, establish current pixel point P, differential calculation module 410, centered by pixel P, along direction θ, is chosen the window of 2W × W, and described window is laterally divided into the subwindow of 4 W/2 × W, then calculates the brightness histogram of each window
and color histogram
the numbering that wherein i is subwindow.Differential calculation module 410 is according to the brightness histogram of each window
and color histogram
calculate respectively the differential of brightness, differential, the differential of luminance texture feature and the differential of color and vein feature of color characteristic, wherein, the differential of the brightness of pixel P on direction θ is:
The differential of the color characteristic of pixel P on direction θ is:
The differential of the luminance texture feature of pixel P on direction θ is:
The differential of the color and vein feature of pixel P on direction θ is:
Differential merges module 420 differential of the differential of the brightness on the equidirectional of each pixel and luminance texture feature is merged to generate the first differential, and the computing formula of the first differential is
and the differential of the differential of the color characteristic on equidirectional and color and vein feature is merged to generate the second differential, the computing formula of described the second differential is
then, differential merges module 420 multiple the first differential in the multiple directions of each pixel is merged to generate the 3rd differential, and the computing formula of described the 3rd differential is
and multiple the second differential in multiple directions are merged to generate the 4th differential, the computing formula of described the 4th differential is
The probability that probability calculation module 430 is frontier point according to the 3rd differential of each pixel and the each pixel of the 4th differential calculation, the computing formula of the probability that each pixel is frontier point is
Pb(P)=αG
brt(P)+(1-α)G
clr(P)
Wherein, Pb (P) for pixel P be the probability of frontier point, α is that brightness is as the shared weight of edge determination factor.
Pb (P) is converted to 0~255 integer gray-scale value and just obtains object boundary figure.Probability threshold value also can be set, and the whole pixels that the probability of frontier point exceeded to probability threshold value combine, and obtain the object boundary figure of binaryzation.
According to the three-dimensional scenic object boundary pick-up unit of the embodiment of the present invention, can detect fast and effectively the border of object in three-dimensional scenic, the impact of the texture that significantly reduces shade and body surface on border recognition effect, has improved the precision of Boundary Detection.
Any process of otherwise describing in process flow diagram or at this or method are described and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
The logic and/or the step that in process flow diagram, represent or otherwise describe at this, for example, can be considered to the sequencing list of the executable instruction for realizing logic function, may be embodied in any computer-readable medium, use for instruction execution system, device or equipment (as computer based system, comprise that the system of processor or other can and carry out the system of instruction from instruction execution system, device or equipment instruction fetch), or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, device that storage, communication, propagation or transmission procedure use for instruction execution system, device or equipment or in conjunction with these instruction execution systems, device or equipment.The example more specifically (non-exhaustive list) of computer-readable medium comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random-access memory (ram), ROM (read-only memory) (ROM), the erasable ROM (read-only memory) (EPROM or flash memory) of editing, fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other the suitable medium that can print described program thereon, because can be for example by paper or other media be carried out to optical scanning, then edit, decipher or process in electronics mode and obtain described program with other suitable methods if desired, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple steps or method can realize with being stored in software or the firmware carried out in storer and by suitable instruction execution system.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: there is the discrete logic for data-signal being realized to the logic gates of logic function, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a kind of computer-readable recording medium, this program, in the time carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing module, can be also that the independent physics of unit exists, and also can be integrated in a module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.If described integrated module realizes and during as production marketing independently or use, also can be stored in a computer read/write memory medium using the form of software function module.
The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And specific features, structure, material or the feature of description can be with suitable mode combination in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, amendment, replacement and modification to these embodiment, scope of the present invention is by claims and be equal to and limit.