# CCTDecode
**Repository Path**: gapyanpeng/CCTDecode
## Basic Information
- **Project Name**: CCTDecode
- **Description**: https://github.com/poxiao2/CCTDecode.git
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-03-19
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
CCTDecode
===============
Detect and decode the CCT (Circular Coded Target).
Requirements:
----------------
<1> python 3.7 (I don't know whether other python version would work correctly, you can have a try.)
<2> opencv-python
<3> pillow
<4> numpy
<5> matplotlib
<6> progress
<7> ... (maybe others, you can follow the error infomation to 'pip install xxx' them.)
The main function is listed as following:
-----------------------------------------
1. Draw CCT images: DrawCCT.py
usage:
``` c
<1> cd root_path
<2> python DrawCCT.py --bit_n=9 --size=400
```

2. Detect and decode CCT: CCTDecodeRelease.py
which can decode CCT from the signal image, or you can use it to decode the CCT images in the same folder.
usage:
``` c
<1> cd root_path
<2> python CCTDecodeRelease.py --filename=cct12_6.png
--bit_n=12
--threshold=0.7 //for single image
python CCTDecodeRelease.py --bach=True
--bit_n=8
--save_folder=./result/
--threshold=0.93 //for images in same folder
```

Actually, there are some args are default value which can be ignored if you follow my data construction. The whole args are listed as follows:
``` c
bach=False, // bach processing
bit_n=12, // the bit number of CCT image
filename=None, // image name
save_folder='./result/', // the folder for saving the processed images
src_folder='./data/', // the folder which contains the source images
threshold=0.8 // the threshold for CCT detecion, which is between 0 and 1.
```
So, you can change these args as you whish. But remember to write it correctly and don't foget the '--' before each arg.
3. Decode CCT from video: DecodeCCTFromVideo.py
usage:
``` c
<1> cd root_path
<2> python DetectCCTFromVideo.py --bit_n=12 --threshold=0.7
```
