* @see mv_3d_configure()
*/
int mv_3d_pointcloud_write_file(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type,
- char *filename);
+ const char *filename);
/**
* @}
int SetPointcloudCallback(mv_3d_pointcloud_cb pointcloudCallback, void *pointcloudUserData);
- int WritePointcloudFile(mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, char *fileName);
+ int WritePointcloudFile(mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, const char *fileName);
int Prepare();
* @brief Write Pointcloud file.
* @since_tizen 7.0
*/
-int mv3dWritePointcloudFile(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, char *fileName);
+int mv3dWritePointcloudFile(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type,
+ const char *fileName);
#ifdef __cplusplus
}
return nullptr;
}
-int Mv3d::WritePointcloudFile(mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, char *fileName)
+int Mv3d::WritePointcloudFile(mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, const char *fileName)
{
#ifdef MV_3D_POINTCLOUD_IS_AVAILABLE
auto s = static_cast<mv_3d_pointcloud_s *>(pointcloud);
}
int mv_3d_pointcloud_write_file(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type,
- char *filename)
+ const char *filename)
{
MEDIA_VISION_SUPPORT_CHECK(_mv_3d_pointcloud_check_system_info_feature_supported() &&
_mv_3d_check_system_info_feature_supported());
return ret;
}
-int mv3dWritePointcloudFile(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type, char *fileName)
+int mv3dWritePointcloudFile(mv_3d_h mv3d, mv_3d_pointcloud_h pointcloud, mv_3d_pointcloud_type_e type,
+ const char *fileName)
{
LOGI("ENTER");
}
if (anchorParam.interpolatedScaleAspectRatio > 0.0f) {
const float scaleNext = lastSameStrideLayer == static_cast<int>(anchorParam.strides.size()) - 1 ?
- 1.0f :
- CalculateScale(anchorParam.minScale, anchorParam.maxScale,
+ 1.0f :
+ CalculateScale(anchorParam.minScale, anchorParam.maxScale,
lastSameStrideLayer + 1, anchorParam.strides.size());
scales.push_back(std::sqrt(scale * scaleNext));
aspectRatios.push_back(anchorParam.interpolatedScaleAspectRatio);
cv::Rect2f anchor = { cv::Point2f { (x + anchorParam.anchorOffsetX) * 1.0f / featureMapWidth,
(y + anchorParam.anchorOffsetY) * 1.0f / featureMapHeight },
anchorParam.isFixedAnchorSize ?
- cv::Size2f { 1.0f, 1.0f } :
- cv::Size2f { anchorWidth[anchorId], anchorWidth[anchorId] } };
+ cv::Size2f { 1.0f, 1.0f } :
+ cv::Size2f { anchorWidth[anchorId], anchorWidth[anchorId] } };
AddAnchorBox(anchor);
}
}
for (int y = 0; y < gridHeight; ++y) {
for (int x = 0; x < gridWidth; ++x) {
for (int anchorPerCell = 0; anchorPerCell < maxAnchorPerCell; ++anchorPerCell) {
- cv::Rect2f anchor = { cv::Point2f { (static_cast<float>(x) + anchorParam.anchorOffsetX),
- (static_cast<float>(y) + anchorParam.anchorOffsetY) },
- cv::Size2f { anchorParam.vxScales[anchorPerCell] * static_cast<float>(stride),
- anchorParam.vyScales[anchorPerCell] * static_cast<float>(stride) } };
+ cv::Rect2f anchor = {
+ cv::Point2f { (static_cast<float>(x) + anchorParam.anchorOffsetX),
+ (static_cast<float>(y) + anchorParam.anchorOffsetY) },
+ cv::Size2f { static_cast<float>(anchorParam.vxScales[anchorPerCell]) * static_cast<float>(stride),
+ static_cast<float>(anchorParam.vyScales[anchorPerCell]) * static_cast<float>(stride) }
+ };
cal.push_back(anchor);
}
}
JsonArray *inputList = json_object_get_array_member(root, key_name.c_str());
LOGI("input tensor count : %d", json_array_get_length(inputList));
- for (auto idx = 0; idx < json_array_get_length(inputList); ++idx) {
+ for (guint idx = 0; idx < json_array_get_length(inputList); ++idx) {
JsonNode *node = json_array_get_element(inputList, idx);
std::string token(json_to_string(node, 1));
int pos = token.find(":");
LOGI("output tensor count = %d", json_array_get_length(outputList));
- for (auto idx = 0; idx < json_array_get_length(outputList); ++idx) {
+ for (guint idx = 0; idx < json_array_get_length(outputList); ++idx) {
JsonNode *output_node = json_array_get_element(outputList, idx);
std::string token(json_to_string(output_node, 1));
int pos = token.find(":");
MetaMap &metaMap = string("input").compare(node_name) == 0 ? _inputMetaMap : _outputMetaMap;
- for (auto idx = 0; idx < json_array_get_length(inputList); ++idx) {
+ for (guint idx = 0; idx < json_array_get_length(inputList); ++idx) {
JsonNode *node = json_array_get_element(inputList, idx);
string token(json_to_string(node, 1));
int pos = token.find(":");
auto metaInfo = _parser->getOutputMetaMap()["Identity_1"];
auto decodingBox = static_pointer_cast<DecodingBox>(metaInfo->decodingTypeMap[DecodingType::BOX]);
- for (auto idx = 0; idx < decodingBox->edges.size(); idx += 2)
+ for (size_t idx = 0; idx < decodingBox->edges.size(); idx += 2)
_result.edge_index_vec.push_back({ decodingBox->edges[idx], decodingBox->edges[idx + 1] });
_result.number_of_edges = decodingBox->edges.size();
Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
-Version: 0.26.3
+Version: 0.26.4
Release: 0
Group: Multimedia/Framework
License: Apache-2.0 and BSD-3-Clause
fclose(stream);
}
+#if BUILD_VISUALIZER
// translate value x in [0..1] into color triplet using "jet" color map
// if out of range, use darker colors
// variation of an idea by http://www.metastine.com/?p=7
g = __max(0, __min(255, (int) (round(255 * (1.5 - 4 * fabs(x - .5))))));
b = __max(0, __min(255, (int) (round(255 * (1.5 - 4 * fabs(x - .25))))));
}
+#endif
static void WriteFilePNG(unsigned short *data, int width, int height, const char *filename, float minDisp,
float maxDisp, float depth2Disp, int distanceMode)
#endif
}
+#if 0 // FIXME: Not in USE
static void WritePLY(double *data, int size, const char *filename)
{
std::ofstream stream(filename, std::ofstream::out);
return;
}
+#endif
static void _depth_middlebury_cb(mv_source_h source, unsigned short *depth, unsigned int width, unsigned int height,
void *user_data)
printf("Incorrect! Try again.\n");
}
} else {
- while (sel_distance <= 0 || sel_distance > ARRAY_SIZE(distances)) {
+ while (sel_distance <= 0 || sel_distance > static_cast<int>(ARRAY_SIZE(distances))) {
sel_distance = show_menu_linear("Select Action", distances, ARRAY_SIZE(distances));
}
}
{
auto mv3d = static_cast<appdata *>(user_data);
- for (int y = 0; y < height; y++) {
+ for (unsigned int y = 0; y < height; y++) {
unsigned short *src = depth + y * width;
unsigned char *dst = mv3d->remoteData.buffer + y * (width * 4);
- for (int x = 0; x < width; x++) {
+ for (unsigned int x = 0; x < width; x++) {
float value =
TRANSLATE_VAL(((440.92750f * 21.87095f / static_cast<float>(src[x])) - 8.0f) / (88.f /*96-8*/));
dst[x * 4] = COLORMAP_JET_R(value);
cv::Mat dump(cv::Size(width, height), CV_16U);
- for (int y = 0; y < height; y++) {
+ for (unsigned int y = 0; y < height; y++) {
unsigned short *ptr = depth + y * width;
- for (int x = 0; x < width; x++) {
+ for (unsigned int x = 0; x < width; x++) {
dump.at<unsigned short>(y, x) =
static_cast<unsigned short>(440.92750f * 21.87095f / static_cast<float>(ptr[x]));
}
printf("enter main\n");
vision_source_format_s format { .pixel_format = VISION_SOURCE_PIXEL_FORMAT_NV12,
- .resolution = { camWidth << 1, camHeight },
+ .resolution = { static_cast<unsigned int>(camWidth << 1),
+ static_cast<unsigned int>(camHeight) },
.fps = 10,
.quality = 0,
.bitrate = 0 };