- Increase brightness by ‘value' (Go to code)
- Decrease brightness by ‘value’ (Go to code)
- Binarize using ‘threshold’ (Go to code)
- Invert image (Go to code)
Further, the team completed the original task and performed more applications –
- Sharpen (Go to code)
- Noise Reduction (Blur) (Go to code)
- Edge detection (Go to code)
Image processing is an inseparable part of robotics. To make better robots that can see their surroundings well, we require processing the incoming image to output a better and more clarified image that is well understood by the robots for its task and therefore results in a better functioning robot. Image processing, such as edge detection and noise reduction, is beneficial for rovers and drones.
Python - is an interpreted, object-oriented, high-level programming language with dynamic semantics. It's high-level built-in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components. Python supports modules and packages, which encourages program modularity and code reuse.
Verilog-Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction.
Xilinx Vivado-Vivado Design Suite is a software suite produced by Xilinx for synthesis and analysis of hardware description language designs, superseding Xilinx ISE with additional features for system on a chip development and high-level synthesis. Vivado represents a ground-up rewrite and re-thinking of the entire design flow. It is the software used to code the FPGA board.
TestBench- A testbench is code module that uses hardware description languages (HDL) to describe the stimulus to a logic design and check whether the design's outputs match its specification. In order to check if the code will work perfectly with the FPGA board we first upload the code to a testbench and verify its output.
VS Code-Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.
OpenCV-OpenCV is a library of programming functions mainly aimed at real-time computer vision. It was originally developed by Intel and later supported by Willow Garage, then Itseez. The library is cross-platform and free for use under the open-source Apache 2 License.
- Convert the original image to a binary file with the help of python via OpenCV and VS code.
- Open vivado and add input variables such as value, threshold, select state, and file paths to the testbench file.
- Run the simulation for some time.
- Now close the simulation and check the folder. An ouput binary file would be created.
- Convert the output binary file to an image via python again.
- We get the processed image.
We use an FPGA board with five inputs and one output. Five inputs are-
clk (1 bit) [Clock signal]
inbyte (8 bits) [Grayscale value of input pixel]
select (2 bits) [Select state to toggle functions]
value (8 bits) [value by which the inbyte changes]
threshold (8 bits) [threshold for binarising image]
And the output is the outbyte containing the processed pixel value. Rest all the parts, including image processing and input/output, are all done in the HDL code