Automatic calculation method and device for seat distribution

The position coordinates and half-body height of seated people in the surveillance image are obtained through camera equipment, and the correspondence between seat numbers and position coordinates is automatically calculated based on the edge coordinates of the detection area. This solves the problem of high labor costs in manually establishing the correspondence between seats and seat numbers in cinemas or theaters, and realizes automatic identification and prompting of audiences with uncivilized behavior, thereby maintaining the viewing environment.

CN114727053BActive Publication Date: 2025-09-16ZHEJIANG UNIVIEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011519312.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2025-09-16
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

In surveillance scenarios such as cinemas or theaters, it is necessary to manually establish the correspondence between seats and seat numbers, resulting in high labor costs and the inability to automatically identify and prompt audiences with uncivilized behavior.

Method used

The position coordinates and half-body height of seated people in the surveillance image are obtained through camera equipment. Combined with the edge coordinates of the detection area, the correspondence between seat numbers and position coordinates is automatically calculated, and an automatic calculation method and device for seat distribution is established to automatically identify and prompt spectators with uncivilized behavior.

Benefits of technology

It can automatically establish the correspondence between seats and seat numbers, reduce labor costs, and automatically identify and remind viewers with uncivilized behavior, maintaining a good environment for watching movies or plays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114727053B_ABST
    Figure CN114727053B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for automatically calculating seat distribution. The method comprises: obtaining, via a first camera, the position coordinates and bust heights of seated individuals within a pre-calibrated detection area of ​​a surveillance image; obtaining the edge coordinates of the detection area; and calculating the correspondence between seat coordinates and seat numbers based on the position coordinates and bust heights of the seated individuals and the coordinates of the detection area. The method and device for automatically calculating seat distribution disclosed by the present invention can automatically establish a correspondence between position coordinates in the image captured by the camera and seat numbers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of monitoring technology, and in particular to a method and device for automatically calculating seat distribution. Background Art

[0002] While watching a movie or a play, some audience members may unconsciously make phone calls, take photos, and so on. Currently, staff members are required to patrol the area to identify and alert any audience members engaging in these behaviors. Even if surveillance cameras detect such behavior, staff members are required to investigate, locate, and alert the audience member. Therefore, it is imperative to obtain the audience's seat number based on the surveillance images in the monitored area.

[0003] Currently, in any monitoring scenario with seats, such as cinemas, theaters, and conference halls, the distribution of seats varies across different monitoring scenarios. If the correspondence between seat numbers and monitoring areas is pre-configured, this would need to be done for each scenario, requiring significant human effort. Therefore, a method is urgently needed to automatically establish the correspondence between seats and seat numbers within a monitoring area. Summary of the Invention

[0004] The present disclosure provides a method for automatically calculating seat distribution, including:

[0005] Acquire, through the first camera device, the position coordinates and bust height of seated persons within the detection area in the pre-calibrated monitoring image;

[0006] Obtaining edge coordinates of the detection area;

[0007] The correspondence between the position coordinates and the seat number is calculated according to the position coordinates, the half-body height, and the edge coordinates of the detection area of ​​the seated person to obtain the seat number corresponding to the seated person.

[0008] In an exemplary embodiment, calculating the correspondence between the position coordinates and the seat number based on the position coordinates, bust height, and edge coordinates of the detection area of ​​the seated person includes:

[0009] Calculating the seat width of each row based on the position coordinates of each group of seated persons and the edge coordinates of the detection area, wherein the seated persons whose vertical coordinates in the position coordinates of the seated persons are smaller than a first preset value are grouped as one group;

[0010] Calculate the horizontal coordinate of each seat in each row according to the seat width of each row;

[0011] Calculate the vertical coordinates of each row of seats according to the position coordinates, half-body heights, and edge coordinates of the detection area of ​​each group of seated persons;

[0012] A correspondence between position coordinates and seat numbers is established according to the horizontal coordinate and vertical coordinate of each seat and the preset seat number distribution information in the detection area.

[0013] In an exemplary embodiment, calculating the seat width of each row based on the position coordinates of each group of seated persons and the edge coordinates of the detection area includes:

[0014] For any group, the abscissa of the left and right edges of the detection area at the average value of the group's ordinates is used as the abscissa of the intersection of the row corresponding to the group and the left and right edges of the detection area;

[0015] The seat width of the row corresponding to the group is calculated according to the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group and the left and right edges of the detection area.

[0016] In an exemplary embodiment, calculating the horizontal coordinate of each seat in each row according to the seat width of each row includes:

[0017] For each row, the abscissa of each seat in the row is calculated according to the seat width of the row and the abscissas of the intersection points of the row with the left edge and the right edge of the detection area.

[0018] In an exemplary embodiment, the vertical coordinates of each row of seats are calculated based on the position coordinates, bust heights, and edge coordinates of the detection area of ​​the seated person, including:

[0019] Determine the vertical coordinate of the top row in the detection area according to the vertical coordinate of the group with the largest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the largest vertical coordinate, and the vertical coordinate of the upper edge of the detection area;

[0020] Determine the vertical coordinate of the bottom row in the detection area according to the vertical coordinate of the group with the smallest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area;

[0021] Calculate the ordinates of each row between the top row and the bottom row based on the ordinates of any determined row within the detection area;

[0022] Among them, the group with the largest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the largest, and the group with the smallest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the smallest.

[0023] In an exemplary embodiment, determining the vertical coordinate of the top row in the detection area according to the vertical coordinate of the group with the largest average vertical coordinate among all the groups and the vertical coordinate of the upper edge of the detection area includes:

[0024] When the vertical coordinate of the group is the maximum value among all groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the upper edge of the detection area is less than half of the average half-body height of the group, then the vertical coordinate of the group is determined to be the vertical coordinate of the top row;

[0025] If the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the upper edge of the detection area is greater than half of the average half-body height of the group, then the group is used as the current group and the following operations are repeated until the vertical coordinate of the top row is determined:

[0026] Calculating the average bust height of the row above the row corresponding to the current group based on the slopes of the left and right edges of the detection area at the ordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the ordinate of the previous row based on the ordinate of the current group, the average bust height of the current group, and the average bust height of the previous row;

[0027] When the absolute value of the difference between the ordinate of the previous row and the ordinate of the upper edge of the detection area is less than half of the average half-body height of the previous row, the ordinate of the previous row is determined to be the ordinate of the top row;

[0028] When the absolute value of the difference between the vertical coordinate of the previous row and the vertical coordinate of the upper edge of the detection area is greater than half of the average half-body height of the previous row, the vertical coordinate of the previous row is used as the vertical coordinate of the current group, and the average half-body height of the previous row is used as the average half-body height of the current group.

[0029] In an exemplary embodiment, determining the vertical coordinate of the bottom row in the detection area based on the vertical coordinate of the group with the smallest vertical coordinate among all groups, the average half-body height of seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area includes:

[0030] When the vertical coordinate of the group is the minimum value among all the groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is less than half of the average half-body height of the group, then the vertical coordinate of the group is determined to be the vertical coordinate of the bottom row;

[0031] If the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the group, then the group is used as the current group and the following operations are repeated until the vertical coordinate of the bottom row is determined;

[0032] Calculating the average bust height of the next row corresponding to the current group based on the slopes of the left and right edges of the detection area at the vertical coordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the vertical coordinate of the next row based on the vertical coordinate of the current group, the average bust height of the current group, and the average bust height of the next row;

[0033] When the absolute value of the difference between the ordinate of the next row and the ordinate of the lower edge of the detection area is less than half of the average half-body height of the next row, the ordinate of the next row is determined to be the ordinate of the bottom row;

[0034] When the absolute value of the difference between the vertical coordinate of the next row and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the next row, the vertical coordinate of the next row is used as the vertical coordinate of the current group, and the average half-body height of the next row is used as the average half-body height of the current group.

[0035] In an exemplary embodiment, calculating the vertical coordinates of each row between the top row and the bottom row based on the vertical coordinates of any determined row in the detection area includes:

[0036] Repeat the following steps until the vertical coordinates of each row between the top row and the bottom row are calculated;

[0037] The row whose vertical coordinate has been calculated and the row above or below whose vertical coordinate has not been calculated is regarded as the determined row; the average half-body height of the row above or below the determined row is calculated based on the slopes of the left and right edges of the detection area at the vertical coordinate of the determined row, the seat width of the determined row, and the average half-body height of the determined row; the vertical coordinate of the row above or below the determined row is calculated based on the vertical coordinate of the determined row, the average half-body height of the determined row, and the average half-body height of the row above or below the determined row.

[0038] In an exemplary embodiment, calculating the seat width of the row corresponding to the group based on the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group and the left and right edges of the detection area includes:

[0039] When the number of seated persons in the group is greater than or equal to 2, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area;

[0040] When the number of seated people in the group is 1, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area.

[0041] In an exemplary embodiment, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area, including:

[0042] The accuracy of the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the corresponding row and the left and right edges of the detection area are revised;

[0043] Calculate the greatest common divisor of the absolute value of the difference between the horizontal coordinates of any two seated persons after revision, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area;

[0044] When the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than a second preset value, the greatest common divisor is used as the seat width of the row corresponding to the group;

[0045] When the difference between the greatest common divisor and the average shoulder width of the seated persons is less than a second preset value, the absolute value of the difference between the horizontal coordinates of any two seated persons after the revision and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area are modified, and the greatest common divisor of the absolute value of the difference between the horizontal coordinates of any two seated persons after the revision and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area is recalculated until the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than the second preset value;

[0046] Calculating the seat width of the row corresponding to the group based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, including:

[0047] If the difference between the horizontal coordinates of the seated person and the horizontal coordinates of the intersections of the row corresponding to the group with the left and right edges of the detection area is not zero, the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, as well as the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, are rounded up to ten places, and the greatest common divisor is calculated, which is used as the seat width of the row corresponding to the group;

[0048] If the difference between the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection of the row corresponding to the group and the left and right edges of the detection area is 0, the shoulder width of the seated person is used as the seat width of the row corresponding to the group.

[0049] The present disclosure also provides a device for automatically calculating seat distribution, comprising: a memory and a processor;

[0050] The memory is used to store a program for automatically calculating the seat distribution;

[0051] The processor is used to read and execute the program for automatically calculating the seat distribution, and execute the above-mentioned method for automatically calculating the seat distribution.

[0052] The automatic seat distribution calculation method and device provided by the present disclosure can automatically establish a corresponding relationship between the position coordinates in the picture obtained by the camera equipment and the seat number. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Schematic diagram of a method for automatically calculating seat distribution according to an embodiment of the present disclosure.

[0054] Figure 2 This is an example of a human figure detection identification frame according to an embodiment of the present disclosure.

[0055] Figure 3 Schematic diagram of the prompt method according to an embodiment of the present disclosure.

[0056] Figure 4 A schematic diagram of a marked viewing seating area according to an embodiment of the present disclosure.

[0057] Figure 5 Schematic diagram of marking coordinates according to an embodiment of the present disclosure.

[0058] Figure 6 A schematic diagram of calculating the number of seat rows according to an embodiment of the present disclosure.

[0059] Figure 7 Schematic diagram of a device for automatically calculating seat distribution according to an embodiment of the present disclosure.

[0060] Figure 8 Schematic diagram of a prompt device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0061] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other in any manner.

[0062] Through research, the inventors of the present disclosure have discovered that, in order to address the current issues faced by cinemas or theaters, a correspondence can be automatically established between the position coordinates of seats in images captured by a camera and their seat numbers. Based on the position coordinates of seated individuals exhibiting uncivilized behavior as captured by the camera and the correspondence between the position coordinates of seats in the images automatically established by the present disclosure and their seat numbers, the seat numbers of individuals exhibiting uncivilized behavior can be obtained, thereby providing reminders to those exhibiting uncivilized behavior. The present disclosure is applicable not only to scenarios where cinemas or theaters need to provide reminders to individuals exhibiting uncivilized behavior, but also to all scenarios where it is necessary to locate corresponding individuals through surveillance of seated locations.

[0063] Figure 1 FIG. 1 is a schematic diagram of a method for automatically calculating seat distribution according to an embodiment of the present disclosure. Figure 1 As shown, the automatic seat distribution calculation method of this embodiment includes:

[0064] S01. Obtaining, through a first camera device, the position coordinates and bust height of seated persons within a detection area in a pre-calibrated surveillance image;

[0065] S02, obtaining the edge coordinates of the detection area;

[0066] S03. Calculate the correspondence between the position coordinates in the detection area and the seat number according to the position coordinates, half-body height, and edge coordinates of the detection area of ​​the seated person, so as to obtain the seat number corresponding to the seated person.

[0067] In an exemplary embodiment, the first camera device may be a wide-angle camera. In other exemplary embodiments, the first camera device may be a panoramic camera.

[0068] In one exemplary embodiment, a region can be drawn on the camera to mark the seating area for the movie, serving as a boundary for triggering person tracking detection. The drawn region is then used as the detection region. Two-dimensional coordinates are also established for the entire image, for example, using the lower left corner of the image as the coordinate origin.

[0069] In an exemplary embodiment, the horizontal and vertical coordinates of the seated person's shoulders are measured using the human figure detection function of the first camera device. The horizontal and vertical coordinates are pixel differences relative to the coordinate axes. The horizontal and vertical coordinates of the shoulders here refer to the horizontal and vertical coordinates of the left and right shoulder edges. For example, if the first camera device captures the person's back, a two-dimensional coordinate system is established with the lower left corner of the captured image as the coordinate origin. If the difference between the horizontal coordinate of the seated person's left shoulder edge and the vertical axis of the coordinate system is 200 pixels, the difference between the horizontal coordinate of the seated person's right shoulder edge and the vertical axis of the coordinate system is 300 pixels, and the difference between the vertical coordinate of the seated person's shoulder and the horizontal axis of the coordinate system is 400 pixels, then the coordinates of the seated person's left shoulder are (200, 400), and the coordinates of the right shoulder are (300, 400).

[0070] According to the human figure detection function of the first camera device, the height of the human figure detection identification frame can also be measured (such as Figure 2 shown).

[0071] In an exemplary embodiment, the height of the human figure detection identification frame of the seated person, and the horizontal coordinates and vertical coordinates of the shoulders of the seated person are obtained;

[0072] determining the position coordinates of the seated person within the detection area according to the horizontal coordinates and vertical coordinates of the shoulders of the seated person;

[0073] The half-body height of the seated person is determined according to the height of the human figure detection identification frame of the seated person.

[0074] In an exemplary embodiment, the average value of the horizontal coordinates of the shoulders of the seated person can be used as the horizontal coordinate in the position coordinates of the seated person, and the average value of the vertical coordinates of the shoulders of the seated person can be used as the vertical coordinate in the position coordinates of the seated person.

[0075] In other embodiments, the average value of the horizontal coordinates of the shoulders of the seated person can be used as the horizontal coordinate in the position coordinates of the seated person, and the vertical coordinate corresponding to the horizontal coordinate in the position coordinates of the seated person can be obtained by interpolation calculation as the vertical coordinate in the position coordinates of the seated person.

[0076] In an exemplary embodiment, seated persons whose vertical coordinates are smaller than a first preset value are grouped together;

[0077] Calculating the seat width of each row according to the position coordinates of each group of seated persons and the edge coordinates of the detection area;

[0078] Calculate the horizontal coordinate of each seat in each row according to the seat width of each row;

[0079] Calculate the vertical coordinates of each row of seats according to the position coordinates, half-body heights, and edge coordinates of the detection area of ​​each group of seated persons;

[0080] A correspondence between position coordinates and seat numbers is established according to the horizontal coordinate and vertical coordinate of each seat and the preset seat number distribution information in the detection area.

[0081] The horizontal coordinate of each seat may be the horizontal coordinates on both sides of the seat, or the average value of the horizontal coordinates on both sides of the seat.

[0082] In an exemplary embodiment, calculating the seat width of each row based on the position coordinates of each group of seated persons and the edge coordinates of the detection area includes:

[0083] The horizontal coordinates of the left and right edges of the detection area at the average value of the vertical coordinates of the group are used as the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area;

[0084] The seat width of the row corresponding to the group is calculated according to the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group and the left and right edges of the detection area.

[0085] The intersection point here can be the intersection point formed by drawing a horizontal line according to the vertical coordinate of the row corresponding to the group and the left and right edges of the detection area.

[0086] In an exemplary embodiment, calculating the horizontal coordinate of each seat in each row according to the seat width of each row includes:

[0087] For each row, the abscissa of each seat in the row is calculated according to the seat width of the row and the abscissas of the intersection points of the row with the left edge and the right edge of the detection area.

[0088] In an exemplary embodiment, calculating the seat width of the row corresponding to the group based on the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group and the left and right edges of the detection area includes:

[0089] When the number of seated persons in the group is greater than or equal to 2, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area;

[0090] When the number of seated people in the group is 1, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area.

[0091] In an exemplary embodiment, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area, including:

[0092] S31, revising the accuracy of the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the corresponding row and the left and right edges of the detection area to ten digits;

[0093] S32, calculating the greatest common divisor of the absolute value of the difference between the horizontal coordinates of any two seated persons after revision, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area;

[0094] S33, when the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than a second preset value, using the greatest common divisor as the seat width of the row corresponding to the group;

[0095] If the difference between the greatest common divisor and the average shoulder width of the seated persons is less than a second preset value, then increase the absolute value of the revised difference in the horizontal coordinates of any two seated persons and the absolute value of the difference in the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area, and repeat steps S31 and S32 until the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than the second preset value.

[0096] The shoulder width here may be the absolute value of the difference between the horizontal coordinates of the left shoulder edge and the horizontal coordinates of the right shoulder edge of the seated person, and the average shoulder width may be the average value of the shoulder widths of the currently seated persons.

[0097] Here, revising to the tens place may refer to discarding the values ​​below the tens place. For example, if 23456 is revised to the tens place, it will be 23450. If the values ​​above the tens place are to be increased, it may be 23460, or 23470, etc.

[0098] In an exemplary embodiment, calculating the seat width of the row corresponding to the group based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, includes:

[0099] If the difference between the horizontal coordinates of the seated person and the horizontal coordinates of the intersections of the row corresponding to the group with the left and right edges of the detection area is not zero, the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, as well as the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, are rounded up to ten places, and the greatest common divisor is calculated, which is used as the seat width of the row corresponding to the group;

[0100] If the difference between the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection of the row corresponding to the group and the left and right edges of the detection area is 0, the shoulder width of the seated person is used as the seat width of the row corresponding to the group.

[0101] In an exemplary embodiment, the vertical coordinates of each row of seats are calculated based on the position coordinates, bust heights, and edge coordinates of the detection area of ​​the seated person, including:

[0102] Determine the vertical coordinate of the top row in the detection area according to the vertical coordinate of the group with the largest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the largest vertical coordinate, and the vertical coordinate of the upper edge of the detection area;

[0103] Determine the vertical coordinate of the bottom row in the detection area according to the vertical coordinate of the group with the smallest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area;

[0104] Calculate the ordinates of each row between the top row and the bottom row based on the ordinates of any determined row within the detection area;

[0105] Among them, the group with the largest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the largest, and the group with the smallest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the smallest.

[0106] In an exemplary embodiment, determining the vertical coordinate of the top row in the detection area according to the vertical coordinate of the group with the largest average vertical coordinate among all the groups and the vertical coordinate of the upper edge of the detection area includes:

[0107] S11: When the vertical coordinate of the group is the maximum value among all groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the upper edge of the detection area is less than half of the average half-body height of the group, then the vertical coordinate of the group is determined to be the vertical coordinate of the top row;

[0108] If the absolute value of the difference between the ordinate of the group and the ordinate of the upper edge of the detection area is greater than half of the average bust height of the group, the group is taken as the current group and step S12 is performed:

[0109] S12: Calculating the average bust height of the row above the row corresponding to the current group based on the slopes of the left and right edges of the detection area at the ordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the ordinate of the previous row based on the ordinate of the current group, the average bust height of the current group, and the average bust height of the previous row;

[0110] When the absolute value of the difference between the ordinate of the previous row and the ordinate of the upper edge of the detection area is less than half of the average half-body height of the previous row, the ordinate of the previous row is determined to be the ordinate of the top row;

[0111] When the absolute value of the difference between the vertical coordinate of the previous row and the vertical coordinate of the upper edge of the detection area is greater than half of the average half-body height of the previous row, the vertical coordinate of the previous row is used as the vertical coordinate of the current group, the average half-body height of the previous row is used as the average half-body height of the current group, and step S12 is repeated.

[0112] In an exemplary embodiment, the average bust height of the row above the row corresponding to the current group is calculated based on the slopes of the left and right edges of the detection area at the vertical coordinate of the current group, the seat width of the current group, and the average bust height of the current group. For example, the slope of the left edge at the vertical coordinate of the current group can be assumed, and the absolute value and then the inverse are taken to obtain the coefficient of variation. and , the average bust height of the current group is H, and the sum of the seat widths of the current group is W, then the average half-body height H of the previous row of the row corresponding to the current group It can be calculated by the following formula (1):

[0113] H =H / [ W+H· + H· ) / W] (1)

[0114] In an exemplary embodiment, according to the ordinate y of the current group, the average bust height H of the current group and the average bust height H of the previous row, Calculate the y coordinate of the previous row , for example, can be calculated by formula (2):

[0115] y = y+H / 2+ H / twenty two)

[0116] In an exemplary embodiment, determining the vertical coordinate of the bottom row in the detection area based on the vertical coordinate of the group with the smallest vertical coordinate among all groups, the average half-body height of seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area includes:

[0117] S21: When the vertical coordinate of the group is the minimum value among all groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is less than half of the average bust height of the group, then determine the vertical coordinate of the group as the vertical coordinate of the bottom row;

[0118] If the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the group, the group is taken as the current group and step S22 is performed;

[0119] S22: Calculating the average bust height of the next row corresponding to the current group based on the slopes of the left and right edges of the detection area at the vertical coordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the vertical coordinate of the next row based on the vertical coordinate of the current group, the average bust height of the current group, and the average bust height of the next row;

[0120] If the absolute value of the difference between the ordinate of the next row and the ordinate of the lower edge of the detection area is less than half of the average half-body height of the next row, then the ordinate of the next row is determined to be the ordinate of the bottom row;

[0121] When the absolute value of the difference between the vertical coordinate of the next row and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the next row, the vertical coordinate of the next row is used as the vertical coordinate of the current group, the average half-body height of the next row is used as the average half-body height of the current group, and step S22 is repeated.

[0122] In an exemplary embodiment, the average half-body height of the next row corresponding to the current group is calculated based on the slopes of the left and right edges of the detection area at the vertical coordinate of the current group, the seat width of the current group, and the average half-body height of the current group. For example, the slope of the left edge at the vertical coordinate of the current group can be assumed, and the absolute value and then the inverse are taken to obtain the coefficient of variation. and , the average bust height of the current group is H, and the sum of the seat widths of the current group is W, then the average half-body height H of the next row of the row corresponding to the current group It can be calculated by the following formula (3):

[0123] H =H·[ W+H· + H· ) / W] (3)

[0124] In an exemplary embodiment, according to the vertical coordinate y of the current group, the average half-body height H of the current group and the average half-body height H of the next row Calculate the y coordinate of the next row , for example, can be calculated by formula (4):

[0125] y = yH / 2-H / twenty four)

[0126] In an exemplary embodiment, calculating the vertical coordinates of each row between the top row and the bottom row based on the vertical coordinates of any determined row in the detection area includes:

[0127] Repeat the following steps until the vertical coordinates of each row between the top row and the bottom row are calculated;

[0128] The row whose vertical coordinate has been calculated and the row above or below whose vertical coordinate has not been calculated is regarded as the determined row; the average half-body height of the row above or below the determined row is calculated based on the slopes of the left and right edges of the detection area at the vertical coordinate of the determined row, the seat width of the determined row, and the average half-body height of the determined row; the vertical coordinate of the row above or below the determined row is calculated based on the vertical coordinate of the determined row, the average half-body height of the determined row, and the average half-body height of the row above or below the determined row.

[0129] Here we need to replace the upper and lower edges of the detection area with the group vertical coordinate y H / 2.

[0130] The automatic seat distribution calculation method provided by the embodiment of the present disclosure can automatically establish a correspondence between the position coordinates in the picture obtained by the camera device and the seat number. Therefore, when a seated person in the camera device exhibits uncivilized behavior, the seat number of the person with uncivilized behavior is obtained based on the position coordinates of the person and the automatically established correspondence between the seat coordinates and the seat number, thereby automatically prompting the person with uncivilized behavior.

[0131] Figure 3 Schematic diagram of the prompt method of the embodiment of the present disclosure, such as Figure 3 As shown, the prompting method of the embodiment of the present disclosure includes:

[0132] S41: When the second camera device scans the seated persons in the monitoring image and finds that there is a person whose behavior characteristics meet the preset conditions, obtain the position coordinates of the person in the monitoring image;

[0133] S42: Obtain the seat number of the person according to the acquired position coordinates in the monitoring image and the correspondence between the seat coordinates and the seat number, and send a prompt message accordingly.

[0134] The correspondence between the position coordinates and the seat numbers is obtained by the automatic seat distribution calculation method as described above.

[0135] There is a data conversion relationship between the first camera and the second camera, through which the data of the second camera can be converted into data that conforms to the first camera, thereby utilizing the automatic calculation method of the seat distribution acquired by the first camera.

[0136] In an exemplary embodiment, the second camera device may be a PTZ dome camera, such as Uniview's Starlight integrated linkage camera.

[0137] In an exemplary embodiment, the preset conditions may be, for example, making or receiving calls, taking photos, and the like.

[0138] In an exemplary embodiment, the prompt may be given through a large screen, or through a prompt light on the seat.

[0139] The prompting method provided by the embodiment of the present disclosure, when a seated person in the camera device behaves in an uncivilized manner, obtains the seat number of the person with the uncivilized behavior based on the position coordinates of the person and the automatically established correspondence between the seat coordinates and the seat number, thereby automatically prompting the person with the uncivilized behavior, thereby maintaining a good movie or play viewing environment.

[0140] The specific application of the above-mentioned automatic seat distribution calculation method and prompt method is described in detail below with reference to specific examples.

[0141] The first step is to install cameras facing the audience in the theater: one wide-angle or panoramic camera and one PTZ dome camera, such as the Uniview Starlight integrated linkage camera. During installation, be sure to position the cameras at a moderate angle to ensure a 1 / 4-1 / 2 overlap between the front and back rows of seats, facilitating subsequent calculations.

[0142] The second step is to draw an area on the camera, which marks the viewing seating area (such as Figure 4 As shown in the figure, this serves as the boundary for triggering person tracking detection. The drawn area serves as the detection area. Two-dimensional coordinates are established for the entire image, for example, using the lower left corner of the image as the coordinate origin. When drawing the area, be careful to avoid aisles between seats. For larger auditoriums or theaters, multiple areas may need to be divided, or even multiple cameras may be used to cover them. This does not affect the specific calculation method.

[0143] In the third step, when a member of the audience enters the detection area, the wide-angle camera uses its human figure detection function to detect and track the target until the target stops moving laterally (current human figure detection relies on motion. As the audience takes their seat, the camera loses sight of the target, and when the target is lost, it is considered to have stopped moving laterally). The target's position is recorded, where the lateral position information is the average of the horizontal coordinates of the target's shoulder edges, and the vertical position information is the vertical coordinate of the shoulder. Following the same principle, the final coordinates (x, y), bust height (the height H of the human figure detection result identification box), and shoulder width (the difference in the horizontal coordinates of the two shoulders) of all members of the audience entering the area are recorded. The shoulders here can be obtained using algorithms based on existing human key points.

[0144] The fourth step is to calculate the audience's coordinate map based on the information obtained in the third step.

[0145] Assume that the marker coordinates are as follows Figure 5 The corresponding settlement method is as follows:

[0146] S1: Get the number of seats in each row and calculate the seat numbers of the rear audience (Note: the seat number format is: row m, number n):

[0147] First, calculate the number of seats in each row, classify the coordinates of all people, group those with similar y-axis coordinates, and perform the following calculation on a group of data:

[0148] When the number of people is 2 or greater: For example, if there are S2, S6, and S3, calculate the x-axis coordinate differences between S2 and S6, S6 and S3, and S2 and S3, denoting them as L1, L2, and L3, respectively, and take their absolute values. Then, take the x-axis coordinate difference between a and b, denoting them as L, and take its absolute value. After revising the precision of L1-L to tenths, calculate the greatest common divisor of these values. If the common divisor is close to the average shoulder width of the audience, the result is valid; otherwise, continue calculating with additional tenths.

[0149] When the number of people is 1, for example, S4, take the x-axis coordinate difference of S4-c and S4-d, record them as J1 and J2, take the absolute value after making the difference, and calculate the greatest common divisor after adding the x-axis coordinate difference of cd to ten digits of precision; if J1=J2, it will be impossible to calculate, and the shoulder width of the audience at S4 will be used instead.

[0150] The greatest common divisor obtained from the above process can be considered the seat width W of the corresponding row. The number of seats in that row is obtained by dividing the x-axis coordinate difference of the rule frame by W. Starting with the x-axis coordinate position of one spectator as the center and extending left and right at intervals of W to the nearest rule frame, the x-axis coordinate segment of each seat is obtained. Based on the segment to which the x-axis coordinates of the remaining spectators fall, the seat number behind that spectator can be determined. This process can be repeated multiple times for verification to ensure that each spectator has a seat.

[0151] Each set of data is calculated using the same method.

[0152] S2: Get the number of seats in the rule box and calculate the front row seat number of the audience:

[0153] Based on S1, the seats in the row where the audience is sitting can be filled.

[0154] When a person is seated, human shape detection is triggered by the upper body. Due to the seating distribution characteristics of the viewing area, there will be some vertical overlap between two adjacent rows of audience members within the video surveillance range. Using this characteristic, we can determine whether there is an empty row between two rows of audience members. The calculation method uses the principle that the target will be proportionally reduced from near to far. Under the premise of constraining the range of seats, the deformation ratio of adjacent rows is used, and the slope of the quadrilateral is combined to infer the seat size of the adjacent rows. The following calculation method is used as an example:

[0155] In S1, the audiences with similar y values ​​are grouped into one group. Take the group with the largest y value and use the ordinate of the audience in this group The y value is compared with the vertical coordinate value of the upper edge of the rule box (i.e. the detection area mentioned above). If the absolute value of the difference between the two values ​​is less than the average height of the identification box of the audience in this row, H / 2, it is determined to be the last row; if it is greater than, it is considered that there are still several rows of seats behind this row of spectators. The slope of the y-value corresponding to the position (e, f) (such as Figure 6 As shown), take the absolute value and do the reciprocal to get the coefficient of variation and According to the characteristic that the adjacent rows have the closest change ratio, the ratio of the width of the seats in the next row to the width of the current row is used as the height ratio of the previous row to the current row, and the average height of the marking frame of the previous row is calculated:

[0156] H = H / [( W+ H. + H. ) / W]

[0157] Identify the vertical coordinate of the audience group in the previous row y = y+ H / 2+ H / 2, and then compare the vertical coordinate value with the upper edge of the rule box. If the absolute value of the difference is less than H / 2, it is considered the last row, otherwise continue to use the same method to calculate the position of the previous row.

[0158] Then take the group with the smallest y value and calculate the ordinate of the audience group y, the same reason The y coordinate is first compared with the bottom edge of the rule box. If the absolute value of the difference is less than the average height of the marked box in this row, If the value is H / 2, it is considered the first row; if it is greater, it is considered that there are several rows of seats before this row. The same principle is used to calculate the average height of the marking frame of the next row:

[0159] H = H.[( W+ H. + H. ) / W]

[0160] Identify the vertical coordinate of the audience group in the next row y = y- H / 2- H / 2. Then compare the vertical coordinate value with the bottom edge of the rule box. If the absolute value of the difference is less than H / 2, it is considered the last row, otherwise continue to use the same method to calculate the position of the next row.

[0161] For the position between two rows, you can use the above method to calculate the previous row or the next row, and replace the upper and lower edges with the vertical coordinates of the audience group. y H / 2 is sufficient, and the calculation process will not be repeated here.

[0162] The calculations in step S2 above reveal the seating distribution for the entire detection area, along with the front row seat numbers for the audience. Combined with the rear row seat numbers from step S1, this completes the seat numbering. By mapping this to the actual theater / theater seating distribution, the audience's attendance can be mapped to the seating chart for subsequent detection reminders.

[0163] S3: While the wide-angle camera continuously detects people, the PTZ camera performs single-point detection of people making phone calls based on their coordinate distribution within the wide-angle camera. By simply zooming in on the seating area, the camera detects the head area to determine whether a person is making a phone call. This detection method is not a protected point in this case and is not described here. The first pass is performed after the show begins, typically triggered by a decrease in screen brightness (lights off) or when the occupancy rate reaches a certain threshold. After the first pass, a random scan of the audience seats begins. For any audience members found making phone calls, their coordinates are converted to the theater's seating distribution map. This is then linked to a warning light on the seat to alert the audience. This method is not only useful for detecting phone calls, but also for detecting other uncivilized or unsafe behaviors, such as taking photos.

[0164] The embodiment of the present disclosure automatically calculates the seat distribution without manual marking one by one; the embodiment of the present disclosure realizes non-cooperative detection throughout the whole process, avoiding the behavior of removing the seat in the middle of watching a movie, timely detection, and being able to remind without disturbing the viewing effect.

[0165] Figure 7 FIG. 1 is a schematic diagram of an automatic seat distribution calculation device according to an embodiment of the present disclosure. Figure 7 As shown, the seat distribution automatic calculation device of this embodiment includes: a memory and a processor;

[0166] The memory is used to store a program for automatically calculating the seat distribution;

[0167] The processor is used to read and execute the program for automatically calculating the seat distribution, and execute the automatic seat distribution calculation method as described above.

[0168] Figure 8 Schematic diagram of the prompt device of the embodiment of the present disclosure, such as Figure 8 As shown, the prompting device of this embodiment includes: a memory and a processor;

[0169] The memory is used to store a program for prompting;

[0170] The processor is used to read and execute the program for prompting, and perform the prompting method as described above.

[0171] Those skilled in the art will appreciate that all or part of the steps in the above method can be performed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software functional modules. The present disclosure is not limited to any particular combination of hardware and software.

[0172] The above are only preferred embodiments of the present disclosure. Of course, the present disclosure may also have many other embodiments. Without departing from the spirit and essence of the present disclosure, technical personnel familiar with the art can make various corresponding changes and modifications based on the present disclosure, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present disclosure.

Claims

1. A method for automatically calculating seat distribution, comprising: Acquire, through the first camera device, the position coordinates and bust height of seated persons within the detection area in the pre-calibrated monitoring image; Obtaining edge coordinates of the detection area; Calculating a correspondence between the position coordinates and the seat number according to the position coordinates, bust height, and edge coordinates of the detection area of ​​the seated person, so as to obtain the seat number corresponding to the seated person; Calculating the correspondence between the position coordinates and the seat number based on the position coordinates, bust height, and edge coordinates of the detection area of ​​the seated person includes: Calculating the seat width of each row based on the position coordinates of each group of seated persons and the edge coordinates of the detection area, wherein the seated persons whose difference in the vertical coordinates of the position coordinates of the seated persons is less than a first preset value are grouped as one group; Calculate the horizontal coordinate of each seat in each row according to the seat width of each row; Calculate the vertical coordinates of each row of seats according to the position coordinates, half-body heights, and edge coordinates of the detection area of ​​each group of seated persons; A correspondence between position coordinates and seat numbers is established according to the horizontal coordinate and vertical coordinate of each seat and the preset seat number distribution information in the detection area.

2. The method according to claim 1, wherein the seat width of each row is calculated based on the position coordinates of each group of seated persons and the edge coordinates of the detection area, comprising: For any group, the abscissa of the left and right edges of the detection area at the average value of the group's ordinates is used as the abscissa of the intersection of the row corresponding to the group and the left and right edges of the detection area; The seat width of the row corresponding to the group is calculated according to the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group and the left and right edges of the detection area.

3. The method according to claim 2, wherein the horizontal coordinate of each seat in each row is calculated according to the width of each row of seats, comprising: For each row, the abscissa of each seat in the row is calculated according to the seat width of the row and the abscissas of the intersection points of the row with the left edge and the right edge of the detection area.

4. The method according to claim 1, wherein the vertical coordinate of each row of seats is calculated based on the position coordinates, bust heights of the seated persons, and the edge coordinates of the detection area, comprising: Determine the vertical coordinate of the top row in the detection area according to the vertical coordinate of the group with the largest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the largest vertical coordinate, and the vertical coordinate of the upper edge of the detection area; Determine the vertical coordinate of the bottom row in the detection area according to the vertical coordinate of the group with the smallest vertical coordinate among all the groups, the average half-body height of the seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area; Calculate the ordinates of each row between the top row and the bottom row based on the ordinates of any determined row within the detection area; Among them, the group with the largest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the largest, and the group with the smallest ordinate among all groups means that the average value of the ordinates of the positions of the seated persons in this group is the smallest.

5. The method according to claim 4, wherein the vertical coordinate of the top row in the detection area is determined based on the vertical coordinate of the group with the largest average vertical coordinate among all the groups and the vertical coordinate of the upper edge of the detection area, comprising: When the vertical coordinate of the group is the maximum value among all groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the upper edge of the detection area is less than half of the average half-body height of the group, then the vertical coordinate of the group is determined to be the vertical coordinate of the top row; If the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the upper edge of the detection area is greater than half of the average half-body height of the group, then the group is used as the current group and the following operations are repeated until the vertical coordinate of the top row is determined: Calculating the average bust height of the row above the row corresponding to the current group based on the slopes of the left and right edges of the detection area at the ordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the ordinate of the previous row based on the ordinate of the current group, the average bust height of the current group, and the average bust height of the previous row; When the absolute value of the difference between the ordinate of the previous row and the ordinate of the upper edge of the detection area is less than half of the average half-body height of the previous row, the ordinate of the previous row is determined to be the ordinate of the top row; When the absolute value of the difference between the vertical coordinate of the previous row and the vertical coordinate of the upper edge of the detection area is greater than half of the average half-body height of the previous row, the vertical coordinate of the previous row is used as the vertical coordinate of the current group, and the average half-body height of the previous row is used as the average half-body height of the current group.

6. The method of claim 4, wherein determining the vertical coordinate of the bottom row in the detection area based on the vertical coordinate of the group with the smallest vertical coordinate among all groups, the average half-body height of seated persons in the group with the smallest vertical coordinate, and the vertical coordinate of the bottom edge of the detection area comprises: When the vertical coordinate of the group is the minimum value among all the groups, if the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is less than half of the average half-body height of the group, then the vertical coordinate of the group is determined to be the vertical coordinate of the bottom row; If the absolute value of the difference between the vertical coordinate of the group and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the group, then the group is used as the current group and the following operations are repeated until the vertical coordinate of the bottom row is determined; Calculating the average bust height of the next row corresponding to the current group based on the slopes of the left and right edges of the detection area at the vertical coordinate of the current group, the seat width of the current group, and the average bust height of the current group; calculating the vertical coordinate of the next row based on the vertical coordinate of the current group, the average bust height of the current group, and the average bust height of the next row; When the absolute value of the difference between the ordinate of the next row and the ordinate of the lower edge of the detection area is less than half of the average half-body height of the next row, the ordinate of the next row is determined to be the ordinate of the bottom row; When the absolute value of the difference between the vertical coordinate of the next row and the vertical coordinate of the lower edge of the detection area is greater than half of the average half-body height of the next row, the vertical coordinate of the next row is used as the vertical coordinate of the current group, and the average half-body height of the next row is used as the average half-body height of the current group.

7. The method of claim 4, wherein the step of calculating the vertical coordinates of each row between the top row and the bottom row based on the vertical coordinates of any determined row within the detection area comprises: Repeat the following steps until the vertical coordinates of each row between the top row and the bottom row are calculated; The row whose vertical coordinate has been calculated and the row above or below whose vertical coordinate has not been calculated is regarded as the determined row; the average half-body height of the row above or below the determined row is calculated based on the slopes of the left and right edges of the detection area at the vertical coordinate of the determined row, the seat width of the determined row, and the average half-body height of the determined row; the vertical coordinate of the row above or below the determined row is calculated based on the vertical coordinate of the determined row, the average half-body height of the determined row, and the average half-body height of the row above or below the determined row.

8. The method of claim 2, wherein the step of calculating the seat width of the row corresponding to the group of seated persons based on the horizontal coordinates of the group of seated persons and the horizontal coordinates of the intersections of the row corresponding to the group with the left edge and the right edge of the detection area comprises: When the number of seated persons in the group is greater than or equal to 2, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area; When the number of seated people in the group is 1, the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinate of the intersection of the row corresponding to the group with the left edge and the right edge of the detection area.

9. The method of claim 8, wherein the seat width of the row corresponding to the group is calculated based on the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, comprising: The accuracy of the absolute value of the difference between the horizontal coordinates of any two seated persons and the absolute value of the difference between the horizontal coordinates of the intersection points of the corresponding row and the left and right edges of the detection area are revised; Calculate the greatest common divisor of the absolute value of the difference between the horizontal coordinates of any two seated persons after revision, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group and the left and right edges of the detection area; When the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than a second preset value, the greatest common divisor is used as the seat width of the row corresponding to the group; When the difference between the greatest common divisor and the average shoulder width of the seated persons is less than a second preset value, the absolute value of the difference between the horizontal coordinates of any two seated persons after the revision and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area are modified, and the greatest common divisor of the absolute value of the difference between the horizontal coordinates of any two seated persons after the revision and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area is recalculated until the difference between the greatest common divisor and the average shoulder width of the seated persons is greater than the second preset value; Calculating the seat width of the row corresponding to the group based on the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, and the absolute value of the difference between the horizontal coordinates of the intersection points of the row corresponding to the group with the left edge and the right edge of the detection area, including: If the difference between the horizontal coordinates of the seated person and the horizontal coordinates of the intersections of the row corresponding to the group with the left and right edges of the detection area is not zero, the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, as well as the absolute values ​​of the differences between the horizontal coordinates of the seated person and the intersections of the row corresponding to the group with the left and right edges of the detection area, are rounded up to ten places, and the greatest common divisor is calculated, which is used as the seat width of the row corresponding to the group; If the difference between the absolute value of the difference between the horizontal coordinate of the seated person and the horizontal coordinates of the intersection of the row corresponding to the group and the left and right edges of the detection area is 0, the shoulder width of the seated person is used as the seat width of the row corresponding to the group.

10. A device for automatically calculating seat distribution, comprising: A memory and a processor; characterized in that: The memory is used to store a program for automatically calculating the seat distribution; The processor is configured to read and execute the program for automatically calculating seat distribution, and execute the method for automatically calculating seat distribution according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Cinema attendance statistical method and system

    CN105550663A

  • Seat recommending method and device

    CN107480823A