提交 f4dd4739 编写于 作者: G gineshidalgo99

Fixed bug: disable_blending not working

上级 f3454e37
......@@ -8,7 +8,8 @@ namespace op
const float* const facePtr, const unsigned char* const partPairsPtr,
const int numberFaces, const int numberParts, const int numberPartPairs,
const float* const rgbColorsPtr, const int numberColors,
const float radius, const float stickwidth, const float threshold, const float alphaColorToAdd)
const float radius, const float stickwidth, const float threshold, const float alphaColorToAdd,
const bool blendOriginalFrame = true)
{
// Fill shared parameters
if (globalIdx < numberFaces)
......@@ -54,6 +55,12 @@ namespace op
auto& b = targetPtr[ baseIndex];
auto& g = targetPtr[ targetWidth * targetHeight + baseIndex];
auto& r = targetPtr[2 * targetWidth * targetHeight + baseIndex];
if (!blendOriginalFrame)
{
b = 0.f;
g = 0.f;
r = 0.f;
}
for (auto person = 0; person < numberFaces; person++)
{
......
......@@ -142,7 +142,7 @@ namespace op
}
__global__ void renderPoseCoco(float* targetPtr, const int targetWidth, const int targetHeight, const float* const posePtr, const int numberPeople,
const float threshold, const bool googlyEyes, const float blendOriginalFrame, const float alphaColorToAdd)
const float threshold, const bool googlyEyes, const bool blendOriginalFrame, const float alphaColorToAdd)
{
const auto x = (blockIdx.x * blockDim.x) + threadIdx.x;
const auto y = (blockIdx.y * blockDim.y) + threadIdx.y;
......@@ -163,11 +163,11 @@ namespace op
renderKeyPoints(targetPtr, sharedMaxs, sharedMins, sharedScaleF,
globalIdx, x, y, targetWidth, targetHeight, posePtr, COCO_PAIRS_GPU, numberPeople,
POSE_COCO_NUMBER_PARTS, numberPartPairs, COCO_RGB_COLORS, numberColors,
radius, stickwidth, threshold, alphaColorToAdd);
radius, stickwidth, threshold, alphaColorToAdd, blendOriginalFrame);
}
__global__ void renderPoseMpi29Parts(float* targetPtr, const int targetWidth, const int targetHeight, const float* const posePtr,
const int numberPeople, const float threshold, const float blendOriginalFrame, const float alphaColorToAdd)
const int numberPeople, const float threshold, const bool blendOriginalFrame, const float alphaColorToAdd)
{
//posePtr has length 3 * 15 * numberPeople
const auto x = (blockIdx.x * blockDim.x) + threadIdx.x;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册