当前位置:网站首页>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 !!
边栏推荐
- Amazon cloud technology community builder application window opens
- 剑指 Offer 25. 合并两个排序的链表
- How to transfer business data with BorgWarner through EDI?
- 酒仙网IPO被终止:曾拟募资10亿 红杉与东方富海是股东
- The impact of telecommuting on all aspects of our experience | community essay solicitation
- Flutter: 动作反馈
- AP and F107 data sources and processing
- 电脑自带软件使图片底色变为透明(抠图白底)
- Deep learning image data automatic annotation [easy to understand]
- Jiuxian's IPO was terminated: Sequoia and Dongfang Fuhai were shareholders who had planned to raise 1billion yuan
猜你喜欢

QStyle实现自绘界面项目实战(二)

智能垃圾桶(五)——点亮OLED

【Leetcode】14. Longest Common Prefix

Interpretation of key parameters in MOSFET device manual

Easy language ABCD sort

Connect Porsche and 3PL EDI cases

Sword finger offer 22 The penultimate node in the linked list

871. Minimum refueling times

电脑自带软件使图片底色变为透明(抠图白底)

DigiCert SSL证书支持中文域名申请吗?
随机推荐
Dgraph: large scale dynamic graph dataset
QStyle实现自绘界面项目实战(二)
Role and function of uboot
Just a coincidence? The mysterious technology of apple ios16 is even consistent with the products of Chinese enterprises five years ago!
【Leetcode】13. Roman numeral to integer
C语言中sprintf()函数的用法
AP and F107 data sources and processing
[shutter] dart data type (dynamic data type)
学习周刊-总第60期-2022年第25周
伟立控股港交所上市:市值5亿港元 为湖北贡献一个IPO
远程办公对我们的各方面影响心得 | 社区征文
Tech talk activity preview | building intelligent visual products based on Amazon kVs
[error record] error -32000 received from application: there are no running service protocol
Baobab's gem IPO was terminated: Tang Guangyu once planned to raise 1.8 billion to control 47% of the equity
移动应用性能工具探索之路
[cloud native] briefly talk about the understanding of flume, a massive data collection component
Qwebengineview crash and alternatives
【Leetcode】14. 最長公共前綴
人生的开始
ThreadLocal