Method and device for performing image identification
Patent Information
- Application Number
- SA114350742
- Authority / Receiving Office
- SA · SA
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2014-09-17
- Publication Date
- 2015-08-30
- Estimated Expiration
- 2034-09-17
AI Technical Summary
Existing methods for real-time image identification on mobile stations face issues with high traffic consumption and ineffective feedback due to manual operation requirements and unclear frames, leading to inefficient data transmission and identification.
Implementing motion estimation on video frames captured by a mobile station's camera to determine a motion state, sending only clear frames to a cloud server for identification, thereby reducing data transmission and improving feedback efficiency.
This approach reduces traffic consumption and enhances identification accuracy by transmitting only clear frames, ensuring efficient data transfer and effective feedback on image recognition results.
Abstract
Description
<h2 style=";text-align:left;direction:ltr">Full description<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Background of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The present application relates to image processing and recognition techniques, specifically, methods and systems for implementing image recognition on an end device.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A solution for implementing real-time image identification on an end device, e.g., a mobile station, includes: obtaining a video frame of a target using a camera on the mobile station, sending the video frame to a cloud server; performing, via the cloud server, identification on the independent video frame, determining corresponding description information, and feeding back the description information to the mobile station for display.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some examples, data collection can be performed from the resulting video frame on various objects, such as a book cover, CD cover, movie poster, barcode, two-dimensional code, or commodity logo. After receiving the video frame, the cloud server feeds back description information, including purchase status, comment information, and the like for the relevant goods. Using this method, image-related information is obtained immediately after the image is captured, providing convenience for customers.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Current mobile stations and data collection and exchange implementation methods mainly include two methods, which are described in particular below:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the first method, a target is drawn by targeting it with the mobile station's camera, and the resulting video frame is sent to the mobile station's cloud server. However, this method has the following disadvantages: Operation requires manual operation after the target is targeted, which is inconvenient. Furthermore, if the target is not targeted or if the hand shakes, the cloud server cannot perform image identification, and therefore the mobile station cannot successfully obtain description information about the target.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the second method, data collection is performed in real time based on images captured by a camera, and the collected image data is then sent to a cloud server. Although this method does not require manual shooting and is convenient to operate, it also has the following disadvantages: Since each collected video frame is sent to the cloud server in real time, a large amount of traffic is consumed and bandwidth is occupied; in addition, since some collected data frames are unclear, the cloud server cannot perform identification and does not provide effective feedback on the identification results.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> As can be seen, in the fields of previous methods for implementing real-time image identification on a mobile station, there are the following drawbacks: large traffic consumption, and feedback of the identification result cannot be implemented effectively.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> General description of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The present disclosures provide methods and systems for providing recommendations during a conversation session.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">According to some implementations of the present application, the method of recognizing an image is implemented in an electronic device having one or more processors, memory, and a camera.<h2 style=";text-align:left;direction:ltr">The method includes obtaining a sequence of video frames including at least a first video frame and a second video frame captured by the camera, the first video frame being captured before the second video frame; determining a particular motion state of the camera associated with each video frame in the sequence of video frames, which includes determining a first motion state of the camera associated with the second video frame by performing a motion estimation of the first video frame and the second video frame; determining whether the camera has undergone a motion state transition from a particular motion state to a particular stationary state between the capture of two successive video frames in the sequence of video frames; and, subject to determining that the camera has undergone a motion state transition from a particular motion state to a particular stationary state between the capture of two successive video frames in the sequence of video frames, determining whether a last video frame of the two successive video frames is eligible for transmission according to a predetermined transmission criterion.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, a device includes one or more processors, memory, a camera, and one or more program modules stored in memory and designed to be executed by the one or more processors. The one or more program modules include instructions for executing the method described above. In another aspect, a non-temporary computer-readable storage medium has instructions stored thereon that, when executed by a device, cause the device to execute the method described herein.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The various features of the current application are shown in the description items below.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Brief explanation of the drawings<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The aforementioned features and characteristics of the application as well as its additional features and characteristics will be more clearly understood later in this document as a result of a detailed description of the preferred models when taken in conjunction with the drawings.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">To more clearly illustrate the technical solutions according to the current application forms, the accompanying drawings are briefly described below. The accompanying drawings in the following description represent only some of the forms from the current application; other drawings may be obtained according to the accompanying drawings without any creative effort by persons skilled in the art.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 1 is a schematic flowchart of a method for implementing image recognition on a mobile terminal according to some embodiments of the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2 is a schematic flowchart of a method for implementing image recognition on a mobile terminal according to some embodiment of the current application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3 is a schematic flowchart of a method for performing motion estimation according to some model of current demand.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 4 shows typical schematic diagrams for determining the matching block according to some models of current demand.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 5 is a schematic block diagram of a mobile station where the image recognition method discussed in Figures 1-3 is implemented according to some embodiments of the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 6 is a block diagram of a server-client environment according to some embodiments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 7 is a block diagram of a client device according to some embodiments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 8 is a block diagram of a server system according to some embodiments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figures 9A-9E are flowchart diagrams of a method for implementing image recognition on an end device according to some embodiments of the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Similar reference numbers indicate similar parts throughout multiple views of the drawing.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Detailed description:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Reference is now made to the models, examples of which are illustrated in the accompanying drawings. In the following detailed description, several specific details are given to provide a complete understanding of the subject matter covered in this document. However, it will be evident to one skilled in the art that the subject matter can be implemented without these specific details. In other cases, well-known methods, procedures, components, and circuits are not described in detail to avoid ambiguity in aspects of the models.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The following clearly and completely describes the technical solutions in the embodiments of the present application with reference to the drawings attached to the embodiments of the present application. Obviously, the described embodiments are only a part, other than all embodiments of the present application. All other embodiments produced by persons of ordinary skill in the art based on the embodiments of the present application without inventive efforts could fall within the scope of protection of the present application. In the process of implementing the present application, for example, in the process of collecting data, during a practical application, a user first opens the camera, moves the camera to target a target, and then performs data collection using the camera, which represents a process of moving to a stationary state. Accordingly, in the present application, the moving state of the collected video frame is determined. When it is known that the moving state of the video frame is from moving to stationary, it is determined to be a clear frame image, and the clear frame image is then transmitted to a cloud server.<h2 style=";text-align:left;direction:ltr">In this way, only the clear frame image is sent to the cloud server, which provides the traffic bandwidth. Furthermore, since the cloud server provides feedback with the identification result based on the clear frame image, the identification result is more efficient.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 1 is a schematic flowchart of a method 100 for performing image recognition on an end device, e.g., a mobile station, according to some embodiments of the present application. In some embodiments, the method 100 is performed on real-time images captured by the mobile station. In some embodiments, data collection (101) is performed in real time using a camera from the mobile station, and a video frame is obtained. In some embodiments, motion estimation is performed (102) on the video frame, and a motion state is determined for the video frame.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, frame-by-frame assembly of an image is performed by moving the camera. Motion estimation is performed on a video frame acquired in real time to determine the motion state of the video frame. In some embodiments, motion estimation is used in video coding techniques. In the present application, motion estimation is used to process a video frame collected using a mobile station camera to determine the motion state of the video frame. In some embodiments, a motion vector can be used to determine the motion state of the video frame, comprising: calculating a motion vector between a current video frame and a previous video frame, wherein the motion vector includes a motion amplitude and a motion direction; and determining the motion state of the video frame using the motion vector.<h2 style=";text-align:left;direction:ltr">In some embodiments, the motion estimation is used to compute a motion vector between the current video frame and the previous video frame, and the steps used may include obtaining a center space pixel of the previous video frame; using the center space of the current video frame as a starting point, searching for an area, surrounded by a pixel similar to the center space pixel of the previous video frame, to be defined as a match block; and using a position vector between the center space of the current video frame and the match block as a motion vector.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The motion state includes a motion state, a steady state, a motion-to-steady state, and a steady state to a motion state. The motion state of a video frame is determined using a motion vector in several ways, which can be adjusted according to actual needs. For example, determining the motion state of a video frame using a motion vector includes reading a stored reference motion state. In some embodiments, when the reference motion state is a steady state, and each of the amplitudes of N consecutive frames from the current frame is greater than a threshold value for the first motion, where N is a natural number, and the current frame is the first frame, the motion states of the first frame to the (N+1)th frame are determined to be a steady state. The reference motion state is not a steady state, and the (N+1)th motion state is determined to be from a steady state to a motion state, and the reference motion state is changed accordingly. When the reference motion state is a steady state, and the amplitude of the current frame is less than the threshold value for the first motion, the motion state of the current frame remains constant, and the reference motion state remains constant.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, when the reference motion state is a move state, and the amplitudes of the N consecutive frames from the current frame are less than a second move threshold value, where N is a natural number, and the current frame is the first frame, the move states of the first frame to the (N+1)th frame are a move state, the reference motion state remains a move state, and the (N+1)th move state is determined to be from a move state to a stationary state, and the reference motion state is changed to a stationary state. When the reference motion state is a move state, and the amplitude of the current frame is greater than the second move threshold value, the move state of the current frame remains a move state, and the reference motion state remains a move state. In some embodiments, after determining that the reference motion state is a stationary state, where the amplitude of the current frame is less than the first move threshold value, the method further comprises: determining whether the amplitude of the move is greater than a third move threshold value. When the amplitude of the move is greater than the third move threshold value, the move of the current frame is a precise move, and the reference motion state is not a stationary state.<h2 style=";text-align:left;direction:ltr">When the move states of M consecutive frames from the current frame are exact moves in the same direction, and the current frame is the first frame, the move state of the Mth frame is determined to be from a stationary state to a moving state, and the reference move state is changed to a moving state, where M is a natural number.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, when the reference motion state is a stationary state, if the motion amplitudes of two successive frames after the previous video frame are greater than S1, and the motion directions of the two successive frames are in opposite directions, it is determined to be a jiggling state, and the motion states of the two successive frames are determined to remain stationary.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, if the motion amplitudes of two successive frames after the previous video frame are greater than S1, and the motion directions of the two successive frames are in the same direction, the motion state of the last frame of the two successive frames is determined to be from stationary to moving.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, (103) it is determined whether the video frame's motion state is determined from a motion state to a still state. When the video frame's motion state is from a motion state to a still state, the video frame is determined to be a clear frame image, and the clear frame image is sent to a cloud server. If the video frame's motion state is determined not to be from a motion state to a still state, no data frame is sent to the cloud server.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, to improve the accuracy of clear frame detection, after determining that the video frame's motion state is from moving to stationary, corner detection may also be performed. In some embodiments, corner detection includes: counting the number of features, such as corner symbols, of the video frame; and determining whether the number of corner symbols is greater than the threshold number of sides. When the number of corner symbols is greater than the threshold number of sides, the clear frame is determined to be a clear frame image. When the number of corner symbols is not greater than the threshold number of sides, the frame is not determined to be a fuzzy frame image.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, when the video frame's transition state is determined to be from a moving state to a stationary state, and the video frame is determined to be a clear frame image, the clear frame image is sent to a cloud server. In some application scenarios, whether to send a clear frame image may be determined based on whether the transition states of multiple consecutive video frames are stationary. For example, assuming the current frame is the first frame, if the first frame to the (N+1)th frame is determined to be in the stationary state, the (N+1)th frame is determined to be the clear frame, and then the clear frame image is sent to a cloud server, where N is a natural number.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, a feedback identification result is received from a cloud server (104) at the end device, and the identification result (104) is displayed. After the cloud server receives the video frame, the cloud server provides feedback relating to description information, which may include purchase status, education information, and the like for the relevant goods.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the current application, motion estimation is performed on a collected video frame to determine the motion state of the video frame. When the video frame's motion state is determined to be moving to stationary, and the video frame is determined to be a clear frame image, the clear frame image is sent to a cloud server. The current application uses a method where data collection is efficiently performed using a camera, and does not require the user to manually take a picture, making it convenient. In addition, only the clear frame image is sent to the cloud server, rather than sending all the collected video frames to the cloud server in real time, thus saving traffic and bandwidth. Since the cloud server feeds back the identification result based on the clear frame image, the identification result is more efficient.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2 illustrates a schematic flowchart of a method 200 for performing image recognition on a mobile station according to some embodiments of the present application. In some embodiments, data collection (201) is performed in real time using a camera from the mobile station, and a video frame is obtained. In some embodiments, motion estimation is performed (202) on the video frame, and a motion state of the video frame is determined (202). For the description, the video frame on which the motion estimation is performed is called a video frame to be processed in the following description items.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the present application, the motion estimation concept used in video coding is used to process images captured by a mobile station's camera. The video sequence and the image sequence of the mobile station's camera have the same image sequence relationship; therefore, the motion estimation algorithm is general. However, there are also differences between the two scenarios. For example, the image generated by the mobile station's camera generally has lower resolution, and during practical user use, the mobile station does not move with a large amplitude. The motion estimation algorithm used for the overall state in video coding is very slow, and generally, real-time effect cannot be achieved even on a PC. Therefore, considering these differences, the present application improves the motion estimation algorithm implemented in video coding, achieving greater efficiency across different mobile stations with lower CPU resource consumption, and essentially eliminating CPU resource consumption.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 3 is a schematic flowchart of a method 300 for performing motion estimation. In some embodiments, a center area pixel of a video frame to be processed is obtained and stored (301). In some embodiments, a center area pixel of a video frame prior to the video frame to be processed is also obtained (302). In some embodiments, each time the mobile station collects a video frame, the mobile station stores a center area pixel of the video frame. For example, a gray pixel value of the center area is stored. In this step, a stored center of the gray pixel value of a previous video frame adjacent to the video frame to be processed is extracted. The center area of the video frame to be processed (303) is used as a starting point, and a search for an area, surrounded by a pixel similar to the center area pixel of the previous video frame, is selected (303) as a match block.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 4 illustrates exemplary schematic diagrams of the matching block determination in step 303 of method 300 according to some embodiments of the present application. As illustrated in Figure 4, the first video frame 400, i.e., the previous video frame, comprises a grid-coded square area 410 in the center space. The second video frame 450, i.e., the video frame to be processed, comprises a cross-sectioned area 460 in the center space. In some embodiments, a neighboring region surrounding the cross-sectioned block 460 from the center of the peripheral space is searched for an area 470 that has a gray pixel value similar to the gray pixel value of the center area 410 in the previous video frame, and the area 470 is designated a matching block 470. As illustrated in Figure 4, the grid-coded square area in the to-be-processed video frame 450 is the matching block 470 obtained by the search.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the grayscale pixel with center area (x, y) 410 in the previous video frame 400 is denoted I(x, y). A search block (e.g., area 470), used to be identical to the center area 410 of the previous video frame 400, in the video frame to be processed 450, has a grayscale pixel denoted I'(x, y). The sum of the squares of the difference between I(x, y) and I'(x, y) is used as an index to evaluate the block symmetry. Assuming the block size contains N*N pixels, the sum of the square errors, S, is:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> (1)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The block with the lowest S calculated according to the above formula (1) is used as the matching block 470. A motion vector (e.g., vector 480) is determined between the matching block 470 and the center block 460 for the video frame to be processed 450 according to the position from the matching block 470 to the center block 460. The vector 480 in Figure 4 includes the direction of movement and the amount of movement (i.e., the length of the vector 480).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, an approximation algorithm is used in the preceding search. For example, a long step length is first used for the search, and a space with a relatively large symmetry is defined. The step length is then reduced in the definition space, and the symmetry is evaluated. This step is performed by convergence to obtain the final search result for defining the matching block. To ensure the algorithm's speed, if the video frame size is very large, exceeding a threshold value, a sampling operation may be performed first. For example, a 2000 × 2000 frame size is resized to a 400 × 400 frame size during sampling. In Figure 4, a rectangular region (e.g., the first video frame is 400 and the second video frame is 450) and a square region (e.g., the matching block is 470) are used to denote the matching block. In the implementation of the operation, any other suitable shaped matching, such as a diamond matching and a circle matching, may also be used to implement the matching operation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In motion estimation, in addition to the sum-squared error identification method, other identification methods, such as mean square error, set absolute error, and set mean error, can also be used. In addition to the convergence search algorithm, other search algorithms, such as three-step search and diamond search, can also be used in practical applications.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Referring again to Figure 3, a position vector is calculated between the matching block 470 and the center block 460 for the video frame to be processed 450 (304), and the position vector is used as a motion vector (304). In some embodiments, the calculated motion vector includes a direction of motion and a magnitude of motion.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the video frame's motion state (305) is determined using a move vector. In the current application, the video frame's motion state has the following four states: moving, still, moving to still, and still to moving. In some embodiments, when the state is determined to be moving to still, the image is ready for transmission.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the move-to-steady state and the steady-to-move state may use different magnitude threshold values. In the image definition application, the magnitude threshold value for the move-to-steady state is relatively high, and the magnitude threshold value is indicated by the second move threshold value. The magnitude threshold value for the steady-to-move state is relatively low, and the magnitude threshold value is indicated by the first move threshold value. In some embodiments, the first move threshold value is lower than the second move threshold value.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The mobile station stores a reference motion state, and the reference motion state can be extracted from the stored state. The motion state of the video frame to be processed can then be determined by combining the reference motion state, the first motion threshold, and the second motion threshold. In some embodiments, the stored reference motion state is detected such that if the reference motion state is a constant, and the motion magnitudes of N consecutive frames from the current frame are greater than the first motion threshold, where N is a natural number, and the current frame is the first frame, the motion magnitudes of the first frame to the (N+1)th frame are constant, the reference motion state remains constant, the (N+1)th motion state is determined to be from constant to motion, and the reference motion state is changed as a motion. In some embodiments, if the reference motion state is a constant, and the motion magnitude of the current frame is less than the first motion threshold, the motion state of the current frame remains constant, and the reference motion state remains constant.<h2 style=";text-align:left;direction:ltr">In some embodiments, if the reference move state is moving, and the move amounts of N consecutive frames from the current frame are less than the second move threshold value, where N is a natural number, and the current frame is the first frame, then the move states of the first frame to the (N+1)th frame are moving, the reference move state remains moving, the (N+1)th move state is determined to be moving to stationary, and the reference move state is changed to stationary.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, if the reference move state is move, and the move amount of the current frame is greater than the second move threshold value, the current frame move state remains move, and the reference move state remains move.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Furthermore, after determining that the reference moving state is constant, where the current frame's moving amount is less than the first moving threshold value, the method also includes determining whether the moving amount is greater than a third moving threshold value. When the moving amount is greater than the third moving threshold value, the current frame's moving amount is associated with a precise move, and the reference moving state remains constant. If the movements of M consecutive frames from the current frame are precise moves in the same direction, and the current frame is the first frame, the moving state of the mth frame is determined to be from constant to moving, and the reference moving state is changed accordingly, where M is a natural number.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, a "state retention" policy is used. For a static state or a state of occasional movement, no state transition is performed. When more than two state transitions have accumulated, a state transition is performed. Using this policy, state stability is achieved. S1 is used to indicate the threshold value of the first move, S2 is used to indicate the threshold value of the second move, and S3 is used to indicate the threshold value of the third move. S is used to indicate the amount of movement of the video frame to be processed. In some embodiments, where a state transition is generally performed after two state transitions have accumulated, for precise movement, a state transition is performed after five state transitions have accumulated. In some embodiments, the "state retention" policy refers to the following different cases.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, when the reference motion state is stationary: (1) When S>S1, the video frame to be processed (referred to as the Yth frame) is determined to be stationary, and the reference motion state remains stationary. It is then determined whether the moving amount of the (Y+1)th frame remains greater than S1. When the moving amount of the (Y+1)th frame remains greater than S1, the (Y+1)th frame is determined to be stationary to moving, and the reference motion state is changed to moving. (2) When S <S1، يتم تحديد إطار الفيديو الذي سيتم معالجته ليكون في حالة ثابتة، وتبقى حالة التحرك المرجعية ثابتة. (3) عندما S3<S<S1، يتم تحديد تحرك إطار الفيديو الذي سيتم معالجته (مشار لها باستخدام الإطار Zth) ليكون تحرك دقيق، وتم تحديد تحركات الإطار Zth إلى إطار (Z+3)th لتكون عبارة عن تحركات دقيقة في نفس الاتجاه، ويتم تحديد الإطار Zth إلى إطار (Z+3)th ليكون في الحالة الثابتة. إذا كان تحرك الإطار (Z+4)th أيضاً تحرك دقيق في نفس الاتجاه، يتم تحديد الإطار (Z+4)th لتكون في الحالة من الثبات إلى التحرك، ويتم تغيير التحرك المرجعي إلى حالة تحرك.<h2 style=";text-align:left;direction:ltr">In some embodiments, the number of times accumulated can be set to any appropriate number.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, when the reference moving condition is moving: (1) when S <S2، يتم تحديد إطار الفيديو الذي سيتم معالجته (مشار لها باستخدام إطار Yth) ليكون في حالة تحرك، تبقى حالة التحرك المرجعية متحركة. بعد ذلك يتم تحديد ما إذا كان مقدار التحرك للإطار (Y+1)th أقل من S2. عندما يكون مقدار تحرك الإطار (Y+1)th أقل من S2، يتم تحديد الإطار (Y+1)th ليكون في حالة من التحرك إلى الثبات، ويتم تغيير حالة التحرك المرجعية إلى ثابتة. (2) عندما S> S2, the video frame to be processed is selected to be in motion, and the reference motion state remains motion.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some additional embodiments, the hand-shake state can also be specified. For example, if a "sudden left move and / or sudden right move" occurs, where the motion vectors appear in opposite directions, the "hand-shake" state is specified. In this case, if the background is in the stationary state, the motion state does not change until the next motion in the same direction is generated.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, (306) determines whether to continue to perform motion estimation; if yes, method 300 returns to step 310; otherwise, the procedure is terminated. In some embodiments, if the video frame is continuously acquired at step 201, at that step 201, motion estimation is performed on the resulting video frame.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Referring again to Figure 2, it is determined whether the video frame's motion state is from moving to still (203); if yes, method 200 advances to step 204; in other words, the end of the procedure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> When the camera roll is opened, the state can be set to static. This means that the user moves the camera to target the target, and this process undergoes states from static to moving, moving, and moving to static. When the moving state of a video frame is determined to be moving to static, the corresponding video frame is used as the video frame to be detected.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the number of features, e.g., corner codes, of the video frame to be detected is calculated (204). In some embodiments, various types of corner detection algorithms can be selected, such as the Features From Accelerated Segment Test (FAST) corner detection algorithm, the Harris corner detection algorithm, the Compressed Histogram of Gradients (CHOG) corner detection algorithm, and the Fast Retina Keypoint (FREAK) corner detection algorithm, one of which can be randomly selected. These algorithms have good corner detection capabilities. According to the definition of an effective image, the first requirement is clarity, and the second requirement is rich segmentation. Based on these two requirements, FAST corner detection can be used. When an image is not clear, there are fewer FAST aspects; for example, in an image with a large part of the space or a single-color image, there are fewer FAST aspects. Therefore, it can be determined whether an image is effective as long as the number of FAST aspects of the image is determined.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In addition to determining the effectiveness of an image using a corner detection algorithm, in practical applications, algorithms can be used to determine the effectiveness of an image based on gradient code, edge code, and the like.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, it is determined whether the number of corner symbols is greater than the threshold number of sides (205); if so, the calculated video frame is determined to be the clear frame image, and the clear frame image is transmitted to a cloud server. In other embodiments, the calculated video frame is determined to be an ambiguous frame image that is not eligible for transmission to a cloud server. In some embodiments, an identification result feed is received by the cloud server (206), and the identification result (206) may be displayed.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 5 is a schematic block diagram 500 of a mobile station where the method 100, 200, and / or 300 of image recognition is implemented as discussed in Figures 1-3 according to some embodiments of the present application. In some embodiments as illustrated in Figure 5, the mobile station includes a typical data collection unit, a motion estimation unit, a clear frame determination unit, and an identification result display unit.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the data collection module is designed to perform real-time data collection using the mobile station's camera, to obtain a video frame, and to transmit the video frame to the motion estimation module.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the motion estimation module is designed to perform motion estimation on a video frame, determine the motion state of the video frame, and send the motion state to the clear frame determination module. In some embodiments, the clear frame determination module is designed to determine whether the motion state of the video frame is determined from moving to still; if so, the video frame is determined to be a clear frame image, and the clear frame image is sent to a cloud server. In some embodiments, an identification result display module is designed to receive feedback of the identification result from the cloud server and to display the identification result. In some embodiments, the motion estimation module includes a motion vector calculation submodule and a determination state submodule. In some embodiments, the motion vector calculation submodule is designed to calculate a motion vector between a video frame and a previous video frame and to send the motion vector to a state determination submodule. The motion vector includes the motion amount and the motion direction.<h2 style=";text-align:left;direction:ltr">In some embodiments, a state determination submodule is designed to determine the state of the video frame's movement according to the movement vector.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, a state determination submodule includes a state determination module, configured to read a stored reference move state, wherein if the reference move state is constant, and the amounts of N consecutive frame moves from the current frame are greater than a first move threshold value, where N is a natural number, and the current frame is the first frame, the first frame moves to the (N+1)th frame are constant, the reference move state remains constant, and the (N+1)th move state is determined to be from constant to move, and the reference move state is changed accordingly. In some embodiments, if the reference move state is constant, and the amount of current frame moves is less than the first move threshold value, the current frame move state is constant, and the reference move state remains constant.<h2 style=";text-align:left;direction:ltr">In some embodiments, if the reference move state is move, and the move amounts of N consecutive frames from the current frame are less than a second move threshold value, where N is a natural number, and the current frame is the first frame, the move amounts of the first frame to the (N+1)th frame are move, the reference move state remains move, the (N+1)th move state is selected from move to fixed, and the reference move state is changed to fixed. In some embodiments, if the reference move state is move, and the move amount of the current frame is greater than the second move threshold value, the move state of the current frame remains move, and the reference move state remains move.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the state determination module is designed to determine the reference move state to be fixed, and when the current frame's move amplitude is less than the first move threshold value, it also determines whether the move amplitude is greater than a third move threshold value. When the move amplitude is greater than the third move threshold value, the current frame's move is mapped to a precise move, and the reference move state remains fixed. If the M consecutive frame moves from the current frame are precise moves in the same direction, and the current frame is the first frame, the move state of the mth frame is determined to be fixed to move, and the reference move state is changed to move, where M is a natural number.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the motion vector calculation unit includes a motion vector determination unit, designed to obtain a center area pixel of the previous video frame; to use the center area of the video frame as the starting point, to find an area, surrounded by the starting point, with a pixel similar to the center area pixel of the previous video frame that is determined to be a matching block; and to use a position vector between the center area of the video frame and the matching block as a motion vector.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the clear frame detection module includes a move-to-stay detection module and a corner detection module. The move-to-stay detection module is configured to determine whether the video frame is moving from moving to stationary; if so, it sends a start instruction to the corner detection module. The corner detection module is configured to receive a start instruction from the move-to-stay detection module and calculate the number of corner symbols from the video frame. In some embodiments, it determines whether the number of corner symbols is greater than the threshold number of sides. When the number of corner symbols is greater than the threshold number of sides, the video frame is determined to be a clear frame image, and the clear frame image is sent to a cloud server. Alternatively, the video frame is determined to be a fuzzy frame image.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 6 is a block diagram of a server-client environment according to some embodiments. As illustrated in Figure 6, image recognition is implemented in a server-client environment 600 according to some embodiments. According to some embodiments, the server-client environment 600 includes client-side processing 602 (hereinafter “client-side module 602”) and input device(s) 714 (e.g., a camera) implemented on a client device 604, and server-side processing 606 (hereinafter “server-side module 606”) implemented on a server system 608. The client-side module 602 communicates with the server-side module 106 through one or more networks 610. The client-side module 602 provides client-side functionality to a social networking platform (e.g., instant messaging and social networking services) and communicates with the server-side module 606.<h2 style=";text-align:left;direction:ltr">Server-side module 606 provides server-side functionality, e.g., image / video processing, and image / video information identification, to any number of client modules 602 each residing on a separate client device 604.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the server-side module 606 includes one or more processors 612, one or more databases 614, an I / O interface to one or more agents 618, and an I / O interface to one or more external services 620. The I / O interface to the one or more agents 618 assists in processing client-facing inputs and outputs of the server-side module 606. The one or more processors 612 receive images sent from the client device 604, process the images, and provide information relating to the requested image / video to the client-side module 602. The databases 614 store various information, including, but not limited to, book information, comapq disk CD information, movie information, and product and column code information. In some embodiments, the cloud server feeds back description information, wherein the description information includes purchase status, comment information, and the like for the relevant items.<h2 style=";text-align:left;direction:ltr">An I / O interface to one or more external services 620 assists in communications with one or more external services 622 (e.g., image / video processing services, publishers, and / or other related services).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Examples of client device 604 include, without limitation, a handheld computer, a wearable computing device, a personal digital assistant (PDA), a tablet computer, a laptop computer, a desktop computer, a cellular telephone, a smart phone, an enhanced general packet radio service (EGPRS) mobile telephone, a media player, a navigation device, a game console, a television, a remote control, or a combination of any two or more of these data processing devices or other data processing devices.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Examples of one or more networks 610 include local area networks (LANs) and wide area networks (WANs) such as the Internet. One or more networks 610 are optionally implemented using any known network protocol, including various wired or wireless protocols, such as Ethernet, Universal Serial Bus (USB), FireWire, Global System for Mobile (GSM), Enhanced Data GSM Environment (EDGE), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol (VoIP), Wi-MAX, or any other suitable communications protocol.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The server system 608 is implemented on one or more stand-alone data processing equipment or a distributed network of computers. In some embodiments, the server system 608 also uses various overhead facilities and / or services of third-party server providers (e.g., third-party cloud service providers) to provide the underlying computing resources and / or infrastructure resources of the server system 608.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The server-client environment 600 illustrated in Figure 6 includes both a client-side portion (e.g., a client-side module 602) and a server-side portion (e.g., a server-side module 606). In some embodiments, data processing is performed as a stand-alone application mounted on the client device 604. In addition, the functional division between the client and server portions of the client environment for data processing can vary in different embodiments. For example, in some embodiments, the client-side module 602 is a thin client that provides only user-facing input and output processing functions, and delegates all other data processing functions to a reference server (e.g., a server system 608).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 7 is a block diagram of a client device according to some embodiments. The client device 604 typically includes one or more processing units (CPUs) 702, one or more network interfaces 704, memory 706, and one or more communication buses 708 for interfacing those components (sometimes called a chipset). The client device 604 also includes a user interface 710. The user interface 710 includes one or more output devices 712 that enable the display of media content, including one or more speakers and / or one or more visual displays. The user interface 710 further includes one or more input devices 714. The user interface includes components that assist user input, such as a keyboard, mouse, voice command input module or microphone, touchscreen display, touch-sensitive input layer, camera, camera capture signal, or other input buttons or control means.<h2 style=";text-align:left;direction:ltr">Furthermore, some client devices 604 use a microphone and voice perception or a camera and gesture perception to complement or replace a keyboard. The memory 706 includes high-speed random-access memory, such as DRAM, SRAM, DDR RAM, or other solid-state random-access memory devices; and, optionally, includes non-volatile memory, such as one or more magnetic disk storage devices, one or more optical disk storage devices, one or more flash memory devices, or one or more other non-volatile solid-state storage devices. The memory 706, optionally, includes one or more storage devices disposed remotely from one or more processing units 702. The memory 706, or alternatively, non-volatile memory within the non-volatile memory 706, includes a non-temporary computer-readable storage medium. In some implementations, memory 706, or other computer-readable storage medium other than temporary memory 706, stores the following programs, modules, and data combinations, or a subset or superset thereof:.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Operating System 716 includes procedures for trading various platform services and performing hardware-dependent tasks;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A network connection module 718 for connecting the client device 604 to other computers (e.g., the server system 608 and external service(s) 622) connected to one or more networks 610 via one or more network interfaces 704 (wired or wireless);<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Input processing unit 722 for detecting one or more user inputs or interactions from one or more input devices 714 and interpreting the detected inputs or interactions;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> One or more applications 726-1 – 726-N for execution by client device 604 (e.g., games, app stores, payment platforms, social networking platforms and / or other applications); and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Client side unit / device module 602, providing client side data processing and functionality, includes but is not limited to video / image processing unit 751 for processing images and / or video frames captured by the camera by any of method 100, 200, 300, and / or 900. The video / image processing unit 751 may include any one or more of the units and modules discussed in Figure 5; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The databases 760 store various data (e.g., one or more threshold values for the amount of movement) associated with the video / image processing as discussed in the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Each of the items defined above may be stored in one or more of the aforementioned memory devices and corresponds to a set of instructions for performing a function described above. The units or programs defined above (i.e., sets of instructions) need not be implemented as separate computer programs, procedures, modules, or data structures; therefore, different combinations of such units may be combined or otherwise reconfigured in different implementations. In some implementations, memory stores 706 optionally store a subset of the data of the units and structures defined above. Furthermore, memory stores 706 optionally store data for additional units and structures not described above.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 8 is a block diagram of a server system 608 according to some embodiments. The server system 608 typically includes one or more processing units (CPUs) 812, one or more network interfaces 804 (e.g., including an I / O interface to one or more agents 618 and an I / O interface to one or more external services 620), memory 806, and one or more communication buses 808 for interfacing those components (sometimes called a chip). The memory 806 includes high-speed random access memory, such as DRAM, SRAM, DDR RAM, or other solid-state random access memory devices; and, optionally, includes non-volatile memory, such as one or more magnetic disk storage devices, one or more optical disk storage devices, one or more flash memory devices, or one or more other non-volatile solid-state storage devices. The memory 806 optionally includes one or more storage devices disposed remotely from one or more processing units 812.<h2 style=";text-align:left;direction:ltr">Memory 806, or alternatively non-volatile memory within non-volatile memory 806, includes a non-temporary computer-readable storage medium. In some implementations, memory 806, or non-temporary computer-readable storage medium 806, stores the following programs, modules, and data structures, or a subset or superset thereof:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Operating System 810 includes procedures for trading various platform services and performing hardware-dependent tasks;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A network connection module 812 for connecting the server system 608 to other computers (e.g., client services 604 and external service(s) 622) connected to one or more networks 610 via one or more network interfaces 804 (wired or wireless);<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Server-side module 606, providing server-side data processing for a social networking platform (e.g., instant messaging, social networking services), includes, without limitation, a video / image processing module 838 for processing images and / or video frames sent by the client device 604;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> One or more server databases 814 store various data associated with video / image processing as discussed in the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Each of the items defined above may be stored in one or more of the aforementioned memory devices and corresponds to a set of instructions for performing a function described above. The units or programs defined above (i.e., sets of instructions) need not be implemented as separate computer programs, procedures, or modules; therefore, different combinations of such units may be combined or otherwise reconfigured in different implementations. In some implementations, memory stores 806 optionally store a subset of the data for the units and combinations defined above. Furthermore, memory stores 806 optionally store data for additional units and combinations not described above.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, at least some of the functions of the server system 608 are performed by the client device 604, and submodules corresponding to those functions may be located within the client device 604 instead of the server system 608. In some embodiments, at least some of the functions of the client device 604 are performed by the server system 608, and submodules corresponding to those functions may be located within the server system 608 instead of the client device 604. The client device 604 and server system 608 shown in Figures 7-8, respectively, may be illustrative only, and different module designs for implementing the functions described herein are available in different embodiments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figures 9A-9E are flowchart diagrams of method 900 for performing image recognition on an end device 604, e.g., a mobile terminal, according to some embodiments of the present application. In some embodiments, method 900 is performed by an end device using one or more processors, a memory, and a camera. For example, in some embodiments, method 900 is performed by an end device 604 (Figures 6-7) or a combination thereof (e.g., one or more modules of a device 602, Figures 6-7). In some embodiments, method 900 is controlled by instructions stored in a non-transient computer-readable storage medium and the instructions are executed by one or more processors of the end device. Optional operations are indicated by dashed lines (e.g., boxes with dashed borders). In some embodiments, one or more steps of Method 900 are substantially similar to one or more steps of Method 100, 200, and / or 300 as discussed for Figures 1-4.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Referring to Figure 9A, the client device 604 receives (902) sequences of video frames comprising at least a first video frame and a second video frame captured by the camera of the client device. In some embodiments, the first video frame is captured before the second video frame. In some embodiments, the first and second video frames are captured in real time.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the client device 604 (904) determines a particular camera motion state associated with each video frame in a sequence of video frames. In some embodiments, the client device determines a first camera motion state associated with the second video frame by performing motion estimation of the first video frame and the second video frame. In some embodiments, the client device (906) detects a center block (e.g., the center block 410 of Fig. 4) of the first video frame (e.g., the preceding video frame 400 of Fig. 4). The client device (906) then identifies a match block (e.g., the match block 470 of Fig. 4) of the second video frame (e.g., the to-be-processed video frame 450 of Fig. 4) that matches the center block of the first video frame according to a predetermined match criterion.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, to identify the matching block in the second video frame, the client device 604 first selects (908) a center block (e.g., the center block 460 of FIG. 4) in the second video frame, and the center block in the second video frame has a matching area like the center block in the first video frame. The client device 604 (908) calculates a differential value between the center block in the second video frame and the center block in the first video frame. In some embodiments, the differential value between the center block in the second video frame and the center block in the first video frame is calculated using the sum of squared error (S) as shown in the following formula (1):<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> (1)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the different value may be determined using any other suitable method(s).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the client device 604 (908) then selects one or more blocks in the second video frame, each of which has a matching area as the center block of the second video frame. The client device (908) then computes a difference value between each of the one or more selected blocks of the second video frame and the center block of the first video frame. The client device (908) identifies one of the center blocks and one or more blocks of the second video frame that has the smallest difference value from the center block of the first video frame as the matching block of the second video frame.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, one or more blocks are selected from the second video frame using an approximation algorithm. In some embodiments, the approximation algorithm comprises searching from the center block in the second video frame toward a peripheral region in the second video frame. In some embodiments, a long step length is initially used each time the block is moved until a space with relatively greater symmetry (i.e., a smaller S) is defined. Then, within the definition space, a reduced step length is used to search for a space with greater symmetry (i.e., a smaller S). Step-by-step convergence, as discussed in this document, is implemented to define the matching block with greater symmetry and therefore smaller S.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the block frame and / or the selected video may have any other suitable shapes, such as a square, rectangle, circle, rhombus, or diamond. In some embodiments, any other suitable formula, other than formula (1), may be used instead of the sum of squared errors S as discussed in the present application. In some embodiments, any other suitable search algorithm other than an approximation algorithm may be used.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Referring to Figure 9B, in some embodiments, the client device (910) defines a first motion vector (e.g., vector 480 of Figure 4) starting at the center block of the second video frame and ending at the match block of the second video frame. In some embodiments, the client device (912) then determines whether the magnitude of the first motion vector (e.g., vector 480 of Figure 4) is greater than a predetermined threshold value. Based on a determination that the magnitude is greater than the predetermined threshold value, the client device (912) determines that the first motion state of the camera is a special motion state. Based on a determination that the magnitude is equal to or less than the predetermined threshold value, the client device (912) determines that the first motion state of the camera is a special still state.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the client device (914) selects a second camera move state that immediately follows the camera's first move state. When the camera's first move state is selected as a particular move state, the client device also (914) selects a first predetermined move magnitude threshold value to select the second move state. When the camera's first move state is selected as a stationary state, the client device also (914) selects a second predetermined move magnitude threshold value to select the second move state. In some embodiments, the first predetermined move magnitude threshold value is greater than the second predetermined move magnitude threshold value. Therefore, when the camera is moving, a larger move magnitude is selected to select the stationary state. When the camera is stationary, a smaller move magnitude is selected to select the move state.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Referring to Figure 9C, in some embodiments, the client device (916) determines whether the camera has undergone a transition of motion states from a particular moving state to a particular still state between the capture of two consecutive video frames in a sequence of video frames. In some embodiments, upon determining the first camera motion state to be a particular moving state, the client device receives (918) a predetermined number of video frames following the second video frame. The predetermined number can be any suitable natural number chosen by the user or predetermined by the camera settings. The client device (918) then determines a particular sequence of camera motion states to capture each of the predetermined number of video frames by performing motion estimation for each pair of consecutive video frames for the predetermined number of video frames.<h2 style=";text-align:left;direction:ltr">In some embodiments, by determining that each of the camera's successive particular moving states represents a particular still state, the client device (918) determines that the camera has undergone a state transition from the particular moving state to the particular still state.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, based on determining that the first motion state of the camera is a particular still state, the client device (920) further determines whether the camera has undergone a transition of motion states from the particular still state to the particular moving state in the following manner: The client device obtains (920) a predetermined number of video frames following the second video frame. The predetermined number can be any suitable natural number selected by the user or predetermined by the camera settings. The client device (920) then determines a particular sequence of camera motion states to capture each of the predetermined number of video frames by performing motion estimation for each pair of successive video frames for the predetermined number of video frames. In some embodiments, based on determining that each of the successive particular camera motion states represents a particular moving state, the client device (920) determines that the camera has undergone a transition of state from the particular still state to the particular moving state.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Referring to Figure 9d, in some embodiments, based on determining that the camera has undergone a transition from a particular moving state to a particular still state between the capture of two consecutive video frames in a sequence of video frames, the client device (922) determines whether the last of the two consecutive video frames is eligible for transmission according to a predetermined transmission criterion. In some embodiments, based on determining that the camera has undergone a transition from a particular moving state to a particular still state, the client device (924) counts the number of configuration points in the last video frame. In some examples, the configuration points include corner symbols. In some embodiments, the number of configuration points is counted using any suitable algorithm, such as the FAST corner detection algorithm, the Harris corner detection algorithm, the CHOG corner detection algorithm, and the FREAK corner detection algorithm. The quality of the video frame to be transmitted is checked at this step to ensure sufficient resolution and sufficient detail of the frame can be detected at the server system.<h2 style=";text-align:left;direction:ltr">The client device (924) determines whether the number of texture points in the last video frame is greater than a predetermined threshold number of textures. Upon determining that the number of texture points in the last video frame is greater than the predetermined threshold number of textures, the client device (924) sends the last video frame to a server system (e.g., the server system 608, Figures 6 and 8).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, based on a determination that the first camera motion state is a particular still state, the client device receives (926) a predetermined number of video frames following the second video frame. The client device (926) determines a particular sequence of motion vectors and a particular sequence of camera motion states for the predetermined number of video frames. In some embodiments, based on a determination that the successive particular camera motion states are particular still states, the client device (926) determines whether the particular sequence of motion vectors shares a common direction. In some embodiments, based on a determination that the particular sequence of motion vectors shares a common direction, the client device (926) determines whether all particular magnitudes of the particular sequence of motion vectors are greater than a threshold value of a third magnitude. Based on a determination that all particular magnitudes of the particular sequence of motion vectors are greater than a threshold value of a predetermined third magnitude, the client device (926) changes a last camera motion state to a particular move state associated with a precise move.<h2 style=";text-align:left;direction:ltr">In some embodiments, it is sufficient for the client device to determine when a principal component with different motion vector alignment directions shares a common direction, and the particular sequence of motion vectors shares a common direction. In some embodiments, the threshold value of the third magnitude may be a relatively small value (for example, smaller than the threshold values of the first and second magnitudes), and a higher number of video frames is determined to be obtained when a smaller threshold value of the third magnitude is chosen.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Referring to Figure 9e, in some embodiments, based on a determination that the first camera move state is a particular still state, the client device (928) obtains a predetermined number of video frames following the second video frame. For example, the client device obtains five consecutive video frames following the second video frame. The client device (928) then determines a particular sequence of move vectors and a particular sequence of camera move states for the predetermined number of video frames. Based on a determination that the successive particular camera move states are particular still states, the client device (928) determines whether the particular sequence of move vectors shares a common direction. Based on a determination that the particular sequence of move vectors shares a common direction, the client device (928) determines whether the sum of the particular magnitudes of the particular sequence of move vectors is greater than a threshold value of a fourth magnitude. In some embodiments, the threshold value of the fourth magnitude is discussed to be greater than the threshold value of the third magnitude at step 926.<h2 style=";text-align:left;direction:ltr">In some embodiments, the threshold value of the fourth magnitude is greater than or proportional to the threshold value of the first and second magnitudes as discussed earlier in the present application. Upon determining that the sum of the particular magnitudes of the particular sequence of movement vectors is greater than the threshold value of the predetermined fourth magnitude, the client device (928) changes a recent camera movement state to a particular movement state associated with a precise movement.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, based on determining that the first motion state of the camera is a special stationary state, the client device (930) obtains a set of consecutive video frames after the second video frame. The client device (930) then determines whether the special motion vectors from each pair of consecutive video frames from the set of video frames have opposite directions. Based on determining that the special motion vectors from each pair of consecutive video frames from the set of video frames have opposite directions, the client device (930) prevents the camera's motion state from changing from a special stationary state to a special moving state based on the amount of movement. In some embodiments, this moving state is considered to be the special stationary state associated with hand shaking.<h2 style=";text-align:left;direction:ltr">In some embodiments, the camera state is considered constant when there is a hand shake, even when successive motion vectors are detected to have the same directions, and the client device then determines the camera state using the magnitude of the vectors as discussed previously in various embodiments of the present application.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The present disclosure also provides a machine-readable storage medium, wherein instructions are stored that enable a machine to execute the method described in the description. In particular, a system or equipment equipped with the storage medium may be equipped, computer program code for implementing a function of any of the foregoing embodiments is stored in the storage medium, and a computer (or CPU or MPU) in the system or equipment is enabled to read and execute the program code stored in the storage medium. In addition, an operating system running in a computer may also be enabled, in accordance with instructions based on the program code, to perform part or all of the actual operations. The program code read from the storage medium may also be written to a memory distributed in an expansion board inserted in the computer or may be written to a memory installed in an expansion unit connected to the computer, whereupon a CPU installed on the expansion board or expansion unit is enabled, in accordance with the program code instructions, to perform part or all of the actual operations, so that the functions of any of the foregoing embodiments are implemented.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">An example of a storage medium used to provide program code includes a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, and DVD+RW), a magnetic tape, a non-volatile memory card, and ROM. Optionally, a communications network may be used to download program code from a server computer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Despite the embodiments described above, it is understood that the application is not intended to be limited to these specific embodiments. Rather, the application includes alternatives, modifications, and equivalents within the spirit and scope of the appended claims. Several specific details are included here to provide a detailed understanding of the subject matter discussed herein. However, it would be obvious to a person of ordinary skill in the art that the subject matter of the patent could be practiced without the specific details mentioned. In other cases, known methods, procedures, components, and circuits are not described in detail so as not to contribute to making certain aspects of the invention unnecessarily obscure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Although some of the various drawings illustrate a number of logical stages in a specific order, stages that are not dependent on the order can be rearranged, and others can be combined or removed. While the rearrangement or combination of some stages has been specifically mentioned, others would be obvious to persons of ordinary skill in the art, so we have spared ourselves the burden of providing a cumbersome list of alternatives. Furthermore, it should be recognized that the stages can be implemented in hardware, software, or any combination thereof. The foregoing description is, for the purpose of illustration, described with reference to specific embodiments. However, the illustrative discussions above are not intended to be lengthy or to limit the application to the specific figures disclosed. Numerous modifications and variations may be implemented in light of the above instructions. The embodiments have been selected and described to illustrate the principles of the application and its practical applications, to enable other persons skilled in the art to use the application in the best possible manner and to use several embodiments with various modifications as appropriate for the particular intended use.
