CN-121982277-A - Intelligent desk ordering method, device, equipment and storage medium
Abstract
The application provides an intelligent desk ordering method, device, equipment and storage medium, wherein the method comprises the steps of receiving desk distribution images in classrooms and extracting coordinates of each desk; the method comprises the steps of regarding coordinates of all desks as a two-dimensional plane discrete point set, calculating a convex hull capable of surrounding the point set, outputting vertex coordinates of the convex hull, determining corner desks from the vertex coordinates of the convex hull, performing perspective transformation on desk distribution images based on the determined corner desks to obtain corrected coordinates of all desks, performing column division on the corrected coordinates of all desks by taking the abscissa of the corrected desk coordinates as a clustering feature by adopting a density-based clustering algorithm to obtain a plurality of column clusters, and performing column-row coordinate coding on the position of each desk in the desk distribution images based on the plurality of column clusters. The application has stronger environmental adaptability and sequencing accuracy, and can effectively process complex scenes such as irregular layout, local shielding and the like.
Inventors
- WANG HAOYUAN
- MIN XIAOQIANG
- YU QIHUI
Assignees
- 成都佳发教育科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251202
Claims (10)
- 1. An intelligent desk ordering method is characterized by comprising the following steps: Receiving desk distribution images in classrooms, and extracting coordinates of each desk from the desk distribution images; taking the coordinates of all desks as a two-dimensional plane discrete point set, calculating a convex hull capable of surrounding the point set, and outputting vertex coordinates of the convex hull, wherein the vertex coordinates correspond to the coordinates of peripheral desks in classrooms; Determining the coordinates of a desk positioned at four corner points of a classroom from the vertex coordinates of the convex hull; Performing perspective transformation on the desk distribution image based on the coordinates of the four corner desks in the determined classroom, correcting the inclined deformation image into a standard overlook view angle image, and synchronously updating the coordinates of all desks to obtain corrected coordinates of all desks; And based on the plurality of column clusters, carrying out column-row coordinate coding on the position of each desk in the desk distribution image.
- 2. The intelligent desks ordering method according to claim 1, wherein the receiving a desks distribution image in a classroom, extracting coordinates of each desk from the desks distribution image, comprises: receiving a desk distribution image in a classroom, and judging whether the desk distribution image contains desk coordinates or not; If not, inputting the desk distribution image into a pre-trained target detection model based on a convolutional neural network, identifying and outputting the coordinates of each desk in the image, and if so, directly extracting the desk coordinates.
- 3. The intelligent desk ordering method according to claim 1, wherein determining the coordinates of desks located at four corner points of a classroom from the vertex coordinates of the convex hull comprises: calculating the slope of each convex hull edge formed by adjacent vertexes according to the sequence of the vertexes on the convex hull based on the vertex coordinates of the convex hull; Classifying convex hull edges with slope differences within a preset threshold as the same physical edge, and reserving two endpoints with the farthest distance in each type of physical edge to obtain a simplified convex hull top point set; traversing all four vertex combinations in the reduced convex hull vertex set, calculating the coverage of a quadrilateral area formed by each combination, wherein the coverage refers to the number of desk coordinate points contained in the quadrilateral area, And screening out the four-vertex combination with the largest coverage, wherein the coordinates of the four vertices are the coordinates of a desk positioned at four corner points of the classroom.
- 4. The intelligent desks ordering method according to claim 1, wherein the encoding the position of each desk in the desks distribution image based on the plurality of column clusters includes: Calculating the horizontal coordinate mean value of all desk coordinates in each column of clusters, sequencing all columns of clusters from small to large according to the horizontal coordinate mean value, and sequentially giving column numbers; and sequentially giving row numbers to the desk coordinates in each row of clusters according to the descending order of the ordinate, so as to obtain the row numbers and the row numbers corresponding to each desk.
- 5. The intelligent desk sequencing method of claim 3 wherein said preset threshold is + -0.1.
- 6. The intelligent desk sequencing method of claim 1 wherein said density-based clustering algorithm comprises HDBSCAN algorithm.
- 7. An intelligent desk sequencing device, characterized by comprising: the extraction module is used for receiving desk distribution images in classrooms and extracting coordinates of each desk from the desk distribution images; The computing module is used for regarding the coordinates of all desks as a two-dimensional plane discrete point set, computing a convex hull capable of surrounding the point set, outputting vertex coordinates of the convex hull, wherein the vertex coordinates correspond to the coordinates of peripheral desks in a classroom; The correction module is used for performing perspective transformation on the desk distribution image based on the determined coordinates of the four corner desks in the classroom so as to correct the inclined deformed image into a standard overlook view angle image, and synchronously updating the coordinates of all desks to obtain corrected coordinates of all desks; The coding module is used for carrying out column division on the corrected coordinates of all desks by adopting a density-based clustering algorithm and taking the abscissa of the corrected desk coordinates as a clustering characteristic to obtain a plurality of column clusters, and carrying out column-row coordinate coding on the position of each desk in the desk distribution image based on the plurality of column clusters.
- 8. The intelligent desk sequencing device of claim 7, wherein the computing module is specifically configured to: calculating the slope of each convex hull edge formed by adjacent vertexes according to the sequence of the vertexes on the convex hull based on the vertex coordinates of the convex hull; Classifying convex hull edges with slope differences within a preset threshold as the same physical edge, and reserving two endpoints with the farthest distance in each type of physical edge to obtain a simplified convex hull top point set; traversing all four vertex combinations in the reduced convex hull vertex set, calculating the coverage of a quadrilateral area formed by each combination, wherein the coverage refers to the number of desk coordinate points contained in the quadrilateral area, And screening out the four-vertex combination with the largest coverage, wherein the coordinates of the four vertices are the coordinates of a desk positioned at four corner points of the classroom.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when the computer program is run by the processor.
- 10. A computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the method of any one of claims 1 to 6.
Description
Intelligent desk ordering method, device, equipment and storage medium Technical Field The application relates to the technical field of computers, in particular to an intelligent desk ordering method and device, electronic equipment and a storage medium. Background Under the background of deep integration of education informatization and intellectualization, intelligent classroom construction becomes one of the core directions for promoting education modernization, and efficient sequencing and positioning of desks in classroom space are basic preconditions for realizing functions of classroom attendance automation, seat resource intelligent allocation, teaching interaction accuracy and the like. At present, the demands on accuracy and efficiency of desk sequencing are increasingly urgent in the scenes of standardized examination room arrangement such as primary and middle school level examination, art university recruitment examination and the like, daily classroom seat management, postclass space optimization and the like, but the prior art scheme still has obvious bottlenecks, and is difficult to meet the actual application demands. From the practical mode of current desk sequencing, manual operation is still the dominant mode. The staff needs to identify, number and record the positions of the desks one by one, so that a great deal of labor and time cost are consumed, the problems of wrong numbering, misjudgment of positions and the like are easily caused by human negligence, and particularly when the arrangement of large-scale examination rooms (such as standardized examination rooms for accommodating hundreds of seats) or the temporary adjustment of the seat layout is carried out, the efficiency bottleneck of manual sequencing is more prominent, and the efficient development of teaching management and examination organizations is severely restricted. For this pain point, although some object sorting algorithms based on computer vision have appeared in the prior art, three major core defects exist in the desk sorting application of such algorithms in educational scenes: First, the adaptability to the arrangement form of the desk is extremely poor. The design logic of most traditional algorithms is based on the assumption of strict alignment of objects, and can only process the desk queues distributed in standard determinant, so that the horizontal and vertical intervals of all desks are required to be consistent, and no spatial offset exists. However, in an actual classroom environment, the desk layout often presents irregular characteristics, such as front-back dislocation and left-right offset after the seats are adjusted between classes of students, and part of classrooms are arranged in an arc shape or distributed in a local dense manner due to the limitation of space structures, and even the situation that individual desks are missing (such as damage and maintenance) or additionally arranged (such as temporary seating) exists. The non-standardized layout can directly cause the failure of the grid detection and template matching functions of the traditional algorithm, the spatial position relation of the desk can not be accurately identified, and the error rate of the sequencing result is up to more than 40%. Second, the dependence on the visual acquisition conditions is too strong and the anti-interference capability is weak. The existing algorithm generally requires that the image acquisition device must maintain a completely vertical top view angle, and the shooting distance must be strictly fixed within a preset range (usually the error is not more than + -5%). However, in actual operation, the camera angle is easily shifted by more than 15 degrees due to the influence of factors such as classroom space height, equipment installation conditions, operator technical level and the like, and the shooting distance often exceeds the calibration range due to scene requirements (such as wide-angle shooting covering the whole classroom). Experimental data show that when the angle deviation is 15 degrees and the shooting distance deviation is +/-20%, the sorting accuracy of the traditional algorithm is suddenly reduced to be lower than 50%, and when the angle deviation is 30 degrees, the algorithm is basically completely invalid and cannot output an effective sorting result. Third, systematic errors induced by optical distortion have not been effectively resolved. Even if calibrated industrial image acquisition equipment is adopted, geometric distortion of 2-3 pixels still occurs in the edge area of a lens when a large-scale classroom scene is shot, and when an image is required to be converted into a overlook view angle through perspective transformation, the distortion is further amplified, three types of core interference problems are caused, namely, firstly, the geometric distortion causes convergence phenomenon of the edge lines of a desk which are originally parallel, unbalance of the scaling of a