mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 13:32:04 +08:00
Remove get_model_yuv_transform function (#28568)
* remove yuv_transform from update_calibration * Remove get_model_yuv_transform entirely
This commit is contained in:
@@ -33,14 +33,3 @@ const mat3 fcam_intrinsic_matrix = (mat3){{2648.0, 0.0, 1928.0 / 2,
|
||||
const mat3 ecam_intrinsic_matrix = (mat3){{567.0, 0.0, 1928.0 / 2,
|
||||
0.0, 567.0, 1208.0 / 2,
|
||||
0.0, 0.0, 1.0}};
|
||||
|
||||
static inline mat3 get_model_yuv_transform() {
|
||||
float db_s = 1.0;
|
||||
const mat3 transform = (mat3){{
|
||||
1.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 1.0
|
||||
}};
|
||||
// Can this be removed since scale is 1?
|
||||
return transform_scale_buffer(transform, db_s);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,7 @@ mat3 update_calibration(Eigen::Vector3d device_from_calib_euler, bool wide_camer
|
||||
for (int i=0; i<3*3; i++) {
|
||||
transform.v[i] = warp_matrix(i / 3, i % 3);
|
||||
}
|
||||
static const mat3 yuv_transform = get_model_yuv_transform();
|
||||
return matmul3(yuv_transform, transform);
|
||||
return transform;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,8 +82,6 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s,
|
||||
rgb_width = ci->frame_width;
|
||||
rgb_height = ci->frame_height;
|
||||
|
||||
yuv_transform = get_model_yuv_transform();
|
||||
|
||||
int nv12_width = VENUS_Y_STRIDE(COLOR_FMT_NV12, rgb_width);
|
||||
int nv12_height = VENUS_Y_SCANLINES(COLOR_FMT_NV12, rgb_height);
|
||||
assert(nv12_width == VENUS_UV_STRIDE(COLOR_FMT_NV12, rgb_width));
|
||||
|
||||
@@ -91,8 +91,6 @@ public:
|
||||
std::unique_ptr<FrameMetadata[]> camera_bufs_metadata;
|
||||
int rgb_width, rgb_height, rgb_stride;
|
||||
|
||||
mat3 yuv_transform;
|
||||
|
||||
CameraBuf() = default;
|
||||
~CameraBuf();
|
||||
void init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType yuv_type);
|
||||
|
||||
@@ -1242,10 +1242,6 @@ void process_road_camera(MultiCameraState *s, CameraState *c, int cnt) {
|
||||
framed.setImage(get_raw_frame_image(b));
|
||||
}
|
||||
LOGT(c->buf.cur_frame_data.frame_id, "%s: Image set", c == &s->road_cam ? "RoadCamera" : "WideRoadCamera");
|
||||
if (c == &s->road_cam) {
|
||||
framed.setTransform(b->yuv_transform.v);
|
||||
LOGT(c->buf.cur_frame_data.frame_id, "%s: Transformed", "RoadCamera");
|
||||
}
|
||||
|
||||
if (c->camera_id == CAMERA_ID_AR0231) {
|
||||
ar0231_process_registers(s, c, framed);
|
||||
|
||||
Reference in New Issue
Block a user