Commit 37203f07 authored by Deborah Bambil's avatar Deborah Bambil

Upload New File

parent ff19d00b
# Title: python-extrai-atributos
## Author: Hemerson Pistori
## Summary:
Code in python that extracts several attributes and generates an arff to be processed by weka. The goal is to extract all attributes implemented in OpenCV and in scikit-image.
### Extracted Attributes:
1. Attributes of Color RGB, HSV, Cielab (Mín., Máx., média e Desvio)
2. Shape descriptor, invariant to scale, translation and rotation: 7 Hu moments
3. Texture Attributes - GLCM (contrasts, dissimilarities, homogeneities, asm, energies, correlations)
4. Shape and orientation: HOG
5. Texture Attributes: LPB
## Dependences
### Linux
- kubuntu trusty 14.04.2 TLS
- Python 2.7.6
- scikit-image
- Opencv 2.7
### Windows
- Install [Anaconda](http://continuum.io/downloads) "Contains all dependences".
## Install OpenCV
### Linux
Instructions: [OpenCV-Linux](http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation).
```
$ sudo apt-get install python-opencv
```
### Windows
- [OpenCV-Python](https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html#install-opencv-python-in-windows).
1. Download [Opencv](https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html#install-opencv-python-in-windows)
2. Extract Files for directory.
3. Go file opencv/build/python/2.7.
4. Copy file cv2.pyd para C:/Python27/lib/site-packeges.
5. Open CMD type it python.
6. Type it:
```
>>> import cv2
>>> print cv2.__version__
```
Ok!
## Install scikit-image e arff
```
$ sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose python-pip python-networkx
$ sudo pip install -U scikit-image
```
For upgrad pip
```
$ python -m pip install --upgrade pip setuptools wheel
```
## How to use
- Create a new folder inside the 'date' folder with your image bank
$ cd src
```
- Run the code that extracts attributes by passing the names of your image bank as parameter
```
$ python ./extraiAtributos.py name_your_image_bank
```
- The arff file will be generated inside the folder of your image bank
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment