# Camera Fault Injection Tool
![Documentation](https://img.shields.io/badge/Docs-http%3A%2F%2Fwiki.ros.org%2Fcamfitool%2F-brightgreen)

![current_version](https://img.shields.io/github/v/release/inomuh/camfitool?color=green) ![last_commit](https://img.shields.io/github/last-commit/inomuh/Camera-Fault-Injection-Tool?color=green) ![tool version](https://img.shields.io/badge/version-standart-blue) ![repo_size](https://img.shields.io/github/repo-size/inomuh/Camera-Fault-Injection-Tool) ![Apache-2.0 License](https://img.shields.io/github/license/inomuh/Camera-Fault-Injection-Tool?color=blue) ![lang](https://img.shields.io/github/languages/top/inomuh/camfitool)

This tool is a simple interface that allows injection of image faults into robot cameras. Thanks to this interface, you can create new image libraries by injecting the fault types you have determined, both real-time to TOF and RGB type ROS cameras, and to the image libraries previously recorded by these cameras. For more information about the purpose of this tool: https://arxiv.org/abs/2108.13803

Developed by Alim Kerem Erdogmus from Inovasyon Muhendislik (c) 2021

#### !!! THIS IS ALPHA VERSION. FOR STABLE CAMFITOOL VERSION, PLEASE INSTALL FROM GITHUB REPOSITORY. !!!

For More Details:

ROS Wiki page: http://wiki.ros.org/camfitool

Github repository: https://github.com/inomuh/camfitool

    
![Camera Fault Injector Tool Offline FI Configuration](https://github.com/inomuh/Camera-Fault-Injector-Tool/blob/v1.2/camfitool_v1.2_offline.png?raw=True)


![Camera Fault Injector Tool Realtime FI Configuration](https://github.com/inomuh/Camera-Fault-Injector-Tool/blob/v1.2/camfitool_v1.2_realtime.png?raw=True)

### Tool Features (in v1.2)
---------------------------
- You can apply the faults you choose in the configuration menu to the images in the image library you want, and save these wrong images to the folder you want. So you can create your faulty image library.
- You can apply these faults to all images as well as to a random number of images, creating a mixed library of faulty images without touching the remaining images (only offline fault application).
- You can save the configuration of the fault you have applied, and view the fault plans you have saved as you wish.
- You can specify the rate of fault to be applied.
- Three different fault types can be applied offline to images (with .bmp extension) obtained from TOF camera and six different fault types can be applied offline to images (with .png/.jpg extension) obtained from RGB camera.
- For now, six different fault types can be applied real-time stream obtained from RGB camera (TOF Realtime FI will be added).
- You can use the ROS Noetic version (noetic-version) or the standard version (current v1.2.3).
- You can monitor the ROS Camera node.
- You can specify the rate of real-time fault injecting frequency to be applied.

---

![Camera Fault Injector Tool Realtime FI Applying Demonstration](https://github.com/inomuh/Camera-Fault-Injector-Tool/blob/v1.2/camfitool_v1.2_realtime_openfi_applying.png?raw=True)


### Installation

You can install CamFITool with PyPi

	pip3 install camfitool

or you can install from Github repository

	git clone https://github.com/inomuh/camfitool


For trying ROS package version of CamFITool:

    git clone https://github.com/inomuh/camfitool -b noetic-version

### For Using CamFITool

	python3 -m camfitool

### License

See the [LICENSE](LICENSE.md) file for license rights and limitations (Apache-2.0 Licence).

