mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #8789 from vpisarev:parallel_ccomp
This commit is contained in:
commit
2a5e12ccb5
@ -3703,8 +3703,10 @@ image with 4 or 8 way connectivity - returns N, the total number of labels [0, N
|
|||||||
represents the background label. ltype specifies the output label image type, an important
|
represents the background label. ltype specifies the output label image type, an important
|
||||||
consideration based on the total number of labels or alternatively the total number of pixels in
|
consideration based on the total number of labels or alternatively the total number of pixels in
|
||||||
the source image. ccltype specifies the connected components labeling algorithm to use, currently
|
the source image. ccltype specifies the connected components labeling algorithm to use, currently
|
||||||
Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the cv::ConnectedComponentsAlgorithmsTypes
|
Grana (BBDT) and Wu's (SAUF) algorithms are supported, see the cv::ConnectedComponentsAlgorithmsTypes
|
||||||
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
|
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
|
||||||
|
This function uses parallel version of both Grana and Wu's algorithms if at least one allowed
|
||||||
|
parallel framework is enabled and if the rows of the image are at least twice the number returned by getNumberOfCPUs.
|
||||||
|
|
||||||
@param image the 8-bit single-channel image to be labeled
|
@param image the 8-bit single-channel image to be labeled
|
||||||
@param labels destination labeled image
|
@param labels destination labeled image
|
||||||
@ -3735,7 +3737,8 @@ consideration based on the total number of labels or alternatively the total num
|
|||||||
the source image. ccltype specifies the connected components labeling algorithm to use, currently
|
the source image. ccltype specifies the connected components labeling algorithm to use, currently
|
||||||
Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the cv::ConnectedComponentsAlgorithmsTypes
|
Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the cv::ConnectedComponentsAlgorithmsTypes
|
||||||
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
|
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
|
||||||
|
This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed
|
||||||
|
parallel framework is enabled and if the rows of the image are at least twice the number returned by getNumberOfCPUs.
|
||||||
|
|
||||||
@param image the 8-bit single-channel image to be labeled
|
@param image the 8-bit single-channel image to be labeled
|
||||||
@param labels destination labeled image
|
@param labels destination labeled image
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -188,7 +188,7 @@ public:
|
|||||||
|
|
||||||
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
|
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
|
||||||
the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
|
the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
|
||||||
is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiarra,
|
is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara,
|
||||||
*Detecting Moving Shadows...*, IEEE PAMI,2003.
|
*Detecting Moving Shadows...*, IEEE PAMI,2003.
|
||||||
*/
|
*/
|
||||||
CV_WRAP virtual double getShadowThreshold() const = 0;
|
CV_WRAP virtual double getShadowThreshold() const = 0;
|
||||||
@ -289,7 +289,7 @@ public:
|
|||||||
|
|
||||||
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
|
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
|
||||||
the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
|
the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
|
||||||
is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiarra,
|
is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara,
|
||||||
*Detecting Moving Shadows...*, IEEE PAMI,2003.
|
*Detecting Moving Shadows...*, IEEE PAMI,2003.
|
||||||
*/
|
*/
|
||||||
CV_WRAP virtual double getShadowThreshold() const = 0;
|
CV_WRAP virtual double getShadowThreshold() const = 0;
|
||||||
|
@ -236,7 +236,7 @@ protected:
|
|||||||
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
||||||
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
||||||
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
||||||
//See: Prati,Mikic,Trivedi,Cucchiarra,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
//See: Prati,Mikic,Trivedi,Cucchiara,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
||||||
|
|
||||||
//model data
|
//model data
|
||||||
int nLongCounter;//circular counter
|
int nLongCounter;//circular counter
|
||||||
|
@ -386,7 +386,7 @@ protected:
|
|||||||
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
||||||
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
||||||
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
||||||
//See: Prati,Mikic,Trivedi,Cucchiarra,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
//See: Prati,Mikic,Trivedi,Cucchiara,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
||||||
|
|
||||||
String name_;
|
String name_;
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ struct GaussBGStatModel2Params
|
|||||||
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
// Tau - shadow threshold. The shadow is detected if the pixel is darker
|
||||||
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
//version of the background. Tau is a threshold on how much darker the shadow can be.
|
||||||
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
//Tau= 0.5 means that if pixel is more than 2 times darker then it is not shadow
|
||||||
//See: Prati,Mikic,Trivedi,Cucchiarra,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
//See: Prati,Mikic,Trivedi,Cucchiara,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GMM
|
struct GMM
|
||||||
@ -472,7 +472,7 @@ struct GMM
|
|||||||
|
|
||||||
// shadow detection performed per pixel
|
// shadow detection performed per pixel
|
||||||
// should work for rgb data, could be usefull for gray scale and depth data as well
|
// should work for rgb data, could be usefull for gray scale and depth data as well
|
||||||
// See: Prati,Mikic,Trivedi,Cucchiarra,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
// See: Prati,Mikic,Trivedi,Cucchiara,"Detecting Moving Shadows...",IEEE PAMI,2003.
|
||||||
CV_INLINE bool
|
CV_INLINE bool
|
||||||
detectShadowGMM(const float* data, int nchannels, int nmodes,
|
detectShadowGMM(const float* data, int nchannels, int nmodes,
|
||||||
const GMM* gmm, const float* mean,
|
const GMM* gmm, const float* mean,
|
||||||
|
Loading…
Reference in New Issue
Block a user