Skip to content

[Dataset] [ASE] - can't get rgb values of points from semidense_observations.csv.gz #229

@liuyu19970607

Description

@liuyu19970607

In our setting ,we want to get the rgb values of the semi dense points. We preprocess the semidense_observations.csv.gz like this, but the rgb value is wrong:

`observe_df = pd.read_csv(observe_file_path, compression='gzip')
point_df = pd.read_csv(point_file_path, compression='gzip')
merged_df = pd.merge(observe_df, point_df, on='uid', how='inner')

points = merged_df[['px_world', 'py_world', 'pz_world']].values
uvs = merged_df[["frame_tracking_timestamp_us", 'u', 'v']].values
uvs[:, 0] = uvs[:, 0] // 1e5
uvs = uvs.astype(int)

rgbs = []
rgb_path_list = os.listdir(rgb_path)
rgb_path_list.sort()
for rgb_name in rgb_path_list:
if not rgb_name.endswith(".jpg"): continue
rgb = cv2.imread(os.path.join(rgb_path, rgb_name))
rgb = cv2.cvtColor(rgb, cv2.COLOR_BGR2RGB)
rgbs.append(rgb)
rgbs = np.stack(rgbs)
colors = rgbs[uvs[:, 0], uvs[:, 1] , uvs[:, 2]]`

Image

looking forward for your reply, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions