up
For Example: `sudo ifconfig enp23s0 192.168.0.10 up`
- On Windows : Set from network settings – IPv4 IP
b). To change the MTU Size, follow the procedure as mentioned below:
- For ubuntu : sudo ifconfig <10G network interface> mtu 9014 up
For Example: `sudo ifconfig enp23s0 mtu 9014 up`
- For Windows :
* Go to settings, navigate to control panel, and select **Network and Sharing Centre**,
* Select **Change adapter settings**,
* Right click on the NIC interface on which the place to enable Jumbo Frames and select **Properties**,
* From the NIC properties, select **Configure**,
* Click on **Advanced** tab,
* In Advanced section, select **Jumbo Frame**,
* In the Value field **Value** – select 9KB MTU s.
c). Sphinx GEV Viewer GUI start-up window should look something like below image. If all the control elements are not
visible, you can reduce the size of text, apps and other items in the Display settings.
![GUI-Window](./media/GUI-Window.JPG)
d). On the Sphinx GUI click on `Discovery` to establish a connection from KR260 over SFP. Then click on
Discovery --> Open
![Sphinx_Discovert](./media/Sphinx_Discovery.JPG)
e). To get the maximum fps in the Sphinx GUI, you can change the draw value in Sphinx --> Options based on the host type (windows or ubuntu)
- On ubuntu host,
For 60 fps, set the draw value to `10`.
For 120 fps, set the draw value to `50`.
- On windows host,
For 60/120 fps, set the draw value to `10`.
![Sphinx GE Viewer](media/Sphinx_GE_Viewer.png)
f). Download [xgvrd-kr260.xml](https://github.com/Xilinx/mv-defect-detect/blob/xlnx_rel_v2022.1/10gige/application/xgvrd-kr260.xml) into the host machine. In sphinx GEV viewer application, set the downloaded xml file path in the GUI.
g). In Sphinx host application, select *Use filter Driver* checkbox, and *Grab* checkbox to capture the frames from KR260 10GigE network.
## Sphinx GEV Viewer Observations
* For 60 fps on a Monochrome Sensor
![60fps_mono](./media/60fps_Mono.png)
* For 120 fps on a Monochrome Sensor
![120fps_mono](./media/120fps_Mono.JPG)
**NOTE**: You will record ~40-50 fps for a 60 fps pipeline and ~90-100 fps for a 120 fps pipeline.
## Running the MV-Defect-Detect Application
Follow the procedure mentioned below to invoke the MV-Defect-Detect application: command line.
To view the mv-defect-detect output on the display, disable the alpha plane using the following command.
```bash
modetest -D fd4a0000.display -s 43@41:1920x1080-60@BG24 -w 40:"alpha":0
modetest -D fd4a0000.display -s 43@41:1920x1080-60@BG24 -w 40:"g_alpha_en":0
```
### Command Line
Use the command line to set the resolution, configuration file path, and more, using the **mv-defect-detect** application.
More combinations could be made based on the options provided by the **mv-defect-detect** application.
***Note***: 'demomode' application option is not supported for File sink. It is only supported for live out.
MV-Defect-Detect Application Usage
```bash
mv-defect-detect --help
```
Usage:
```bash
mv-defect-detect [OPTION?] - Application to detect the defect of Mango on the AMD board.
```
Help Options:
```bash
-?, --help Show help options
--help-all Show all help options
--help-gst Show GStreamer Options
```
Application Options:
```bash
-i, --infile=file path Location of input file
-f, --outfile=file path Location of output file
-w, --width=1920 Resolution width of the input
-h, --height=1080 Resolution height of the input
-o, --output=0 Display/dump stage on DP/File
-r, --framerate=60 Framerate of the input source
-d, --demomode=0 For Demo mode value must be 1
-c, --cfgpath=/opt/xilinx/xlnx-app-kr260-mv-defect-detect/share/vvas/ JSON config file path
```
The application is targeted to run an input source that supports GRAY8 (Y8) format with a resolution of **1920x1080**.
Once done with the MV-Defect-Detect application, To switch to another accelerator application after mv-defect-detect application, first exit the docker container using ```exit```, then unload the firmware by running the below command:
```bash
sudo xmutil unloadapp
```
### Command Examples
**Examples:** Follow the below examples for different use cases of the above mentioned command options.
***Note***: Only one instance of the application can run at a time.
* For File-In and File-Out mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -i input.y8 -o 0 -f out_raw.y8` | Raw output dumps into file.
`mv-defect-detect -i input.y8 -o 1 -f out_preproc.y8` | Pre-process output dumps into file.
`mv-defect-detect -i input.y8 -o 2 -f out_final.y8` | Final output dumps into file.
***Note***: File-In and File-Out demo mode is not supported.
* For File-In and Display-Out mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -i input.y8` | Raw output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 0` | This command is same as the above command. Raw output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 1` | Preprocess output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 2` | Final output displays on DP. Input file path should change as per the requirement.
* For File-In and Display-Out demo mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -i input.y8 -d 1` | Raw output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 0 -d 1` | This command is same as the above command. Raw output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 1 -d 1` | Preprocess output displays on DP. Input file path should change as per the requirement.
`mv-defect-detect -i input.y8 -o 2 -d 1` | Final output displays on DP. Input file path should change as per the requirement.
* For Live-In and File-Out mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -o 0 -f out_raw.y8` | Raw output dumps into file.
`mv-defect-detect -o 1 -f out_preproc.y8` | Preprocess output dumps into file.
`mv-defect-detect -o 2 -f out_final.y8` | Final output dumps into file.
***Note***: Live-In and File-Out demo mode is not supported.
* For Live-In and Display-Out mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -o 0` | Raw output displays on DP.
`mv-defect-detect -o 1` | Preprocess output displays on DP.
`mv-defect-detect -o 2` | Final output displays on DP.
* For Live-In and Display-Out mode, run the following command.
Command | Description
------------- | -------------
`mv-defect-detect -o 0 -d 1` | Raw output displays on DP.
`mv-defect-detect -o 1 -d 1` | Preprocess output displays on DP.
`mv-defect-detect -o 2 -d 1` | Final output displays on DP.
### **Sensor Calibration for the Live Source**
You can use v4l2 utilities to tune various sensor parameters. For example:
`v4l2-ctl -d /dev/v4l-subdev0 -c exposure=10000`
`v4l2-ctl -d /dev/v4l-subdev0 -c black_level=150`
`v4l2-ctl -d /dev/v4l-subdev0 -c gain=250`
### **File Structure of the MV-Defect-Detect Application**
The application is comprised of the following files:
Below files are present in the *app* directory:
`/opt/xilinx/xlnx-app-kr260-mv-defect-detect/`
| File name | Description |
|-------------------|-----------------------------------------------|
| bin/ | Contains the binaries for MV-Defect-Detect application |
| lib/ | Contains the shared libraries for MV-Defect-Detect application |
| share/vvas/ | Contains the configuration files for vvas accelerators |
| README_MV_DEFECT_DETECT | Contains the application information |
Below files are present in bin directory:
`/opt/xilinx/xlnx-app-kr260-mv-defect-detect/bin/`
| File name | Description |
|-----------------------|--------------------------------------------------------|
| update_atable | Application to create config file atable |
| update_eeprom | Application to create config file eeprom |
| alloc_table.bin | Data file used by update_atable application |
| zcip | Zero configure network interface to configure IPv4 |
| zcip.script | Used for ZeroConf IPv4 link-local address (the "auto ip aliasing" feature) |
| xgvrd-kr260.xml | xml containing the GenICam register description |
| gvrd | Application executable |
| eeprom.bin | Data file used by update_eeprom application |
| configure | Script to configure media nodes and IPs in capture path |
| update_eeprom_wrapper | Wrapper file to configure 10GigE pipeline |
| mv-defect-detect | Binary for mv-defect-detect application |
Below files are present in *lib* directory:
`/opt/xilinx/xlnx-app-kr260-mv-defect-detect/lib/`
| File name | Description |
|-------------------|-----------------------------------------------|
| libgigev.so.2.0.1 | Contains the GigE Vision core firmware |
| libgigev.so.2.0 | Contains the symbolic link to libgigev.so.2.0.1 |
| libgigev.so | Contains the Symbolic link to libgigev.so.2.0 |
| libvvas_preprocess.so | vvas pre-process accelarator library|
| libvvas_otsu.so | vvas OTSU accelerator library |
| libvvas_cca.so | vvas CCA accelerator library |
| libvvas_text2overlay.so | vvas text2overlay library |
The following files are present in the *vvas* directory:
`/opt/xilinx/xlnx-app-kr260-mv-defect-detect/share/vvas/`
| File name | Description |
|-----------------------|--------------------------------------------------------|
| cca-accelerator.json | Configuration of CCA accelerator |
| otsu-accelarator.json | Configuration of OTSU accelerator |
| preprocess-accelarator.json | Configuration of pre-process accelarator |
| preprocess-accelarator-stride.json | Configuration of pre-process accelarator with stride |
| text2overlay.json | Configuration of text2overlay |
## Next Steps
- [System Architecture of the Platform](sw_arch_platform_dd.md)
- Go back to the [MV Camera 10GigE](10gige.md)
Copyright© 2023 Advanced Micro Devices, Inc.