CN116110006B - Scenic spot tourist abnormal behavior identification method for intelligent tourism system - Google Patents

Scenic spot tourist abnormal behavior identification method for intelligent tourism system Download PDF

Info

Publication number
CN116110006B
CN116110006B CN202310390722.1A CN202310390722A CN116110006B CN 116110006 B CN116110006 B CN 116110006B CN 202310390722 A CN202310390722 A CN 202310390722A CN 116110006 B CN116110006 B CN 116110006B
Authority
CN
China
Prior art keywords
analyzed
area
tourist
obtaining
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310390722.1A
Other languages
Chinese (zh)
Other versions
CN116110006A (en
Inventor
童磊
孙光明
岳晓光
夏学文
詹英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Business University
Original Assignee
Wuhan Business University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Business University filed Critical Wuhan Business University
Priority to CN202310390722.1A priority Critical patent/CN116110006B/en
Publication of CN116110006A publication Critical patent/CN116110006A/en
Application granted granted Critical
Publication of CN116110006B publication Critical patent/CN116110006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a scenic spot tourist abnormal behavior identification method for an intelligent tourism system, which comprises the following steps: obtaining initial probability according to gray symmetry of each region to be analyzed by obtaining the region to be analyzed in the image to be detected and the corresponding reference region in each associated image, and further obtaining real probability by combining action difference and similarity in the corresponding motion contrast group to obtain the region of tourists to be analyzed; and obtaining the behavioral anomaly degree of the corresponding tourist area to be analyzed according to the neighborhood density, the movement anomaly degree and the anomaly index of each tourist area to be analyzed. According to the method, whether the area to be analyzed in the image to be detected is the tourist area or not is judged, then multi-angle and multi-dimensional analysis is carried out on the tourist area to be analyzed, and finally the abnormal behavior degree of the tourist area to be analyzed is obtained, so that the abnormal behavior recognition condition of the corresponding tourist is accurately judged.

Description

Scenic spot tourist abnormal behavior identification method for intelligent tourism system
Technical Field
The invention relates to the technical field of image processing, in particular to a scenic spot tourist abnormal behavior identification method for an intelligent tourism system.
Background
With the development of tourist industry, tourist attractions become one of the best choices of people in holidays, and more tourists are also involved. Meanwhile, with the popularization of video monitoring systems, video monitoring is widely used for tourist attraction supervision systems, real-time monitoring is carried out on a large number of areas, the dynamic state of the monitored areas is required to be continuously concerned, the defect of real-time monitoring is exposed, and a plurality of relevant news reports of tourist abnormal behavior events appear. These abnormal behaviors not only have adverse effects on social security, but also expose the shortages of scenic spot supervision systems.
In the prior art, only the motion state of a person is considered to judge the abnormal behavior, the crowd density of the person is ignored, so that whether the person has the abnormal behavior can be influenced, and the judgment result is inaccurate. And carrying out target detection and gesture recognition on the video frame to be detected, wherein the influence of the concentration of other surrounding targets on the abnormal condition of the target to be detected is not considered, and the judgment result has errors. The crowd characteristics are directly analyzed after the obtained monitoring image is preprocessed, the image obtained after preprocessing is not optimized, the position difference between the crowd and the dangerous area is not judged, and a large error may exist in the final analysis result. The abnormal behavior of the person is not analyzed at multiple angles, the abnormal behavior of the person is judged only according to a single condition, and a final recognition result has a great error.
Disclosure of Invention
In order to solve the technical problem that the abnormal behavior judgment angle of a person is incomplete in the prior art, the invention aims to provide a scenic spot tourist abnormal behavior identification method for an intelligent tourism system, and the adopted technical scheme is as follows:
the invention provides a scenic spot tourist abnormal behavior identification method for an intelligent tourism system, which comprises the following steps:
obtaining an image to be detected; taking at least two continuous frame images corresponding to the time before the image to be detected as associated images; obtaining a region to be analyzed in the image to be detected and a corresponding reference region in each associated image;
obtaining initial probability according to gray symmetry of each region to be analyzed; for any one area to be analyzed, forming a comparison area group by the area to be analyzed and each reference area respectively, and obtaining action difference and similarity in each comparison area group; screening out a motion control group according to the action difference in all control area groups corresponding to each area to be analyzed; obtaining the real probability of the corresponding region to be analyzed according to the initial probability of each region to be analyzed, the action difference and the similarity in the corresponding motion contrast group; screening tourist areas to be analyzed according to the real probabilities of all the areas to be analyzed;
Obtaining the neighborhood density of each tourist area to be analyzed; taking the associated image corresponding to the motion contrast group as a motion image corresponding to the tourist area to be analyzed; obtaining motion characteristics of the corresponding tourist areas to be analyzed according to the position change of each tourist area to be analyzed and a reference area in a motion image, and obtaining motion anomaly degree according to the motion characteristic difference between each tourist area to be analyzed and other tourist areas to be analyzed in a preset neighborhood range; obtaining abnormal indexes corresponding to the tourist areas to be analyzed according to the position relation between each tourist area to be analyzed and a preset dangerous area; obtaining the behavior anomaly degree of each tourist area to be analyzed according to the neighborhood density, the motion anomaly degree and the anomaly index of each tourist area to be analyzed;
and judging abnormal behavior recognition conditions of the corresponding tourists according to the behavior abnormality degree of each tourist area to be analyzed.
Further, the method for acquiring the region to be analyzed and the reference region comprises the following steps:
the gray value of each pixel point of the image to be detected is differed from the gray value of the pixel point at the corresponding position in the template image, and the gray difference value of each pixel point in the image to be detected is obtained; taking pixel points with gray level difference values larger than a preset gray level threshold value in the image to be detected as characteristic pixel points, and obtaining an area to be analyzed in the image to be detected according to the distribution of the characteristic pixel points;
The gray value of each pixel point of the associated image is differed from the gray value of the corresponding pixel point in the template image, and the associated gray difference value of each pixel point in the associated image is obtained; and taking the pixel points with the associated gray level difference value larger than the preset gray level threshold value in the associated image as associated pixel points, and obtaining a reference area in the associated image according to the distribution of the associated characteristic pixel points.
Further, the method for acquiring the initial probability of the region to be analyzed comprises the following steps:
obtaining a preset sampling number of sampling line segments in the horizontal direction in each area to be analyzed; the end points of the sampling line segments are contour edge pixel points corresponding to the area to be analyzed;
for any sampling line segment, taking pixel points which are positioned at the same positions on two sides of a midpoint pixel point on the sampling line segment as a group of symmetrical pixel groups, calculating the difference absolute value of gray values of the pixel points in each symmetrical pixel group, and normalizing the difference absolute value to obtain a first difference of the corresponding symmetrical pixel groups; taking the first difference average value of all symmetrical pixel groups on each sampling line segment as the symmetrical difference of the corresponding sampling line segment; and determining the initial probability of the corresponding region to be analyzed based on the symmetrical difference average value of all the sampling line segments in each region to be analyzed.
Further, the method for obtaining the action difference and the similarity in the control area group comprises the following steps:
for any control region group, obtaining the gray difference average value of gray differences between all pixel points of the region to be analyzed in the group and corresponding pixel points in the reference region; taking the ratio of the number of pixel points with the gray difference larger than a preset gray difference threshold value in the area to be analyzed to the number of all pixel points in the area to be analyzed as a first correction coefficient, and correcting the gray difference mean value by using the first correction coefficient to obtain the action difference of the control area group;
taking the absolute difference value of the gray average value of all pixel points in the region to be analyzed and the reference region in the group as a comparison value, and carrying out negative correlation mapping normalization on the comparison value to obtain sub-similarity; using shape up-down matching operators for the region to be analyzed and the reference region in the group to obtain shape similarity, and taking the shape similarity as a second correction coefficient; and correcting the sub-similarity by using a second correction coefficient to obtain the similarity of the control region group.
Further, the method for acquiring the true probability of each region to be analyzed comprises the following steps:
and for any one area to be analyzed, taking the mean value of the action difference and the similarity of the corresponding motion control group as a modification value, and multiplying the modification value by the initial probability of the area to be analyzed to obtain the real probability of the area to be analyzed.
Further, the method for acquiring the neighborhood density of the tourist area to be analyzed comprises the following steps:
connecting the midpoints of all the sampling line segments of the preset sampling number of each tourist area to be analyzed to obtain an area midline, and taking the midpoint of the area midline as the center of gravity of the corresponding tourist area to be analyzed;
constructing a selection window which takes the gravity center of each tourist area to be analyzed as the center according to the preset neighborhood size, and taking each other tourist area to be analyzed in the selection window as an interference tourist area;
and obtaining the gravity center distance between each tourist area to be analyzed and each interference tourist area, carrying out negative correlation mapping normalization on the accumulated sum of the gravity center distances to obtain a distance normalization value, and taking the product of the distance normalization value and the number of the interference tourist areas as the neighborhood density of the corresponding tourist area to be analyzed.
Further, the method for acquiring the motion anomaly degree of the tourist area to be analyzed comprises the following steps:
respectively obtaining the movement direction and the movement speed of the corresponding tourist area to be analyzed according to the gravity center position change of the corresponding reference area in each tourist area to be analyzed and the moving image; respectively obtaining the movement direction and movement speed of the corresponding interference tourist area according to the gravity center position change of the corresponding reference area in each interference tourist area and the moving image, and taking the movement direction and movement speed as movement characteristics;
Respectively carrying out negative correlation normalization on the motion direction difference value and the motion speed difference value of each tourist area to be analyzed and each interference tourist area to obtain a direction characteristic and a speed characteristic; carrying out negative correlation normalization on the sum of the direction characteristic and the speed characteristic to obtain sub-motion characteristics of each tourist area to be analyzed and each interference tourist area; and obtaining the motion anomaly degree of the corresponding tourist area to be analyzed by the sub-motion characteristic mean value of each tourist area to be analyzed and all the interference tourist areas.
Further, the method for acquiring the abnormal index of the tourist area to be analyzed comprises the following steps:
taking the distance between each tourist area to be analyzed and each preset dangerous area in the image to be detected as the dangerous distance corresponding to each tourist area to be analyzed; acquiring the dangerous direction of each tourist area to be analyzed according to the clockwise angle between the line segment connected with the central point of the dangerous area in the image to be detected and the horizontal line; taking the central point of each tourist area to be analyzed as a starting point, taking the central point of the dangerous area as an end point to obtain a direction vector, and taking an included angle between the direction vector and the movement direction of the corresponding tourist area to be analyzed as a dangerous direction included angle;
And taking the reciprocal of the product of the minimum dangerous distance of each tourist area to be analyzed and the dangerous direction included angle of the corresponding dangerous area as an abnormal index of the tourist area to be analyzed.
Further, the method for acquiring the behavioral anomaly degree of the tourist area to be analyzed comprises the following steps:
and calculating the product of the motion characteristics and the abnormal indexes of each tourist area to be analyzed, and taking the ratio of the product to the neighborhood density of the tourist area to be analyzed as the behavioral abnormality of the tourist area to be analyzed.
Further, the method for screening out the tourist area to be analyzed comprises the following steps:
if the true probability of the area to be analyzed is larger than the preset characteristic threshold, the area to be analyzed is the tourist area to be analyzed.
The invention has the following beneficial effects:
in the embodiment of the invention, the initial probability is obtained according to the gray symmetry of each region to be analyzed by obtaining the region to be analyzed in the image to be detected and the corresponding reference region in each associated image, and the preliminary judgment is carried out on whether each region to be analyzed is a tourist region. The real probability of the corresponding region to be analyzed is obtained according to the initial probability of each region to be analyzed, the action difference and the similarity in the corresponding motion contrast group, the region to be analyzed is further obtained, the region to be analyzed and the corresponding reference region are analyzed from the angles of behavior change and region similarity on the basis of preliminary judgment, whether the region to be analyzed is accurately judged, and the follow-up error is reduced. The neighborhood density of each tourist area to be analyzed is obtained, the influence of the surrounding other tourist areas on the abnormal conditions of the tourist area to be detected is considered, and the accuracy of the result is enhanced. And obtaining the motion anomaly degree according to the motion characteristic difference between each tourist area to be analyzed and other tourist areas to be analyzed in a preset neighborhood range, and judging the abnormal behavior of the tourist areas to be detected from the angle of the motion state. According to the position relation between each tourist area to be analyzed and the preset dangerous area, the abnormal index corresponding to the tourist area to be analyzed is obtained, so that the recognition result is more scientific, and the recognition error is reduced. According to the neighborhood density, the motion anomaly degree and the anomaly indexes of each tourist area to be analyzed, the behavior anomaly degree of the corresponding tourist area to be analyzed is obtained, the anomaly behavior can be rapidly judged, the error of the identification result is small, and the security of scenic spots is guaranteed. According to the method, whether the area to be analyzed in the image to be detected is the tourist area or not is judged, then multi-angle and multi-dimensional analysis is carried out on the tourist area to be analyzed, and finally the abnormal behavior degree of the tourist area to be analyzed is obtained, so that the abnormal behavior recognition condition of the corresponding tourist is accurately judged.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for identifying abnormal behavior of tourists in a scenic spot for an intelligent tour system according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description is given of specific implementation, structure, characteristics and effects of the method for identifying abnormal behavior of tourists in scenic spots for intelligent tourism system according to the present invention by combining the accompanying drawings and the preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the method for identifying abnormal behaviors of tourists in scenic spots for an intelligent tourism system.
Referring to fig. 1, a flowchart of a method for identifying abnormal behavior of tourists in a scenic spot for an intelligent tourism system according to an embodiment of the invention is shown, the method comprises:
step S1: obtaining an image to be detected; taking at least two continuous frame images corresponding to the time before the image to be detected as associated images; and obtaining the region to be analyzed in the image to be detected and the corresponding reference region in each associated image.
In the embodiment of the invention, a monitoring video image is acquired through a monitoring camera controlled by an intelligent tourism system, the obtained video image is a continuous multi-frame RGB image, and the continuous multi-frame RGB image is subjected to graying treatment by using a weighted graying method to obtain a continuous multi-frame gray image. And taking the real-time gray level image as an image to be detected. It should be noted that the method of weighted graying is a technical means well known to those skilled in the art, and will not be described herein.
In order to enhance the accuracy of the analysis result of the image to be detected, at least two continuous frame images corresponding to the previous moment of the image to be detected are used as associated images, and in the embodiment of the invention, the number of the associated images is set to be 5, and an implementer can change according to actual conditions.
Because the invention aims to identify abnormal behavior of tourists, the image to be detected has scenic spot environment areas except the tourist areas, the scenic spot environment areas can influence the judgment of the subsequent tourist areas, larger errors are generated, and the image to be detected needs to be segmented. Taking a background image of a scenic spot without tourists as a template image, and respectively dividing the image to be detected and each associated image according to the template image to obtain a region to be analyzed in the image to be detected and a corresponding reference region in each associated image, wherein the method specifically comprises the following steps of:
and taking the pixel point of which the gray difference value is larger than a preset gray threshold value in the image to be detected as a characteristic pixel point, and obtaining a region to be analyzed in the image to be detected according to the distribution of the characteristic pixel points. It should be noted that the area to be analyzed is not a real guest area, so that the area to be analyzed needs to be further screened in the subsequent step; and the pixel point of which the gray difference value is smaller than or equal to a preset gray threshold value in the image to be detected is regarded as the background pixel point.
Similarly, the gray value of each pixel point of the associated image is differed from the gray value of the corresponding pixel point in the template image, and the associated gray difference value of each pixel point in the associated image is obtained; and taking the pixel points with the associated gray level difference value larger than the preset gray level threshold value in the associated image as associated pixel points, and obtaining a reference area in the associated image according to the distribution of the associated characteristic pixel points.
In the embodiment of the present invention, the preset gray threshold is 10, and the numerical value of the specific preset gray threshold may be specifically set according to the specific implementation manner.
Because the associated image is a continuous frame image of the image to be detected, through the calculation in step S1, each area to be analyzed in the image to be detected can obtain five corresponding reference areas in the associated image.
Step S2: obtaining initial probability according to gray symmetry of each region to be analyzed; for any one area to be analyzed, forming a comparison area group by the area to be analyzed and each reference area respectively, and obtaining action difference and similarity in each comparison area group; screening out a motion control group according to the action difference in all control area groups corresponding to each area to be analyzed; obtaining the real probability of the corresponding region to be analyzed according to the initial probability of each region to be analyzed, the action difference and the similarity in the corresponding motion contrast group; and screening the tourist areas to be analyzed according to the real probabilities of all the areas to be analyzed.
For any one area to be analyzed, firstly, whether each area to be analyzed is a tourist area or not needs to be primarily judged, horizontal sampling can be carried out on each area to be analyzed, gray symmetry of each area to be analyzed is obtained, the larger the gray symmetry is, the more similar the outline of the area to be analyzed to the outline of a human body is, namely, the greater the possibility that the area to be analyzed is the tourist area is. Thus, the initial probability is obtained according to the gray symmetry of each area to be analyzed, specifically including:
and obtaining a preset sampling number of sampling line segments in the horizontal direction in each area to be analyzed, wherein the end points of the sampling line segments are contour edge pixel points corresponding to the area to be analyzed. The method for acquiring the sampling line segments in the embodiment of the invention comprises the following steps: selecting a preset sampling number of left edge pixel points on the left side of each area to be analyzed, obtaining right edge pixel points of the left edge pixel points corresponding to the right side of the area to be analyzed according to the horizontal direction, and taking line segments obtained by connecting each left edge pixel point with the corresponding right edge pixel points as sampling line segments to obtain the preset sampling number of sampling line segments. In the embodiment of the present invention, the preset number of samples is 100, and the numerical value of the specific preset number of samples may be specifically set according to the specific implementation manner.
And for any sampling line segment, taking the pixel points which are positioned at the same positions on both sides of the midpoint pixel point on the sampling line segment as a group of symmetrical pixel groups, calculating the difference absolute value of the gray value of the pixel point in each symmetrical pixel group, and normalizing the difference absolute value to obtain the first difference of the corresponding symmetrical pixel groups. Taking the first difference average value of all symmetrical pixel groups on each sampling line segment as the symmetrical difference of the corresponding sampling line segment; and determining the initial probability of the corresponding region to be analyzed based on the symmetrical difference average value of all the sampling line segments in each region to be analyzed. Obtaining initial probability according to an initial probability formula of the area to be analyzed, wherein the initial probability formula is as follows:
Figure SMS_1
in the method, in the process of the invention,
Figure SMS_2
representing an initial probability of the region to be analyzed,
Figure SMS_5
representing the number of sampled line segments,
Figure SMS_7
represent the first
Figure SMS_3
The number of symmetric pixel groups over the sampling line segments,
Figure SMS_6
represent the first
Figure SMS_8
Differences in gray values of pixel points within the symmetrical pixel groups,
Figure SMS_9
represents a natural constant of the natural product,
Figure SMS_4
representing an absolute value function.
In the formula of the initial probability, for any one sampled line segment,
Figure SMS_10
representing the first on the sampling line segment
Figure SMS_11
First difference of symmetrical pixel group
Figure SMS_12
Representing the symmetrical difference of the sampling line segment, namely a first difference average value of all symmetrical pixel groups on the sampling line segment; the symmetry difference is in inverse relation with the initial probability, and the smaller the symmetry difference is, the more symmetrical the pixel gray distribution of the corresponding sampling line segment is, namely the greater the possibility that the corresponding area to be analyzed is a tourist area is.
Figure SMS_13
And the symmetrical difference mean value of all the sampling line segments in the region to be analyzed is represented, and the larger the symmetrical difference mean value is, the more symmetrical the pixel gray distribution corresponding to the region to be analyzed is, namely the greater the possibility that the corresponding region to be analyzed is a tourist region is.
The initial probability of the region to be analyzed represents the symmetry condition of pixel gray distribution in the region to be analyzed, and if the initial probability is larger, the probability that the corresponding region to be analyzed is a tourist region is larger; if the initial probability is smaller, the probability that the corresponding area to be analyzed is the tourist area is smaller.
And (3) primarily judging whether the area to be analyzed is a tourist area or not by analyzing the symmetry condition of the pixel gray distribution in each area to be analyzed. In order to accurately screen the tourist areas, the subsequent analysis is more accurate, so that further judgment needs to be carried out on each area to be analyzed from multiple angles. In the embodiment of the invention, as each image to be detected has five corresponding associated images, each area to be analyzed can obtain reference areas in the five corresponding associated images. Therefore, the to-be-analyzed areas and each reference area form a comparison area group respectively, any one to-be-analyzed area corresponds to five comparison area groups, and further the five comparison area groups of the to-be-analyzed areas are analyzed respectively to obtain action differences and similarities in each comparison area group, and in the embodiment of the invention, the method specifically comprises the following steps:
1. And for any control region group, obtaining the gray difference average value of gray differences between all pixel points of the region to be analyzed in the group and corresponding pixel points in the reference region. And taking the ratio of the number of pixel points with the gray difference larger than a preset gray difference threshold value in the area to be analyzed to the number of all pixel points in the area to be analyzed as a first correction coefficient, and correcting the gray difference mean value by using the first correction coefficient to obtain the action difference of the control area group. In the embodiment of the present invention, the preset gray level difference threshold is 10, and the numerical value of the specific preset gray level difference threshold may be specifically set according to the specific implementation manner. Taking a comparison area group consisting of an area to be analyzed in the image to be detected and a reference area in an associated image of a previous frame as a final comparison group, taking the final comparison group as an example, and specifically taking an action difference formula of the final comparison group as an example, wherein the action difference formula of the final comparison group comprises the following steps:
Figure SMS_14
in the method, in the process of the invention,
Figure SMS_16
the difference in motion of the final control group is shown,
Figure SMS_19
representing the area to be analyzed in the final control group,
Figure SMS_22
indicating the reference area within the final control group,
Figure SMS_17
the number of pixels in the region to be analyzed, the gray level difference of which is larger than a preset gray level difference threshold value, is represented,
Figure SMS_20
representing the number of all pixels within the area to be analyzed,
Figure SMS_23
Representing the first zone in the area to be analyzed
Figure SMS_25
The gray value of each pixel point,
Figure SMS_15
representing the first in the reference area
Figure SMS_18
The gray value of each pixel point,
Figure SMS_21
representing the function of the absolute value of the equation,
Figure SMS_24
representing the function of taking the maximum value.
In the formula of the action difference of the final control group,
Figure SMS_26
the first correction coefficient of the final control group is represented, the first correction coefficient is in a direct proportion relation with the action difference, and the larger the first correction coefficient is, the larger the number of pixels with larger difference in the to-be-analyzed area of the final control group is, namely the greater the action change degree of the to-be-analyzed area and the reference area in the final control group is.
Figure SMS_27
Representing the correspondence between the region to be analyzed and the reference region in the final control group
Figure SMS_28
The gray scale difference of the individual pixel points,
Figure SMS_29
the gray level difference mean value of all corresponding pixel points of the to-be-analyzed area and the reference area in the final control group is represented, the gray level difference mean value and the action difference are in a proportional relation, and the larger the gray level difference mean value is, the larger the overall action difference between the to-be-analyzed area and the reference area in the final control group is, namely the greater the action change degree between the to-be-analyzed area and the reference area in the final control group is.
The action difference of the final comparison group indicates the action difference degree of the to-be-analyzed area and the reference area in the final comparison group, and if the action difference is larger, the action degree of the final comparison group is more similar to the action degree of the tourist area; if the motion difference is smaller, the motion degree of the final comparison group is less similar to the motion degree of the tourist area.
2. Taking the absolute difference value of the gray average value of all pixel points in the region to be analyzed and the reference region in the group as a comparison value, and carrying out negative correlation mapping normalization on the comparison value to obtain sub-similarity; using shape up-down matching operators for the region to be analyzed and the reference region in the group to obtain shape similarity, and taking the shape similarity as a second correction coefficient; and correcting the sub-similarity by using a second correction coefficient to obtain the similarity of the control region group. It should be noted that the shape up-down matching operator is a technical means well known to those skilled in the art, and will not be described herein. Also, taking the final control group as an example, the similarity formula of the final control group specifically includes:
Figure SMS_30
in the method, in the process of the invention,
Figure SMS_31
the similarity of the final control group is indicated,
Figure SMS_32
a second correction factor representing the final control group,
Figure SMS_33
represents the gray average value of all pixel points in the area to be analyzed,
Figure SMS_34
represents the gray-scale average of all pixels in the reference region,
Figure SMS_35
represents a natural constant of the natural product,
Figure SMS_36
representing an absolute value function.
In the similarity formula of the final control group,
Figure SMS_37
representing the control value of the final control group, the control value is inversely related to the similarity by
Figure SMS_38
And carrying out negative correlation mapping normalization on the control value to obtain sub-similarity, controlling the numerical value between 0 and 1, wherein the sub-similarity and the similarity are in a direct proportion relation, and the larger the sub-similarity is, the more similar the whole gray scale of the to-be-analyzed area and the reference area in the final control group is. The second correction coefficient represents the shape similarity between the to-be-analyzed area and the reference area in the final control group, the first The two correction coefficients are in a direct proportion relation with the similarity, and the larger the second correction coefficient is, the more similar the shape of the to-be-analyzed area and the reference area in the final control group is.
The similarity of the final control group indicates the overall similarity degree of the to-be-analyzed area and the reference area in the final control group, and if the similarity is larger, the possibility that the to-be-analyzed area in the final control group is a tourist area is larger; if the similarity is smaller, the likelihood that the area to be analyzed in the final control group is the tourist area is smaller.
Thus, for any one area to be analyzed, the action difference and the similarity in each control area group of the area to be analyzed are obtained. Whether the areas to be analyzed are tourist areas or not is accurately judged, and the motion control groups are screened according to the action differences in all the control area groups corresponding to each area to be analyzed.
Because the gray information of tourists in the continuous frame images cannot change and motion exists, the larger the initial probability of each region to be analyzed is, the more the corresponding region to be analyzed accords with the gray distribution characteristics of the tourist region; the greater the motion difference and the greater the similarity in the corresponding motion contrast group, the more the motion characteristics of the corresponding region to be analyzed are in accordance with the motion characteristics of the tourist region, and the more the similarity in position and morphology between the corresponding region to be analyzed and the tourist region is matched, namely the greater the likelihood that the corresponding region to be analyzed is the tourist region. Therefore, the true probability of the corresponding region to be analyzed is obtained according to the initial probability of each region to be analyzed, the action difference and the similarity in the corresponding motion contrast group, and the method specifically comprises the following steps: and for any one area to be analyzed, taking the mean value of the action difference and the similarity of the corresponding motion control group as a modification value, and multiplying the modification value by the initial probability of the area to be analyzed to obtain the real probability of the area to be analyzed. The true probability formula of the area to be analyzed specifically comprises:
Figure SMS_39
In the method, in the process of the invention,
Figure SMS_40
representing the true probability of the region to be analyzed,
Figure SMS_41
representing an initial probability of the region to be analyzed,
Figure SMS_42
representing the corresponding motion control group of the area to be analyzed,
Figure SMS_43
indicating the action difference in the corresponding motion control group of the region to be analyzed,
Figure SMS_44
and representing the similarity of the areas to be analyzed in the corresponding motion control group.
In the true probability formula of the region to be analyzed,
Figure SMS_45
and the average value of the action difference and the similarity of the corresponding motion control group is used as a modification value, the modification value and the real probability are in a direct proportion relation, and the larger the modification value is, the larger the similarity of the to-be-analyzed area and the tourist area in position and morphology is.
Figure SMS_46
The method is characterized in that the initial probability of the to-be-analyzed area is adjusted by using the modification value to obtain the real probability of the to-be-analyzed area, and the larger the real probability is, the more similar the to-be-analyzed area is to the tourist area, namely the higher the possibility that the corresponding to-be-analyzed area is the tourist area is.
The tourist area to be analyzed is screened out according to the real probability of all the areas to be analyzed, and the method specifically comprises the following steps of: if the true probability of the area to be analyzed is larger than the preset characteristic threshold, the area to be analyzed is the tourist area to be analyzed. In the embodiment of the present invention, the preset feature threshold is 0.85, and the numerical value of the specific preset feature threshold may be specifically set according to the specific implementation manner.
Step S3: obtaining the neighborhood density of each tourist area to be analyzed; taking the associated image corresponding to the motion contrast group as a motion image corresponding to the tourist area to be analyzed; obtaining motion characteristics of the corresponding tourist areas to be analyzed according to the position change of each tourist area to be analyzed and a reference area in a motion image, and obtaining motion anomaly degree according to the motion characteristic difference between each tourist area to be analyzed and other tourist areas to be analyzed in a preset neighborhood range; obtaining abnormal indexes corresponding to the tourist areas to be analyzed according to the position relation between each tourist area to be analyzed and a preset dangerous area; and obtaining the behavioral anomaly degree of the corresponding tourist area to be analyzed according to the neighborhood density, the movement anomaly degree and the anomaly index of each tourist area to be analyzed.
The tourist area to be analyzed is obtained through step S2, the behavioral abnormality analysis is performed on the tourist area to be analyzed, and in order to accurately determine the behavioral abnormality, the characteristics of the tourist area to be analyzed and the characteristics corresponding to the environment where the tourist area to be analyzed are required to be obtained, so the following steps are also required:
1. the application scene of the embodiment of the invention is a scenic spot, the scenic spot is used for planning a scenic spot playing route in order to ensure the safety of tourists, the planned route is generally a route with higher playing safety coefficient in the scenic spot, and the tourists can select to visit the scenic spot according to the planned route and have higher self safety coefficient. However, if the tourist selects to be involved in an unplanned route when visiting a scenic spot, the self-generated safety of the tourist has a great hidden trouble, and the tourist needs to be reminded in time. The crowd density of the environment where the tourists are located is analyzed, and whether the tourists are involved in an unplanned route can be indirectly judged. Thus, obtaining the neighborhood density of the guest region to be analyzed specifically includes:
And connecting the midpoints of all the sampling line segments of the preset sampling number of each tourist area to be analyzed to obtain an area midline, and taking the midpoint of the area midline as the center of gravity of the corresponding tourist area to be analyzed. The preset number of samples in step S2 is 100, where the preset number of samples is consistent with that in step S2.
And constructing a selection window which takes the gravity center of each tourist area to be analyzed as the center according to the preset neighborhood size, and taking each other tourist area to be analyzed in the selection window as an interference tourist area. In the embodiment of the present invention, the preset neighborhood size is 500×500, and the numerical value of the specific preset neighborhood size may be specifically set according to the specific implementation manner.
And obtaining the gravity center distance between each tourist area to be analyzed and each interference tourist area, carrying out negative correlation mapping normalization on the accumulated sum of the gravity center distances to obtain a distance normalization value, and taking the product of the distance normalization value and the number of the interference tourist areas as the neighborhood density of the corresponding tourist area to be analyzed. The neighborhood density formula of the tourist area to be analyzed specifically comprises the following steps:
Figure SMS_47
in the method, in the process of the invention,
Figure SMS_48
representing the neighborhood density of the guest region to be analyzed,
Figure SMS_49
indicating the number of corresponding interfering guest areas,
Figure SMS_50
represent the first
Figure SMS_51
The center of gravity distance of the interfering guest area and the guest area to be analyzed,
Figure SMS_52
An exponential function based on a natural constant is represented.
In the neighborhood density formula for the guest region to be analyzed,
Figure SMS_53
representing the accumulated sum of the gravity center distances of the tourist area to be analyzed and each interference tourist area, wherein the accumulated sum is inversely related to the neighborhood density, and the smaller the accumulated sum is, the greater the possibility of the tourist area to be analyzed in the crowd is, namely the abnormal behavior of the corresponding tourist is shownThe less likely it is. By passing through
Figure SMS_54
And carrying out negative correlation mapping normalization on the accumulated sums to obtain a distance normalization value, and controlling the numerical value between 0 and 1, wherein the distance normalization value and the neighborhood density are in a direct proportion relationship, and the larger the distance normalization value is, the larger the probability of the tourist area to be analyzed in the crowd is, namely the smaller the probability of abnormal behaviors of the corresponding tourists is. The effect of the number of interfering guest areas is to control the range of values of the distance normalization value.
The neighborhood density of the tourist area to be analyzed represents the crowd density of the area where the tourist area to be analyzed is located, and if the neighborhood density of the tourist area to be analyzed is larger, the likelihood of the tourist area to be analyzed in the crowd is larger, namely the likelihood of abnormal behaviors of corresponding tourists is also smaller; if the neighborhood density of the tourist area to be analyzed is smaller, the likelihood that the tourist area to be analyzed is in the crowd is smaller, namely the likelihood that abnormal behaviors occur to the corresponding tourists is also larger.
2. Judging abnormal behavior of the tourist area to be analyzed, and obtaining the motion characteristics of the tourist area to be analyzed by combining the position change of the tourist area to be analyzed and the corresponding reference area, and analyzing the abnormal behavior according to the motion characteristic difference of the tourist area to be analyzed and the tourist area to be interfered. Therefore, the method for acquiring the motion abnormality degree of the tourist area to be analyzed comprises the following steps:
obtaining all interference tourist areas of each tourist area to be analyzed in a selection window; and taking the associated image corresponding to the motion contrast group as a motion image corresponding to the tourist area to be analyzed to obtain a reference area corresponding to each interference tourist area in the motion image, wherein the method for obtaining the reference area corresponding to each interference tourist area in the motion image is consistent with the method for obtaining the reference area in the associated image in the step S1.
And respectively obtaining the movement direction and the movement speed of the corresponding tourist area to be analyzed according to the gravity center position change of the corresponding reference area in each tourist area to be analyzed and the moving image. And respectively obtaining the movement direction and the movement speed of the corresponding interference tourist area according to the gravity center position change of the corresponding reference area in each interference tourist area and the moving image, and taking the movement direction and the movement speed as movement characteristics. In the embodiment of the invention, the gravity center of the tourist area to be analyzed and the gravity center of the corresponding reference area in the moving image are placed in the same coordinate system, so that the gravity center coordinates of the tourist area to be analyzed and the gravity center coordinates of the corresponding reference area in the moving image are obtained, and further the movement characteristics of the tourist area to be analyzed are obtained. It should be noted that, the method for obtaining the motion feature is a technical means well known to those skilled in the art, and will not be described herein.
And respectively carrying out negative correlation normalization on the motion direction difference value and the motion speed difference value of each tourist area to be analyzed and each interference tourist area to obtain a direction characteristic and a speed characteristic, and carrying out negative correlation normalization on the sum value of the direction characteristic and the speed characteristic to obtain the sub-motion characteristic of each tourist area to be analyzed and each interference tourist area. And obtaining the motion anomaly degree of the corresponding tourist area to be analyzed by the sub-motion characteristic mean value of each tourist area to be analyzed and all the interference tourist areas. The motion abnormality degree formula of the tourist area to be analyzed specifically comprises the following steps:
Figure SMS_55
in the method, in the process of the invention,
Figure SMS_57
indicating the degree of motion abnormality of the guest area to be analyzed,
Figure SMS_61
indicating the number of corresponding interfering guest areas,
Figure SMS_64
representing the speed of movement of the guest area to be analyzed,
Figure SMS_58
represent the first
Figure SMS_60
By interfering with guest areasThe speed of the movement is determined by the speed of the movement,
Figure SMS_63
indicating the direction of movement of the guest area to be analyzed,
Figure SMS_65
represent the first
Figure SMS_56
The direction of movement of the guest area is disturbed,
Figure SMS_59
represents a natural constant of the natural product,
Figure SMS_62
representing an absolute value function.
In the motion abnormality formula of the guest area to be analyzed,
Figure SMS_66
representing the guest area to be analyzed and the first
Figure SMS_67
The speed differential of the individual interfering guest areas,
Figure SMS_68
representing the guest area to be analyzed and the first
Figure SMS_69
The direction difference of each interference tourist area, the speed difference and the direction difference are in a direct proportion relation with the abnormal degree of movement, the speed difference and the direction difference are respectively subjected to negative correlation normalization to obtain speed characteristics and direction characteristics, and meanwhile, the dimensions of the speed difference and the direction difference are uniformly processed.
Figure SMS_70
For the tourist area to be analyzed
Figure SMS_71
Sub-motion features of the interfering guest region are used for carrying out negative correlation normalization on the sum of the direction features and the speed features, and the sub-motion features and the motionsThe abnormal degree is in a direct proportion relation, and the larger the sub-motion characteristics are, the behavior and the first behavior of tourists corresponding to the tourist area to be analyzed are described
Figure SMS_72
The behaviors of the tourists corresponding to the interference tourist areas are more dissimilar, namely the behaviors of the tourists corresponding to the tourist areas to be analyzed are more abnormal.
The motion abnormality degree of the tourist area to be analyzed represents the motion abnormality degree of the tourist corresponding to the tourist of the tourist area to be analyzed, and if the motion abnormality degree of the tourist area to be analyzed is larger, the motion state of the tourist corresponding to the tourist of the tourist area to be analyzed is more abnormal, namely the behavior of the tourist corresponding to the tourist of the tourist area to be analyzed is more abnormal; if the motion anomaly degree of the tourist area to be analyzed is smaller, the motion state of the tourist corresponding to the tourist area to be analyzed is more normal, namely the behavior of the tourist corresponding to the tourist area to be analyzed is more normal.
3. The application scene of the embodiment of the invention is a scenic spot, and a sign or a marking reminder is usually arranged in each dangerous area in the scenic spot so as to achieve the purpose of warning the tourists, thereby ensuring the safety of the tourists and judging the abnormal behaviors of the tourists according to the position relation between the tourists and all the dangerous areas. Therefore, the method for acquiring the abnormality index of the tourist area to be analyzed comprises the following steps:
In the embodiment of the invention, firstly, a marker template image of a scenic spot dangerous area is acquired through priori knowledge, and a template matching algorithm is used for identifying in an image to be detected, so that each preset dangerous area in the image is acquired. It should be noted that, the template matching algorithm is a technical means well known to those skilled in the art, and will not be described herein.
And taking the distance between each tourist area to be analyzed and each preset dangerous area in the image to be detected as the dangerous distance corresponding to each tourist area to be analyzed. And acquiring the dangerous direction of the corresponding tourist area to be analyzed according to the clockwise angle of the line segment connected with the central point of the dangerous area in the image to be detected and the horizontal line of each tourist area to be analyzed. And taking the central point of each tourist area to be analyzed as a starting point, taking the central point of the dangerous area as an end point to obtain a direction vector, and taking the included angle between the direction vector and the movement direction of the corresponding tourist area to be analyzed as a dangerous direction included angle. And taking the reciprocal of the product of the minimum dangerous distance of each tourist area to be analyzed and the dangerous direction included angle of the corresponding dangerous area as an abnormal index of the tourist area to be analyzed. The abnormal index formula of the tourist area to be analyzed specifically comprises the following steps:
Figure SMS_73
In the method, in the process of the invention,
Figure SMS_74
an abnormality index representing a guest region to be analyzed,
Figure SMS_75
representing the minimum risk direction of the guest area to be analyzed and the nearest risk area,
Figure SMS_76
indicating the direction of movement of the guest area to be analyzed,
Figure SMS_77
representing the minimum hazard distance of the guest area to be analyzed,
Figure SMS_78
representing a function of maximizing the value of the function,
Figure SMS_79
representing an absolute value function.
In the anomaly index formula of the guest area to be analyzed,
Figure SMS_80
and the dangerous direction included angle of each tourist area to be analyzed and the nearest dangerous area is represented, the dangerous direction included angle and the abnormal index are in inverse proportion, and the smaller the dangerous direction included angle is, the more the movement direction of the tourist is towards the dangerous area, namely the more the behavior of the corresponding tourist is abnormal.
Figure SMS_81
The function of (1) is to normalize the included angle of dangerous directionAnd (5) melting. The minimum dangerous distance of the tourist area to be analyzed is in inverse proportion to the abnormality index, and the smaller the minimum dangerous distance is, the closer the position of the tourist is to the dangerous area is, namely, the more abnormal the behavior of the corresponding tourist is.
The abnormal index of the tourist area to be analyzed represents the position relation between the tourist area to be analyzed and the dangerous area, if the abnormal index of the tourist area to be analyzed is larger, the positions of the tourist area to be analyzed and the dangerous area are closer, namely the behaviors of the corresponding tourists are more abnormal; if the abnormal index of the tourist area to be analyzed is smaller, the positions of the tourist area to be analyzed and the dangerous area are not close, namely the corresponding tourist is normal.
4. The smaller the neighborhood density of each tourist area to be analyzed, the greater the motion anomaly degree and the greater the anomaly index, the more anomaly of the behaviors of the tourist corresponding to the tourist area to be analyzed is indicated. Therefore, the method for acquiring the behavioral anomaly degree of the tourist area to be analyzed comprises the following steps:
and calculating the product of the motion characteristics and the abnormal indexes of each tourist area to be analyzed, and taking the ratio of the product to the neighborhood density of the tourist area to be analyzed as the behavioral abnormality of the tourist area to be analyzed. The behavioral abnormality formula of the tourist area to be analyzed specifically comprises:
Figure SMS_82
in the method, in the process of the invention,
Figure SMS_83
indicating behavioral anomalies of the guest area to be analyzed,
Figure SMS_84
an abnormality index representing a guest region to be analyzed,
Figure SMS_85
indicating the degree of motion abnormality of the guest area to be analyzed,
Figure SMS_86
representing the neighborhood density of the guest region to be analyzed.
In the behavior anomaly degree formula of the tourist area to be analyzed, the motion anomaly degree is in a direct proportion relation with the behavior anomaly degree, and the larger the motion anomaly degree is, the more abnormal the motion state of the tourist area to be analyzed corresponding to the tourist is, namely the more abnormal the behavior of the tourist area to be analyzed corresponding to the tourist is. The abnormal index and the behavior abnormality degree are in a proportional relation, and the larger the abnormal index is, the closer the positions of the tourist area to be analyzed and the dangerous area are, namely, the more abnormal the behavior of the tourist corresponding to the tourist area to be analyzed is. The neighborhood density and the behavior anomaly degree are in inverse proportion, and the smaller the neighborhood density is, the smaller the likelihood that the tourist area to be analyzed is in the crowd is, namely, the more abnormal the behavior of the tourist area to be analyzed corresponding to the tourist is.
The behavior abnormality degree of the tourist area to be analyzed represents the motion state of the tourist area to be analyzed and the abnormality degree of the environment, and if the behavior abnormality degree of the tourist area to be analyzed is larger, the behavior of the tourist corresponding to the tourist area to be analyzed is more abnormal; if the degree of abnormality of the behaviors of the tourist areas to be analyzed is smaller, the behaviors of the tourist areas to be analyzed corresponding to the tourists are more normal.
Step S4: and judging abnormal behavior recognition conditions of the corresponding tourists according to the behavior abnormality degree of each tourist area to be analyzed.
Through the calculation of the step S1, the step S2 and the step S3, a corresponding degree of behavioral abnormality exists for each tourist area to be analyzed. Judging abnormal behavior recognition conditions of corresponding tourists according to the behavior abnormality degree of each tourist area to be analyzed, wherein the specific judging process comprises the following steps:
firstly, normalizing the behavior anomaly degree of each tourist area to be analyzed to obtain a behavior anomaly degree normalized value, wherein in the embodiment of the invention, the specific normalization method can be specifically set according to specific implementation manners.
If the behavior abnormality degree normalization value of the tourist area to be analyzed is smaller than a preset first abnormality threshold value, the behavior of the tourist corresponding to the tourist area to be analyzed is normal.
If the behavior abnormality degree normalization value of the tourist area to be analyzed is larger than or equal to the preset first abnormality threshold value and smaller than the preset second abnormality threshold value, the possibility that abnormal behaviors occur to the tourist corresponding to the tourist area to be analyzed is high, and important attention is required to be paid to the tourist.
If the behavior abnormality degree normalization value of the tourist area to be analyzed is larger than or equal to a preset second abnormality threshold value and smaller than a preset third abnormality threshold value, the tourist area to be analyzed is about to perform abnormal behaviors corresponding to the tourists, and the intelligent tour system gives a warning to the corresponding tourists.
If the behavior abnormality degree normalization value of the tourist area to be analyzed is larger than or equal to a preset third abnormality threshold value, abnormal behaviors of the tourist corresponding to the tourist in the tourist area to be analyzed are performed, and a worker needs to stop the abnormal tourist immediately.
In the embodiment of the present invention, the first abnormal threshold is preset to 0, the second abnormal threshold is preset to 0.5, and the third abnormal threshold is preset to 0.8, and the specific value can be specifically set according to the specific implementation manner.
In summary, the method and the device for identifying the abnormal behavior of the tourist in the image to be detected firstly judge whether the region to be analyzed in the image to be detected is the tourist region, then carry out multi-angle and multi-dimensional analysis on the region to be analyzed, finally obtain the abnormal behavior degree of the region to be analyzed, and further judge the abnormal behavior identification condition of the corresponding tourist.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (7)

1. A method for identifying abnormal behaviors of tourists in scenic spots for an intelligent tourism system, which is characterized by comprising the following steps:
obtaining an image to be detected; taking at least two continuous frame images corresponding to the time before the image to be detected as associated images; obtaining a region to be analyzed in the image to be detected and a corresponding reference region in each associated image;
obtaining initial probability according to gray symmetry of each region to be analyzed; for any one area to be analyzed, forming a comparison area group by the area to be analyzed and each reference area respectively, and obtaining action difference and similarity in each comparison area group; screening out a motion control group according to the action difference in all control area groups corresponding to each area to be analyzed; obtaining the real probability of the corresponding region to be analyzed according to the initial probability of each region to be analyzed, the action difference and the similarity in the corresponding motion contrast group; screening tourist areas to be analyzed according to the real probabilities of all the areas to be analyzed;
Obtaining the neighborhood density of each tourist area to be analyzed; taking the associated image corresponding to the motion contrast group as a motion image corresponding to the tourist area to be analyzed; obtaining motion characteristics of the corresponding tourist areas to be analyzed according to the position change of each tourist area to be analyzed and a reference area in a motion image, and obtaining motion anomaly degree according to the motion characteristic difference between each tourist area to be analyzed and other tourist areas to be analyzed in a preset neighborhood range; obtaining abnormal indexes corresponding to the tourist areas to be analyzed according to the position relation between each tourist area to be analyzed and a preset dangerous area; obtaining the behavior anomaly degree of each tourist area to be analyzed according to the neighborhood density, the motion anomaly degree and the anomaly index of each tourist area to be analyzed;
judging abnormal behavior recognition conditions of corresponding tourists according to the behavior abnormality degree of each tourist area to be analyzed;
the method for acquiring the initial probability of the region to be analyzed comprises the following steps:
obtaining a preset sampling number of sampling line segments in the horizontal direction in each area to be analyzed; the end points of the sampling line segments are contour edge pixel points corresponding to the area to be analyzed;
for any sampling line segment, taking pixel points which are positioned at the same positions on two sides of a midpoint pixel point on the sampling line segment as a group of symmetrical pixel groups, calculating the difference absolute value of gray values of the pixel points in each symmetrical pixel group, and normalizing the difference absolute value to obtain a first difference of the corresponding symmetrical pixel groups; taking the first difference average value of all symmetrical pixel groups on each sampling line segment as the symmetrical difference of the corresponding sampling line segment; determining initial probability of the corresponding region to be analyzed based on the symmetrical difference average value of all sampling line segments in each region to be analyzed;
The method for acquiring the true probability of each region to be analyzed comprises the following steps:
for any one area to be analyzed, taking the mean value of the action difference and the similarity of the corresponding motion control group as a modification value, and multiplying the modification value by the initial probability of the area to be analyzed to obtain the real probability of the area to be analyzed;
the method for screening the tourist area to be analyzed comprises the following steps:
if the true probability of the area to be analyzed is larger than the preset characteristic threshold, the area to be analyzed is the tourist area to be analyzed.
2. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 1, wherein the method for acquiring the area to be analyzed and the reference area comprises the following steps:
taking a background image of a scenic spot without tourists as a template image, and taking the difference between each pixel point of the image to be detected and the gray value of the pixel point at the corresponding position in the template image to obtain the gray difference value of each pixel point in the image to be detected; taking pixel points with gray level difference values larger than a preset gray level threshold value in the image to be detected as characteristic pixel points, and obtaining an area to be analyzed in the image to be detected according to the distribution of the characteristic pixel points;
the gray value of each pixel point of the associated image is differed from the gray value of the corresponding pixel point in the template image, and the associated gray difference value of each pixel point in the associated image is obtained; and taking the pixel points with the associated gray level difference value larger than the preset gray level threshold value in the associated image as associated pixel points, and obtaining a reference area in the associated image according to the distribution of the associated characteristic pixel points.
3. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 1, wherein the method for obtaining action difference and similarity in the comparison area group comprises the following steps:
for any control region group, obtaining the gray difference average value of gray differences between all pixel points of the region to be analyzed in the group and corresponding pixel points in the reference region; taking the ratio of the number of pixel points with the gray difference larger than a preset gray difference threshold value in the area to be analyzed to the number of all pixel points in the area to be analyzed as a first correction coefficient, and correcting the gray difference mean value by using the first correction coefficient to obtain the action difference of the control area group;
taking the absolute difference value of the gray average value of all pixel points in the region to be analyzed and the reference region in the group as a comparison value, and carrying out negative correlation mapping normalization on the comparison value to obtain sub-similarity; using shape up-down matching operators for the region to be analyzed and the reference region in the group to obtain shape similarity, and taking the shape similarity as a second correction coefficient; and correcting the sub-similarity by using a second correction coefficient to obtain the similarity of the control region group.
4. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 1, wherein the method for obtaining the neighborhood density of the tourist area to be analyzed comprises the following steps:
Connecting the midpoints of all the sampling line segments of the preset sampling number of each tourist area to be analyzed to obtain an area midline, and taking the midpoint of the area midline as the center of gravity of the corresponding tourist area to be analyzed;
constructing a selection window which takes the gravity center of each tourist area to be analyzed as the center according to the preset neighborhood size, and taking each other tourist area to be analyzed in the selection window as an interference tourist area;
and obtaining the gravity center distance between each tourist area to be analyzed and each interference tourist area, carrying out negative correlation mapping normalization on the accumulated sum of the gravity center distances to obtain a distance normalization value, and taking the product of the distance normalization value and the number of the interference tourist areas as the neighborhood density of the corresponding tourist area to be analyzed.
5. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 4, wherein said method for obtaining abnormal degree of movement of tourist area to be analyzed comprises:
respectively obtaining the movement direction and the movement speed of the corresponding tourist area to be analyzed according to the gravity center position change of the corresponding reference area in each tourist area to be analyzed and the moving image; respectively obtaining the movement direction and movement speed of the corresponding interference tourist area according to the gravity center position change of the corresponding reference area in each interference tourist area and the moving image, and taking the movement direction and movement speed as movement characteristics;
Respectively carrying out negative correlation normalization on the motion direction difference value and the motion speed difference value of each tourist area to be analyzed and each interference tourist area to obtain a direction characteristic and a speed characteristic; carrying out negative correlation normalization on the sum of the direction characteristic and the speed characteristic to obtain sub-motion characteristics of each tourist area to be analyzed and each interference tourist area; and obtaining the motion anomaly degree of the corresponding tourist area to be analyzed by the sub-motion characteristic mean value of each tourist area to be analyzed and all the interference tourist areas.
6. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 5, wherein said method for obtaining abnormal index of tourist area to be analyzed comprises:
taking the distance between each tourist area to be analyzed and each preset dangerous area in the image to be detected as the dangerous distance corresponding to each tourist area to be analyzed; acquiring the dangerous direction of each tourist area to be analyzed according to the clockwise angle between the line segment connected with the central point of the dangerous area in the image to be detected and the horizontal line; taking the central point of each tourist area to be analyzed as a starting point, taking the central point of the dangerous area as an end point to obtain a direction vector, and taking an included angle between the direction vector and the movement direction of the corresponding tourist area to be analyzed as a dangerous direction included angle;
And taking the reciprocal of the product of the minimum dangerous distance of each tourist area to be analyzed and the dangerous direction included angle of the corresponding dangerous area as an abnormal index of the tourist area to be analyzed.
7. The method for identifying abnormal behavior of tourists in scenic spot for intelligent tourism system according to claim 1, wherein the method for obtaining abnormal behavior degree of tourist area to be analyzed comprises the following steps:
and calculating the product of the motion characteristics and the abnormal indexes of each tourist area to be analyzed, and taking the ratio of the product to the neighborhood density of the tourist area to be analyzed as the behavioral abnormality of the tourist area to be analyzed.
CN202310390722.1A 2023-04-13 2023-04-13 Scenic spot tourist abnormal behavior identification method for intelligent tourism system Active CN116110006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310390722.1A CN116110006B (en) 2023-04-13 2023-04-13 Scenic spot tourist abnormal behavior identification method for intelligent tourism system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310390722.1A CN116110006B (en) 2023-04-13 2023-04-13 Scenic spot tourist abnormal behavior identification method for intelligent tourism system

Publications (2)

Publication Number Publication Date
CN116110006A CN116110006A (en) 2023-05-12
CN116110006B true CN116110006B (en) 2023-06-20

Family

ID=86261969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310390722.1A Active CN116110006B (en) 2023-04-13 2023-04-13 Scenic spot tourist abnormal behavior identification method for intelligent tourism system

Country Status (1)

Country Link
CN (1) CN116110006B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116451167B (en) * 2023-06-14 2023-08-22 中交天航环保工程有限公司 Intelligent identification method and system for groundwater pollution source

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203274A (en) * 2016-06-29 2016-12-07 长沙慧联智能科技有限公司 Pedestrian's real-time detecting system and method in a kind of video monitoring
CN114898342A (en) * 2022-07-15 2022-08-12 深圳市城市交通规划设计研究中心股份有限公司 Method for detecting call receiving and making of non-motor vehicle driver in driving
CN114998993A (en) * 2022-06-09 2022-09-02 重庆理工大学 Combined pedestrian target detection and tracking combined method in automatic driving scene

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509151A (en) * 2011-11-08 2012-06-20 上海交通大学 Video-processing-based crowd density and distribution estimation method
CN106897658B (en) * 2015-12-18 2021-12-14 腾讯科技(深圳)有限公司 Method and device for identifying human face living body
CN109902612B (en) * 2019-02-22 2021-01-08 北京工业大学 Monitoring video abnormity detection method based on unsupervised learning
CN111428681A (en) * 2020-04-09 2020-07-17 福建省通通发科技发展有限公司 Intelligent epidemic prevention system
CN112052809A (en) * 2020-09-10 2020-12-08 四川创客知佳科技有限公司 Facility monitoring and protecting method based on intelligent park
KR102309111B1 (en) * 2020-11-27 2021-10-06 가천대학교 산학협력단 Ststem and method for detecting abnomalous behavior based deep learning
CN113657211A (en) * 2021-07-30 2021-11-16 浙江大华技术股份有限公司 Early warning method, device and system for abnormal behavior and storage medium
CN115880765A (en) * 2021-09-27 2023-03-31 顺丰科技有限公司 Method and device for detecting abnormal behavior of regional intrusion and computer equipment
CN115082847A (en) * 2022-05-17 2022-09-20 广东职业技术学院 Method, system, equipment and computer storage medium for finding lost tourist attraction
CN115880784B (en) * 2023-02-22 2023-05-09 武汉商学院 Scenic spot multi-person action behavior monitoring method based on artificial intelligence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203274A (en) * 2016-06-29 2016-12-07 长沙慧联智能科技有限公司 Pedestrian's real-time detecting system and method in a kind of video monitoring
CN114998993A (en) * 2022-06-09 2022-09-02 重庆理工大学 Combined pedestrian target detection and tracking combined method in automatic driving scene
CN114898342A (en) * 2022-07-15 2022-08-12 深圳市城市交通规划设计研究中心股份有限公司 Method for detecting call receiving and making of non-motor vehicle driver in driving

Also Published As

Publication number Publication date
CN116110006A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN110766095B (en) Defect detection method based on image gray level features
CN113592828B (en) Nondestructive testing method and system based on industrial endoscope
CN111563896B (en) Image processing method for detecting abnormality of overhead line system
CN116110006B (en) Scenic spot tourist abnormal behavior identification method for intelligent tourism system
CN116137036B (en) Gene detection data intelligent processing system based on machine learning
CN115841488B (en) PCB hole inspection method based on computer vision
CN111539927B (en) Detection method of automobile plastic assembly fastening buckle missing detection device
CN113592839B (en) Distribution network line typical defect diagnosis method and system based on improved fast RCNN
CN116402863B (en) Intelligent analysis and early warning system for building construction monitoring data
CN115880674B (en) Obstacle avoidance steering correction method based on unmanned mine car
CN116862910B (en) Visual detection method based on automatic cutting production
CN116385948B (en) System and method for early warning railway side slope abnormality
CN111242026A (en) Remote sensing image target detection method based on spatial hierarchy perception module and metric learning
CN117876971B (en) Building construction safety monitoring and early warning method based on machine vision
CN111582270A (en) Identification tracking method based on high-precision bridge region visual target feature points
CN112017213B (en) Target object position updating method and system
CN117475353A (en) Video-based abnormal smoke identification method and system
CN115797411B (en) Method for online recognition of hydropower station cable bridge deformation by utilizing machine vision
CN116503912A (en) Security check early warning method based on electronic graph bag
CN114792300B (en) X-ray broken needle detection method based on multi-scale attention
CN114677428A (en) Power transmission line icing thickness detection method based on unmanned aerial vehicle image processing
CN114418983A (en) Equipment risk detection method based on intelligent Internet of things
CN118172296B (en) Fire source accurate positioning method based on image processing
CN109886133A (en) A kind of ship detection method and system based on remote sensing image
CN112508986B (en) Water level measurement method based on deep convolutional network and random field

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant