当前位置:网站首页>Eth data set download and related problems
Eth data set download and related problems
2022-07-02 17:14:00 【LBJ_ wz】
ETH Dataset Download
Existing problems
I try to visualize the data , Because the data given by the data set is the data in the world coordinate system , We hope to show it in the picture , That is, to convert the world coordinate system to the pixel coordinate system . according to H.txt But after the transformation of the movie star matrix given in , The following problems were found
The code is as follows :
class A:
def __init__(self):
self.h11 = 1.1048200e-02
self.h12 = 6.6958900e-04
self.h13 = -3.3295300e+00
self.h21 = -1.5966000e-03
self.h22 = 1.1632400e-02
self.h23 = -5.3951400e+00
self.h31 = 1.1190700e-04
self.h32 = 1.3617400e-05
self.h33 = 5.4276600e-01
self.P = np.array([
[self.h11,self.h12,self.h13],
[self.h21,self.h22,self.h23],
[self.h31,self.h32,self.h33]
])
self.P1 = inv(self.P)
def transform_coordinate(self, point):
# Input pixels , Back to world coordinates
x, y = point
x_ = (self.h11*x + self.h12*y + self.h13)/(self.h31*x + self.h32*y + self.h33)
y_ = (self.h21*x + self.h22*y + self.h23)/(self.h31*x + self.h32*y + self.h33)
return (x_,y_)
def w_to_p(self,point):
point_ = np.append(point,1)
p_point_ = np.matmul(self.P1,point_)
p_point_ /= p_point_[-1]
return p_point_[:-1]
among transform_coordinate,w_to_p Methods are pixel coordinates to world coordinates and world coordinates to pixel coordinates .
We execute the following visualization code , take obsmat.txt Visualize the first frame data in
file_path = r"./ewap_dataset/seq_hotel/obsmat.txt"
data = pd.read_csv(file_path,header=None,sep='\s+',names=["frame_number", "human_id", "pos_x", "pos_z", "pos_y", "v_x", "v_z", "v_y" ])[["frame_number", "human_id", "pos_x", "pos_y"]]
data1 = data[data["frame_number"]==1]
a = A()
w_ps = []
for i,row in data1.iterrows():
point = np.array([row["pos_x"], row["pos_y"]])
w_p = a.w_to_p(point)
w_ps.append(w_p)
import cv2
img_path = r"./ewap_dataset/seq_hotel/jpg/1.jpg"
img = cv2.imread(img_path) # Read the picture
for i in w_ps:
cv2.circle(img, (int(i[0]), int(i[1])), 10, (0, 0, 255))
The output picture is as follows :
It doesn't feel right …… But the code has been read many times without any problem .
According to the advice of elder martial sister, I found that x,y Change the position to output correctly
file_path = r"./ewap_dataset/seq_hotel/obsmat.txt"
data = pd.read_csv(file_path,header=None,sep='\s+',names=["frame_number", "human_id", "pos_x", "pos_z", "pos_y", "v_x", "v_z", "v_y" ])[["frame_number", "human_id", "pos_x", "pos_y"]]
data1 = data[data["frame_number"]==1]
a = A()
w_ps = []
for i,row in data1.iterrows():
point = np.array([row["pos_x"], row["pos_y"]])
w_p = a.w_to_p(point)
w_ps.append(w_p)
import cv2
img_path = r"./ewap_dataset/seq_hotel/jpg/1.jpg"
img = cv2.imread(img_path) # Read the picture
for i in w_ps:
cv2.circle(img, (int(i[1]), int(i[0])), 10, (0, 0, 255))
Then the data here should be wrong , Or the homography matrix is wrong . Personal feeling , If you know the boss, please correct !!
边栏推荐
- 【Leetcode】13. 罗马数字转整数
- Tech Talk 活动预告 | 基于Amazon KVS打造智能视觉产品
- Understand one article: four types of data index system
- IP地址转换地址段
- Qstype implementation of self drawing interface project practice (II)
- Just a coincidence? The mysterious technology of apple ios16 is even consistent with the products of Chinese enterprises five years ago!
- 亚马逊云科技 Community Builder 申请窗口开启
- 上传代码到远程仓库报错error: remote origin already exists.
- Detailed explanation of @accessories annotation of Lombok plug-in
- MOSFET器件手册关键参数解读
猜你喜欢
深度之眼(二)——矩阵及其基本运算
AP and F107 data sources and processing
2020 "Lenovo Cup" National College programming online Invitational Competition and the third Shanghai University of technology programming competition (a sign in, B sign in, C sign in, D thinking +mst
QWebEngineView崩溃及替代方案
福元医药上交所上市:市值105亿 胡柏藩身价超40亿
綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
Sword finger offer 25 Merge two sorted linked lists
871. 最低加油次数
配置基于接口的ARP表项限制和端口安全(限制用户私自接入傻瓜交换机或非法主机接入)
john爆破出現Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
随机推荐
The computer comes with software to make the background color of the picture transparent (matting white background)
GeoServer:发布PostGIS数据源
Vscode setting delete line shortcut [easy to understand]
一年顶十年
Un an à dix ans
[shutter] dart data type (dynamic data type)
OpenHarmony如何启动远程设备的FA
Configure ARP table entry restrictions and port security based on the interface (restrict users' private access to fool switches or illegal host access)
vscode设置删除行快捷键[通俗易懂]
Detailed explanation of @accessories annotation of Lombok plug-in
剑指 Offer 25. 合并两个排序的链表
R及RStudio下载安装教程(超详细)
ThreadLocal
JS delete substring in string
Geoserver: publishing PostGIS data sources
上传代码到远程仓库报错error: remote origin already exists.
Notice on holding a salon for young editors of scientific and Technological Journals -- the abilities and promotion strategies that young editors should have in the new era
博客主题 “Text“ 夏日清新特别版
Seven charts, learn to do valuable business analysis
国内比较好的OJ平台[通俗易懂]