Hydraulic supports are important equipment used in coal mining. Detecting the real-time attitude and straightness of hydraulic support group in unmanned working faces of coal mines in complex geological conditions is difficult. To address this issue, a method that measures the position and attitude of the hydraulic support using binocular vision detection-aided mark points was proposed. First, a combination of binocular vision positioning and a convolutional neural network (CNN) object detection is used to achieve the three-dimensional (3D) location of mark points. Then, the attitude calculation model of the hydraulic support based on the dual quaternion method is established. This method achieves the space attitude detection between multiple hydraulic supports and the straightness detection of hydraulic support group in 3D space. In the laboratory environment, the position and attitude detection test of the hydraulic support is obtained through the working face equipment position detection test bench. This method can adapt to the worse working environment in coal mine production and can provide early data for the automatic control of the straightness of the working face.
To address the decline in detection accuracy caused by the degradation of grayscale features under environmental interference, a lightweight detection model driven by grayscale characterization, YOLOv8n-CoalGangue, is proposed based on an in-depth analysis of the dynamic variations exhibited by grayscale features. First, grayscale histograms are used to quantitatively evaluate the effects of illumination changes and moisture conditions on feature distributions, revealing that global grayscale aliasing and local texture degradation are the key visual feature bottlenecks. Guided by these unique findings, targeted technological innovations are integrated into the developed architecture. HGNetV2-G, which incorporates the GhostNet principle, is used as the backbone to reduce the incurred computational cost while preserving the core feature extraction ability of the model. A mixed local channel attention (MLCA) mechanism is introduced in the neck to filter background noise and focus on local high-frequency features, which helps overcome global grayscale aliasing issues. In addition, a DGFPN-based feature fusion network is constructed by combining RepGFPN and DySample, together with lightweight shared convolution detection (LSCD), which compensates for the loss of multiscale grayscale details without increasing the imposed parameter burden. Furthermore, the PIoUv2 loss function improves the bounding-box regression process in dense overlapping scenarios. Experimental results show that the proposed model achieves an mAP@50 of 97.2% with a 32% reduction in the number of parameters required (only 2.1 M). It also demonstrates strong robustness under six extreme industrial conditions, such as low illumination and coal dust occlusion, confirming the effectiveness of the design driven by grayscale characterization for practical green mining applications.