Crab aquaculture is an important component of the freshwater aquaculture industry in China, encompassing an expansive farming area of over 6000 km2 nationwide. Currently, crab farmers rely on manually monitored feeding platforms to count the number and assess the distribution of crabs in the pond. However, this method is inefficient and lacks automation. To address the problem of efficient and rapid detection of crabs via automated systems based on machine vision in low-brightness underwater environments, a two-step color correction and improved dark channel prior underwater image processing approach for crab detection is proposed in this paper. Firstly, the parameters of the dark channel prior are optimized with guided filtering and quadtrees to solve the problems of blurred underwater images and artificial lighting. Then, the gray world assumption, the perfect reflection assumption, and a strong channel to compensate for the weak channel are applied to improve the pixels of red and blue channels, correct the color of the defogged image, optimize the visual effect of the image, and enrich the image information. Finally, ShuffleNetV2 is applied to optimize the target detection model to improve the model detection speed and real-time performance. The experimental results show that the proposed method has a detection rate of 90.78% and an average confidence level of 0.75. Compared with the improved YOLOv5s detection results of the original image, the detection rate of the proposed method is increased by 21.41%, and the average confidence level is increased by 47.06%, which meets a good standard. This approach could effectively build an underwater crab distribution map and provide scientific guidance for crab farming.
Bait costs constitute 40–50% of the total expenditure in river crab aquaculture, highlighting the critical need for accurately assessing crab growth and scientifically determining optimal feeding regimes across different farming stages. Current traditional methods rely on periodic manual sampling to monitor growth status and artificial feeding platforms to observe consumption and adjust bait input. These approaches are inefficient, disruptive to crab growth, and fail to provide comprehensive growth data. Therefore, this study proposes a machine vision-based monitoring system for river crab feeding platforms. Firstly, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm is applied to enhance underwater images of river crabs. Subsequently, an improved YOLOv11 (You Only Look Once) model is introduced and applied for multi-target detection and counting in crab ponds, enabling the extraction of information related to both river crabs and bait. Concurrently, underwater environmental parameters are monitored in real-time via an integrated environmental information sensing system. Finally, an information processing platform is established to facilitate data sharing under a “detection–processing–distribution” workflow. The real crab farm experimental results show that the river crab quality error rate was below 9.57%, while the detection rates for both corn and pellet baits consistently exceeded 90% across varying conditions. These results indicate that the proposed system significantly enhances farming efficiency, elevates the level of automation, and provides technological support for the river crab aquaculture industry.