stream/segmentation_smoothing.cc

mediapipe · mediapipe/framework/api2/stream/segmentation_smoothing.cc · cpp · Apache-2.0
ai, tag:knn-classified

include "mediapipe/framework/api2/stream/segmentation_smoothing.h" include "mediapipe/calculators/image/segmentation_smoothing_calculator.pb.h" include "mediapipe/framework/api2/builder.h" include "mediapipe/framework/formats/image.h"

// Source: https://github.com/google-ai-edge/mediapipe | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
#include "mediapipe/framework/api2/stream/segmentation_smoothing.h"

#include "mediapipe/calculators/image/segmentation_smoothing_calculator.pb.h"
#include "mediapipe/framework/api2/builder.h"
#include "mediapipe/framework/formats/image.h"

namespace mediapipe::api2::builder {

Stream<Image> SmoothSegmentationMask(Stream<Image> mask,
                                     Stream<Image> previous_mask,
                                     float combine_with_previous_ratio,
                                     Graph& graph) {
  auto& smoothing_node = graph.AddNode("SegmentationSmoothi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key