% facebookX24.m
clc;
addpath('C:\Program Files\MATLAB\R2015b\toolbox\jsonlab-1.5'); % read .json
json2data=loadjson('E:\JZChen\X24\museum_metadata.json'); Cameras_number = json2data.Informative.Cameras_number;
% fprintf('%d',Cameras_number); % draw the camera and it's index
for index = :Cameras_number
%fprintf('%d\n',index);
name = json2data.cameras{,index}.Name;
Position = json2data.cameras{,index}.Position;
%fprintf('%s,%d\n',name,Position);
tmp_x = Position();
tmp_z = Position();
tmp_y = Position();
plot3(tmp_z,tmp_x,tmp_y,'rx');
text(tmp_z,tmp_x,tmp_y,name,'FontSize',);
hold on;
end
r=sqrt(0.0955); % radius
x0=;y0=1.65;z0=; % sphere center [z,x,y]=sphere(); % generate sphere
surf(r*z+z0,r*x+x0,r*y+y0); % draw sphere axis on;
axis equal;
xlabel('z');
ylabel('x');
zlabel('y'); % color
%colormap('white');
%colormap('gray');
colormap('default');
alpha(0.5);

数据文件如下:

{
"Content_name": "TechnicolorMuseum",
"BoundingBox_center": [0.0,0.0,1.65],
"Fps": ,
"Frames_number": ,
"Informative":
{
"Cameras_number": ,
"RigRadius": 0.30
},
"cameras":
[
{
"Name":"camE0",
"Position": [ 0.0777, -0.1429, 1.3872],
"Rotation": [ -61.4676, 40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE1",
"Position": [ 0.1429, 0.2628, 1.7277],
"Rotation": [ 61.4676, -14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE2",
"Position": [ 0.2628, 0.0777, 1.7929],
"Rotation": [ 16.4676, -24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE3",
"Position": [ 0.1429, -0.2628, 1.5723],
"Rotation": [ -61.4676, 14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE4",
"Position": [ 0.0777, 0.1429, 1.9128],
"Rotation": [ 61.4676, -40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE5",
"Position": [ 0.2628, -0.0777, 1.5071],
"Rotation": [ -16.4676, 24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE6",
"Position": [ 0.1429, 0.0777, 1.3872],
"Rotation": [ 28.5324, 40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE7",
"Position": [ 0.0777, 0.2628, 1.5071],
"Rotation": [ 73.5324, 24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE8",
"Position": [ 0.2628, 0.1429, 1.5723],
"Rotation": [ 28.5324, 14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE9",
"Position": [ 0.1429, -0.0777, 1.9128],
"Rotation": [ -28.5324, -40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE10",
"Position": [ 0.0777, -0.2628, 1.7929],
"Rotation": [ -73.5324, -24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE11",
"Position": [ 0.2628, -0.1429, 1.7277],
"Rotation": [ -28.5324, -14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE12",
"Position": [ -0.2628, -0.0777, 1.7929],
"Rotation": [ -163.5324, -24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE13",
"Position": [ -0.0777, -0.1429, 1.9128],
"Rotation": [ -118.5324, -40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE14",
"Position": [ -0.1429, -0.2628, 1.7277],
"Rotation": [ -118.5324, -14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE15",
"Position": [ -0.0777, 0.1429, 1.3872],
"Rotation": [ 118.5324, 40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE16",
"Position": [ -0.2628, 0.0777, 1.5071],
"Rotation": [ 163.5324, 24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE17",
"Position": [ -0.1429, 0.2628, 1.5723],
"Rotation": [ 118.5324, 14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE18",
"Position": [ -0.0777, 0.2628, 1.7929],
"Rotation": [ 106.4676, -24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE19",
"Position": [ -0.2628, -0.1429, 1.5723],
"Rotation": [ -151.4676, 14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE20",
"Position": [ -0.1429, -0.0777, 1.3872],
"Rotation": [ -151.4676, 40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE21",
"Position": [ -0.2628, 0.1429, 1.7277],
"Rotation": [ 151.4676, -14.1095, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE22",
"Position": [ -0.1429, 0.0777, 1.9128],
"Rotation": [ 151.4676, -40.3759, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
},
{
"Name":"camE23",
"Position": [ -0.0777, -0.2628, 1.5071],
"Rotation": [ -106.4676, 24.8121, 0.0000],
"Depthmap": ,
"Background": ,
"Rmin": 0.50,
"Rmax": 25.00,
"Resolution": [,],
"Hor_range": [ -90.0, +90.0 ],
"Ver_range": [ -90.0, +90.0 ]
}
]
}
---------------------
作者:桑来93
来源:CSDN
原文:https://blog.csdn.net/qjh5606/article/details/82017962
版权声明:本文为博主原创文章,转载请附上博文链接!

jsonlab-1.5

链接:https://pan.baidu.com/s/1dZBi5j04dMLW3huxY8uhvQ
提取码:o909
  嗯,希望对有需要的有帮助!

matlab json文件解析 需要下载一个jsonlab-1.5的更多相关文章

  1. Json文件解析(上)

    Json文件解析(上) 代码地址:https://github.com/nlohmann/json 自述文件 alt=GitHub赞助商 data-canonical-src="https: ...

  2. Golang Json文件解析为结构体工具-json2go

    代码地址如下:http://www.demodashi.com/demo/14946.html 概述 json2go是一个基于Golang开发的轻量json文件解析.转换命令行工具,目前支持转换输出到 ...

  3. Json文件解析(下)

    Json文件解析(下) 代码地址:https://github.com/nlohmann/json   从STL容器转换 任何序列容器(std::array,std::vector,std::dequ ...

  4. PHP JSON文件解析并获取key、value,判断key是否存在

    /****************************************************************************** * PHP JSON文件解析并获取key ...

  5. 【微信】微信小程序 微信开发工具中新创建的json文件,编译报错VM1781:2 pages/module/module.json 文件解析错误 SyntaxError: Unexpected end of JSON input

    如果新创建报错:编译报错VM1781:2 pages/module/module.json 文件解析错误  SyntaxError: Unexpected end of JSON input 解决方法 ...

  6. 如何:执行大型 XML 文档的流式转换 大XML文件解析入库的一个方法

    w Parsing Huge XML Files Incrementally http://pclib.github.io/safari/program/python-cookbook/Text/ch ...

  7. NPOI+Json文件解析Excel

    记点笔记,加深印象!最近有个导入Excel工能需要完成,Excel列名是中文的,导入Excel我用的NPOI插件,如果不对Excel做解析,列名有可能会给我带来一些字符方面的麻烦,于是想到了一个比较l ...

  8. Twaver的mono-desiner导出的json文件解析

    以画的交换机为例,其他大概都差不多. 利用Twaver做出交换机模型如图1所示,其中,每一个端口都是一个单独的对象.具体Twaver操作流程参见网址:http://twaver.servasoft.c ...

  9. HBuilder开发移动App——manifest.json文件解析

    以前做过Android App开发,对于各项配置都是在AndroidManifest.xml文件中完成的,包括权限的设定.图标.标签.App的名字.Activity注册等等 使用HBuilder开发移 ...

随机推荐

  1. leecode第二百九十二题(Nim游戏)

    class Solution { public: bool canWinNim(int n) { )==)//用与的时候,要注意优先级问题 //用n%4==0的时候,其耗时比用&短,但是空间消 ...

  2. Evaluate X and Y returned from the differential equation solvers using printput frequency in Python的代码

    把内容过程中经常用到的一些内容段做个备份,如下的内容是关于Evaluate X and Y returned from the differential equation solvers using ...

  3. 使用querybuilder做忽略大小写查询的例子

    自定义Predicate: import com.day.cq.search.Predicate; import com.day.cq.search.eval.AbstractPredicateEva ...

  4. CycleGan论文笔记

    原文地址:https://arxiv.org/abs/1703.10593 背景——风格迁移 图片生成领域是GAN网络的天下,最近很多人将GAN网络应用到了图像风格迁移领域.这篇论文也是做image ...

  5. 常见程序入口点(OEP)特征

    delphi: 55            PUSH EBP  8BEC          MOV EBP,ESP  83C4 F0       ADD ESP,-10  B8 A86F4B00   ...

  6. java 动态增/减集合元素

    1. 简介 有时候需要在集合遍历过程中进行增/删,下面介绍几种正确的操作方式. 2. 示例 例如有如下集合[1, 2, 2, 3, 5],需要删除被2整除的元素. import java.util.* ...

  7. python----常见练习题

    1. 冒泡排序 def bubble_sort(lists): len_list=len(lists) for i in range(len_list): for j in range(len_lis ...

  8. 牛客网暑期ACM多校训练营(第七场)Bit Compression

    链接:https://www.nowcoder.com/acm/contest/145/C 来源:牛客网 题目描述 A binary string s of length N = 2n is give ...

  9. 使用MobaXterm远程连接Ubuntu,启动Octave,界面不能正常显示

    使用MobaXterm远程连接Ubuntu,启动Octave,界面不能正常显示,键盘输入无法显示,解决方法如下. 在启动octave之前,输入这两个命令: export GTK_MODULES=gai ...

  10. Qt 适合做界面

    确实感觉的Qt的界面开发相比MFC方便了许多,不用为设计和实现窗口烦恼.不需要太细研究界面的实现,从Qt自带的例子中就能轻松学习和应用.在界面开发上Qt的实用比MFC前进了许多.做C++开发不管怎样如 ...