This code processes fish images by isolating the fish using HSV masking and contour detection. It calculates the fish's length, height, and area, then saves these measurements along with the fish ID and weight to an Excel file. Processed images with bounding boxes are also saved for reference.
分别提取每个图片中鱼的主体
计算长度、宽度、像素面积 与原始数据中的重量,组合为新的训练样本
训练样本中可见像素面积和重量有一定的线性相关性
使用RF+SVM训练 在测试集可达 90%以上准确率