工具/软件:
您好、
该计划需要得到执行。
相机 (v4l2-1920x1080 /dev/video2 @ UYVY) --> tiovx -> csiTX --> max96717f;
请提供相关文档和代码示例。
此致、
Cesar
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好 、Brijesh、
1.我们没有 JTAG、然后放弃这种裸机方法。
2.返回 vision app --/opt/vision_apps/vx_app_conformance_video_io.out --filter=tivxVideoIOCsitxCsirx*
现在示波器可以测量该信号、但 96717 无法检测到该信号;
可以在 CSITx 中调整哪些时序或参数。
此致、
Cesar
您好 、Brijesh、
1. 现在显示图像,但由于图像尚未初始化,显示的图像如下
assert_vx_object (csitx_image_examplear = vxCreateImage(上下文,宽度,高度,vx_DF_image_UYVY)、vx_type_image);

2.现在我们要通过读取文件图像来显示它
vx_image read_uyvy_file_to_vx_image(vx_context context, const char* filename, vx_uint32 width, vx_uint32 height)
{
vx_status status = VX_SUCCESS;
FILE* file = NULL;
vx_image image = NULL;
vx_map_id map_id = 0;
void* image_data = NULL;
vx_size data_size = width * height * 2;
file = fopen(filename, "rb");
image = vxCreateImage(context, width, height, VX_DF_IMAGE_UYVY);
vx_rectangle_t rect = {0, 0, width, height};
vx_size plane_index = 0;
vx_imagepatch_addressing_t addr;
vxMapImagePatch(image, &rect, 0, &map_id, &addr, &image_data, VX_READ_ONLY, VX_MEMORY_TYPE_HOST, 0);
fread(image_data, 1, data_size, file);
vxUnmapImagePatch(image, map_id);
fclose(file);
return image;
}
vx_image uyvy_image = read_uyvy_file_to_vx_image(graph.tiovx_context, "/mnt/1920x1080_vertical.yuv", 1920, 1080);
//Consistent with the input image
save_uyvy_image_to_file(uyvy_image, "/mnt/1920x1080_vertical_verify_ok.yuv");
tx_frame = vxCreateObjectArray(graph.tiovx_context, (vx_reference)uyvy_image, 1);
读取图像:

3.但显示完全没有变化、相反、请验证存储的 TX_FRAME 的图像
vx_status save_uyvy_image_to_file(vx_image image, const char* filename) {
vx_status status = VX_SUCCESS;
vx_map_id map_id = 0;
void* image_data = NULL;
FILE* file = NULL;
if (!image || !filename) {
return VX_ERROR_INVALID_PARAMETERS;
}
vx_uint32 width = 0, height = 0;
vx_df_image format = VX_DF_IMAGE_VIRT;
status = vxQueryImage(image, VX_IMAGE_WIDTH, &width, sizeof(width));
status |= vxQueryImage(image, VX_IMAGE_HEIGHT, &height, sizeof(height));
status |= vxQueryImage(image, VX_IMAGE_FORMAT, &format, sizeof(format));
printf("__________________wxh = %d x %d_______\n", width, height);
if (status != VX_SUCCESS) {
return status;
}
if (format != VX_DF_IMAGE_UYVY) {
return VX_ERROR_INVALID_FORMAT;
}
vx_size data_size = width * height * 2;
file = fopen(filename, "wb");
if (!file) {
return VX_FAILURE;
}
vx_rectangle_t rect = {0, 0, width, height};
vx_size plane_index = 0;
vx_imagepatch_addressing_t addr;
status = vxMapImagePatch(image, &rect, plane_index, &map_id, &addr, &image_data, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST, 0);
if (status != VX_SUCCESS) {
fclose(file);
return status;
}
size_t bytes_written = fwrite(image_data, 1, data_size, file);
if (bytes_written != data_size) {
status = VX_FAILURE;
}
vxUnmapImagePatch(image, map_id);
fclose(file);
return status;
}
ref1 = vxGetObjectArrayItem(tx_frame, 0);
if (!ref1) {
return VX_ERROR_INVALID_REFERENCE;
}
vx_enum ref_type = 0;
status = vxQueryReference(ref1, VX_REFERENCE_TYPE, &ref_type, sizeof(ref_type));
if (status != VX_SUCCESS || ref_type != VX_TYPE_IMAGE) {
return VX_ERROR_INVALID_TYPE;
}
save_uyvy_image_to_file((vx_image)ref1, "/mnt/save_tx_frame_1920x1080.yuv");
保存的图像与未填充数据的图像相同

我想问问题出在哪里
此致、
Cesar
您好、Brijesh、
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <tiovx_modules.h>
#include <tiovx_utils.h>
#define IMAGE_WIDTH 1920
#define IMAGE_HEIGHT 1080
vx_status app_modules_v4l2_capture_test(vx_int32 argc, vx_char* argv[])
{
vx_status status = VX_FAILURE;
vx_context context;
vx_object_array tx_frame = 0;
vx_reference ref = NULL;
context = vxCreateContext();
vx_image uyvy_image = vxCreateImage(context, IMAGE_WIDTH, IMAGE_HEIGHT, VX_DF_IMAGE_UYVY);
readImage("/mnt/1920x1080_vertical.yuv", uyvy_image);
writeImage("/mnt/1920x1080_vertical_verify.yuv", uyvy_image);
tx_frame = vxCreateObjectArray(context, (vx_reference)uyvy_image, 1);
ref = vxGetObjectArrayItem(tx_frame, 0);
if (!ref) {
return VX_ERROR_INVALID_REFERENCE;
}
vx_enum ref_type = 0;
status = vxQueryReference(ref, VX_REFERENCE_TYPE, &ref_type, sizeof(ref_type));
if (status != VX_SUCCESS || ref_type != VX_TYPE_IMAGE) {
return VX_ERROR_INVALID_TYPE;
}
//The result is inconsistent with the read image file
writeImage("/mnt/1920x1080_tx_frame.yuv", (vx_image)ref);
return status;
}
我的常规测试的现象是相同的。 您也能运行一下。
此致、
Cesar
尊敬的 Adam:
1.首先,从图像阵列获取图像,然后填入数据,这样,显示就会生效。
vx_reference g_ref = vxGetObjectArrayItem (TX_frame、0);
create_fill_image (context、(vx_image) g_ref);
2. 然而,当我们将其发送给显示时,我们会提供一个包含已填充数据的 BUF;
这种方法是如何运作的。
此致、
Cesar