FCB-EV7500 Camera with MIPI Interface

hi,
Recentlly,we build a system:a FCB-EV7500 Camera connect to TX2 with MIPI interface it is used to input data.I wonder how can I get the image data in my program.
I used to get data in the Jetson board with the following code:

#include <opencv2/opencv.hpp>

std::string get_tegra_pipeline(int width, int height, int fps) {
    return "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)" + std::to_string(width) + ", height=(int)" +
            std::to_string(height) + ", format=(string)I420, framerate=(fraction)" + std::to_string(fps) +
            "/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
}

int main() {
    // Options
    int  WIDTH = 1920;
    int  HEIGHT = 1080;
    int FPS = 30;

    // Define the gstream pipeline
    std::string pipeline = get_tegra_pipeline(WIDTH, HEIGHT, FPS);
    std::cout << "Using pipeline: \n\t" << pipeline << "\n";

    // Create OpenCV capture object, ensure it works.
    cv::VideoCapture cap(pipeline, cv::CAP_GSTREAMER);
    if (!cap.isOpened()) {
        std::cout << "Connection failed";
        return -1;
    }

    // View video
    cv::Mat frame;
    while (1) {
        cap >> frame;  // Get a new frame from camera

        // Display frame
        imshow("Display window", frame);
        cv::waitKey(1); //needed to show frame
    }
}

Will this still work in my own board and camera.

You have make sure your sensor driver working will first. Try the gst-launch-1.0 pipeline first.

hi,
I’d like to check my camera with

v4l2-ctl --all -d /dev/video0

but it tells me “]v4l2-ctl :command not found”.

Besides,should I add the camera driver by myself,if that are there any reference?

You need install it by v4l-utils by sudo apt-get install v4l-utils.
Please find the sensor programing guide in the l4t document from download center.

https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-2-ga

Hi,ShaneCCC
Maybe I need not configure or add the camera driver.
The camera is connect to FPGA directly and FPGA output the image data by MIPI interface, what should I do is find a way to get data from the MIPI interface.

You exactly need to implement a driver for your FPGA.

I can not understand what do you mean.
FPGA can get data from the camera and it changed to mipi interface output.
I do not konw how to get the data from the mipi interface.Does opencv can work?

You can’t do anything before to implement a MIPI driver to tell tegra what’s the FPGA configure.

A driver for FPGA?
How can I add the driver and validate whether it works or not?
Are there any samples?
Maybe like this

imx185_a@1a {
compatible = "nvidia,imx185";
	reg = <0x1a>;
	devnode = "video0";
	physical_w = "15.0";
	physical_h = "12.5";
	sensor_model ="imx185";
	post_crop_frame_drop = "0";
	use_decibel_gain = "true";
	delayed_gain = "true";
	use_sensor_mode_id = "true";
 
	mode0 {
		mclk_khz = "37125";
		num_lanes = "4";
		tegra_sinterface = "serial_a";
		discontinuous_clk = "no";
		dpcm_enable = "false";
		cil_settletime = "0";
		dynamic_pixel_bit_depth = "12";
		csi_pixel_bit_depth = "12";
		mode_type = "bayer";
		pixel_phase = "rggb";
 
		active_w = "1920";
		active_h = "1080";
		readout_orientation = "0";
		line_length = "2200";
		inherent_gain = "1";
		mclk_multiplier = "2";
		pix_clk_hz = "74250000";
 
		min_gain_val = "0"; /* dB */
		max_gain_val = "48"; /* dB */
		min_hdr_ratio = "1";
		max_hdr_ratio = "1";
		min_framerate = "1.5";
		max_framerate = "30";
		min_exp_time = "30";
		max_exp_time = "660000";
		embedded_metadata_height = "1";
	};
	…
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <0>;
			liimx185_imx185_out0: endpoint {
			csi-port = <0>;
			bus-width = <4>;
			remote-endpoint = <&liimx185_csi_in0>;
		};
	};
};

It’s for camera or for FPGA?

Please find the sensor programing guide in the l4t document from download center.

https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-2-ga