File size: 643 Bytes
fc9b81e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from pathlib import Path
import numpy as np

# Dynamically get the base path for dataset
BASE_PATH = Path(__file__).parent.resolve()

# Output directory for CSV files
OUTPUT_DIR = BASE_PATH / "features"
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)  # Ensure directory exists

# Image processing parameters
IMAGE_SIZE = (64, 64)  # Resize images for consistency

# GLCM Parameters
DISTANCES = [1, 2, 3, 4]
ANGLES = [0, 0.25 * np.pi, 0.5 * np.pi, 0.75 * np.pi]  # 0°, 45°, 90°, 135°

# LBP Parameters
LBP_RADIUS = 3
LBP_POINTS = min(8 * LBP_RADIUS, 24)
LBP_METHOD = "uniform"

# Texture classes
TEXTURE_CLASSES = ["wood", "brick", "stone"]