A motor vibration control method, device, chip and medium

By processing the bullet count display image in shooting games, the current target bullet count is determined and vibration control information is generated. This solves the problem that users have difficulty judging how many times they have fired, achieves accurate control of motor vibration, and improves the user experience.

CN115531862BActive Publication Date: 2026-05-05SHANGHAI AWINIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI AWINIC TECH CO LTD
Filing Date
2021-06-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In shooting games, users often struggle to determine whether they have fired a shot and how many shots they have fired based on the gunshots, leading to erratic motor vibrations that fail to correspond to user input.

Method used

By processing the bullet count display image in the target game image, a digital image to be identified is obtained, the current target bullet count is determined, and motor vibration control information is generated by combining the historical target bullet count to accurately control motor vibration.

Benefits of technology

It enhances the user's gaming experience by providing accurate motor vibration feedback that corresponds to the user's shooting actions, thereby increasing the game's immersion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115531862B_ABST
    Figure CN115531862B_ABST
Patent Text Reader

Abstract

This application discloses a vibration control method, device, chip, and medium for a motor. By processing an image showing the number of bullets in a target game image, a digital image to be identified can be obtained. This digital image can then be used to determine the current target number of bullets corresponding to the bullet count display image. The current target number of bullets corresponding to the bullet count display image represents the remaining number of bullets for the weapon currently used by the user in the game. Historical target bullet counts are then used to generate motor vibration control information. Based on the current target bullet count and historical target bullet counts, the specific number of bullets consumed can be determined, thereby determining whether the user has performed a shooting operation and the number of shooting operations. This achieves motor vibration control information generation based on the number of bullets consumed by the user, thus controlling the motor to vibrate accurately based on the number of bullets consumed. This provides a more accurate correspondence with the user's actions, improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of control, specifically to a vibration control method, device, chip, and medium for a motor. Background Technology

[0002] Shooting games are games where users control a character to move and shoot, competing against other users. During gameplay, the device plays corresponding sound effects as the game progresses. For example, when the user fires a gun or another player fires, the corresponding gunshot sound is played to enhance the user's gaming experience. Furthermore, when the user fires a gun, the device's speakers simultaneously play sound while the motor vibrates, providing the user with multi-dimensional game feedback through sound and device vibration.

[0003] Currently, when a user fires a shot during gameplay, or when another player at close range fires a shot, the terminal plays gunshot sounds. It's difficult to determine from the played gunshots whether the user fired themselves or the specific number of shots fired. Consequently, it's difficult to control the terminal's motor vibration based on the gunshot sounds, resulting in chaotic motor vibrations that don't correlate the terminal's vibration count with the user's actions. Summary of the Invention

[0004] In view of this, embodiments of this application provide a vibration control method, device, chip, and medium for a motor, which can control the motor to vibrate a corresponding number of times according to the number of bullets used by the user, thereby achieving more accurate control of motor vibration.

[0005] To address the above problems, the technical solutions provided in this application are as follows:

[0006] In a first aspect, this application provides a vibration control method for a motor, the method comprising:

[0007] Obtain the bullet count display image from the target game image, and perform image processing on the bullet count display image to obtain the digital image to be identified;

[0008] The number of target bullets corresponding to the bullet count display image is determined using the digital image to be identified;

[0009] Based on the current number of target bullets and the historical number of target bullets, motor vibration control information is generated; the motor vibration control information is used to control motor vibration.

[0010] In one possible implementation, the digital image to be identified consists of black pixels and white pixels;

[0011] The step of determining the current target bullet count corresponding to the bullet count display image using the digital image to be identified includes:

[0012] The number of target color pixels in each pixel region of the digital image to be identified is obtained sequentially to obtain a count sequence; the pixel region is a pixel row or pixel column; the target color pixel is a white pixel or a black pixel;

[0013] A target sequence is selected from a preset sequence based on the number sequence; the preset sequence is a sequence composed of the number of target color pixels in each pixel region of a standard digital image corresponding to a preset character;

[0014] The preset character corresponding to the target sequence is used as the target number of the digital image to be recognized;

[0015] The target number of bullets corresponding to the bullet quantity display image is determined by obtaining the target number of the target digital image to be recognized based on the preset character corresponding to the target sequence.

[0016] In one possible implementation, after selecting the target sequence from the preset sequence according to the number sequence, the method further includes:

[0017] If the image size of the standard digital image is different from the image size of the digital image to be identified, the number sequence or the preset sequence is processed to be of equal length.

[0018] In one possible implementation, if the image size of the standard digital image is different from the image size of the digital image to be identified, performing equal-length processing on the number sequence or the preset sequence includes:

[0019] If the image size of the standard digital image is larger than the image size of the digital image to be identified, the preset sequence is adjusted to obtain an updated preset sequence;

[0020] If the image size of the digital image to be identified is larger than the image size of the standard digital image, the number sequence is adjusted to obtain an updated number sequence.

[0021] In one possible implementation, adjusting the preset sequence to obtain an updated preset sequence includes:

[0022] The first step length and the first ratio are determined based on the image size of the standard digital image and the image size of the digital image to be identified;

[0023] The first target pixel region is determined in the standard digital image based on the first step length;

[0024] Obtain the number of target color pixels in the first target pixel region, and use it as the first pixel count;

[0025] The updated preset sequence is obtained based on the first number of pixels and the first ratio.

[0026] In one possible implementation, adjusting the count sequence to obtain the updated count sequence includes:

[0027] The second step size and the second ratio are determined based on the image size of the standard digital image and the image size of the digital image to be identified.

[0028] The second target pixel region is determined in the digital image to be identified based on the second step size;

[0029] Obtain the number of target color pixels in the second target pixel region, and use it as the number of second pixels;

[0030] The updated number sequence is obtained based on the second number of pixels and the second ratio.

[0031] In one possible implementation, selecting the target sequence from the preset sequence based on the number sequence includes:

[0032] The preset sequence with the smallest difference or the smallest ratio close to 1 from the sequence of numbers is taken as the target sequence.

[0033] In one possible implementation, before obtaining the bullet count display image from the target game image, the method further includes:

[0034] If the image acquisition conditions are met, the original game images are acquired sequentially according to a preset time interval, and the original game images are identified by digital display identifiers.

[0035] If the original game image contains a digital display identifier, the original game image is used as the game image to be processed.

[0036] In one possible implementation, the step of obtaining a bullet count display image from a target game image and performing image processing on the bullet count display image to obtain a digital image to be identified includes:

[0037] The bullet count display image is obtained from the target game image. The bullet count display image is then grayscaled and binarized to obtain a black and white digital image. The black and white digital image is composed of black pixels and white pixels.

[0038] Based on the regions where each character pattern is located in the black and white digital image, the black and white digital image is segmented to obtain the digital image to be identified.

[0039] Secondly, this application provides a vibration control device for a motor, the device comprising:

[0040] The first acquisition unit is used to acquire a bullet count display image from a target game image, and to perform image processing on the bullet count display image to obtain a digital image to be identified.

[0041] The first determining unit is used to determine the current target bullet quantity corresponding to the bullet quantity display image using the digital image to be identified;

[0042] The generation unit is used to generate motor vibration control information based on the current number of target bullets and the historical number of target bullets; the motor vibration control information is used to control motor vibration.

[0043] In one possible implementation, the digital image to be identified consists of black pixels and white pixels;

[0044] The first determining unit includes:

[0045] The first acquisition subunit is used to sequentially acquire the number of target color pixels in each pixel region of the digital image to be identified, and obtain a sequence of counts; the pixel region is a pixel row or a pixel column; the target color pixel is a white pixel or a black pixel;

[0046] A selection subunit is used to select a target sequence from a preset sequence based on the number sequence; the preset sequence is a sequence composed of the number of target color pixels in each pixel region of a standard digital image corresponding to a preset character;

[0047] The second acquisition subunit is used to obtain the current target bullet count corresponding to the bullet count display image based on the preset character corresponding to the target sequence.

[0048] In one possible implementation, the device further includes:

[0049] An adjustment unit is used to perform equal-length processing on the number sequence or the preset sequence if the image size of the standard digital image is different from the image size of the digital image to be identified.

[0050] In one possible implementation, the adjustment unit includes:

[0051] The first adjustment subunit is used to adjust the preset sequence if the image size of the standard digital image is larger than the image size of the digital image to be identified, so as to obtain an updated preset sequence.

[0052] The second adjustment subunit is used to adjust the number sequence if the image size of the digital image to be identified is larger than the image size of the standard digital image, so as to obtain an updated number sequence.

[0053] In one possible implementation, the first adjustment subunit is specifically used to determine the first step length and the first ratio based on the image size of the standard digital image and the image size of the digital image to be identified;

[0054] The first target pixel region is determined in the standard digital image based on the first step length;

[0055] Obtain the number of target color pixels in the first target pixel region, and use it as the first pixel count;

[0056] The updated preset sequence is obtained based on the first number of pixels and the first ratio.

[0057] In one possible implementation, the second adjustment subunit is specifically used to determine a second step size and a second ratio based on the image size of the standard digital image and the image size of the digital image to be identified;

[0058] The second target pixel region is determined in the digital image to be identified based on the second step size;

[0059] Obtain the number of target color pixels in the second target pixel region, and use it as the number of second pixels;

[0060] The updated number sequence is obtained based on the second number of pixels and the second ratio.

[0061] In one possible implementation, the selection sub-unit is specifically used to select a preset sequence that has the smallest difference from the number sequence or the ratio closest to 1 as the target sequence.

[0062] In one possible implementation, the device further includes:

[0063] The second acquisition unit is used to acquire original game images sequentially at preset time intervals if the image acquisition conditions are met, and to identify the digital display identifiers of the original game images.

[0064] The second determining unit is used to determine the original game image as the game image to be processed if the original game image has a digital display identifier.

[0065] In one possible implementation, the first acquisition unit is specifically used to acquire a bullet count display image from a target game image, and to perform grayscale and binarization processing on the bullet count display image to obtain a black and white digital image; the black and white digital image is composed of black pixels and white pixels.

[0066] Based on the regions where each character pattern is located in the black and white digital image, the black and white digital image is segmented to obtain the digital image to be identified.

[0067] Thirdly, this application provides a vibration control chip for a motor, comprising: a processor and a memory;

[0068] The memory is used to store computer-executed instructions;

[0069] When executed by the processor, the instruction causes the processor to perform the method described in any of the above embodiments.

[0070] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the method described in any of the above embodiments.

[0071] Therefore, the embodiments of this application have the following beneficial effects:

[0072] This application provides a motor vibration control method, device, chip, and medium. By processing an image showing the number of bullets in a target game image, a digital image to be identified can be obtained. This digital image can then be used to determine the current target number of bullets corresponding to the bullet count display image. The current target number of bullets corresponding to the bullet count display image represents the remaining bullets of the weapon currently used by the user in the game. Historical target bullet counts are then used to generate motor vibration control information. Based on the current target bullet count and historical target bullet counts, the specific number of bullets consumed can be determined, thereby determining whether the user has performed a shooting operation and the number of shooting operations. This achieves motor vibration control information generation based on the number of bullets consumed by the user, thus controlling the motor to vibrate accurately based on the number of bullets consumed. This provides a more accurate correspondence with the user's actions, improving the user experience. Attached Figure Description

[0073] Figure 1 A schematic diagram of a scenario for the vibration control method of a motor provided in an embodiment of this application;

[0074] Figure 2 A flowchart illustrating a vibration control method for a motor provided in an embodiment of this application;

[0075] Figure 3A schematic diagram of a target game image provided in an embodiment of this application;

[0076] Figure 4 This application provides a schematic diagram of a bullet count display image.

[0077] Figure 5 A schematic diagram of a preset sequence provided in an embodiment of this application;

[0078] Figure 6 A schematic diagram of a black and white digital image provided in an embodiment of this application;

[0079] Figure 7 This is a schematic diagram of the structure of a vibration control device for a motor provided in an embodiment of this application. Detailed Implementation

[0080] To facilitate understanding and explanation of the technical solutions provided in the embodiments of this application, the background technology of this application will be described first.

[0081] After researching the vibration of terminals in traditional shooting games, the inventors discovered that when a user fires a weapon, the terminal plays a corresponding gunshot sound, and the motor within the terminal vibrates accordingly, simulating the sound effects and feel of realistic shooting. When other players close to the user's character fire, corresponding gunshot sounds are also played to simulate the shooting of other nearby players. Currently, controlling the motor's vibration frequency based on the played gunshot sounds is easily affected by other players' gunshots, making it impossible to determine the exact number of shots fired by the user. This results in inconsistent motor vibration that doesn't correspond to the user's actions.

[0082] Based on this, embodiments of this application provide a vibration control method, device, chip, and medium for a motor. By processing the bullet count display image in a target game image, a digital image to be identified can be obtained. Using this digital image, the current target bullet count corresponding to the bullet count display image can be determined. The current target bullet count corresponding to the bullet count display image is the remaining bullet count of the weapon currently used by the user in the game. Then, historical target bullet counts are used to generate motor vibration control information. Based on the current target bullet count and historical target bullet counts, the specific number of bullets consumed can be determined, thereby determining whether the user has performed a shooting operation and the number of shooting operations. This achieves motor vibration control information generation based on the number of bullets consumed by the user, thereby controlling the motor to vibrate accurately based on the number of bullets consumed. This allows for a more accurate correspondence with the user's actions, improving the user experience.

[0083] To facilitate understanding of the motor vibration control method provided in the embodiments of this application, the following is combined with... Figure 1The scenario example shown is used for illustration. The vibration control method for the motor provided in this embodiment can be applied to terminal 101.

[0084] In practical applications, when playing shooting games on terminal 101, a screenshot of the game image displayed on terminal 101 is taken to determine the target game image. The bullet count display image is then extracted from the captured target game image. Image processing is performed on the obtained bullet count display image to obtain a digit image to be recognized. This digit image includes the numerical characters from the bullet count display image. Based on the digit image to be recognized, the current target bullet count corresponding to the bullet count display image can be determined. Based on the current target bullet count and the historical target bullet count, motor vibration information can be generated. This motor vibration information is used to control motor vibration. This allows the motor to vibrate accordingly based on changes in the bullet count, achieving relatively accurate motor control based on the current and historical target bullet counts.

[0085] Those skilled in the art will understand that Figure 1 The schematic diagram shown is merely one example in which embodiments of this application can be implemented. The scope of application of the embodiments of this application is not limited by any aspect of this framework.

[0086] To facilitate understanding of the technical solutions provided in the embodiments of this application, the vibration control method for a motor provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0087] See Figure 2 As shown, this figure is a flowchart of a vibration control method for a motor provided in an embodiment of this application, the method including S201-S203:

[0088] S201: Obtain the bullet count display image from the target game image, perform image processing on the bullet count display image to obtain the digital image to be identified.

[0089] In shooting games, the game screen displays the number of bullets available for the currently used weapon, allowing users to acquire and use ammunition strategically. Since bullets and weapons are linked, the bullet count is displayed around the selected weapon for easy viewing. Before firing, the user selects the desired weapon. A selection box or other specific indicator appears on the game interface, reminding the user of the currently used weapon and its available ammunition.

[0090] The image displaying the bullet count is used as the target game image. The target game image can be a 2400*1080 resolution, three-color game screenshot. The resolution of the target game image can be determined based on the game's display resolution. Within the target game image, the image within the bullet count display area surrounded by a selection box, or the image within the bullet count display area with other selection indicators, is the bullet count display image.

[0091] It is understandable that in shooting games, there may be a preparation phase or a phase where the player does not fire. In such cases, the number of bullets displayed in a screenshot cannot determine the number of bullets in the user's weapon. Such images can be filtered out to reduce the complexity of image processing. Based on this, this application provides a specific implementation of a motor vibration control method, as detailed below.

[0092] After obtaining the target game image, retrieve the bullet count display image from the target game image. For example, see... Figure 3 As shown, this figure is a schematic diagram of a target game image provided in an embodiment of this application. The bullet count display image is marked by a selection box, and can be obtained by cropping from the target game image according to the selection box. In one possible implementation, the bullet count display image is included in the gun-shaped display area, and the bullet count display image can be determined based on the relative positional relationship between the gun-shaped display area and the bullet count display image.

[0093] Specifically, the position information (x, y, h, w) of the gun-shaped display area can be obtained first, where x, y, h, and w are the horizontal and vertical coordinates of the top-left corner of the gun-shaped display area, and the height and width of the gun-shaped display area, respectively. The horizontal and vertical coordinates of the top-left corner of the gun-shaped display area are based on a coordinate system established with the top-left corner of the target game image as the origin and the adjacent boundaries of the mobile phone screen as the horizontal and vertical axes, respectively.

[0094] Based on the relative positional relationship between the gun type display area and the bullet quantity display image, the positional information of the bullet quantity display image is obtained as (x t ,y t ,h t ,w t ):

[0095]

[0096] Where, x t y t h t w t, where x and y are the coordinates of the top-left corner of the bullet count display image, and , where a is the height and , respectively. , b, and c are parameters representing the relative positional relationship between the gun display area and the bullet count display image. a, b, and c can be determined based on the specific shooting game. In a specific shooting game, a is 5 / 11, b is 1 / 3, and c is 6 / 11.

[0097] The image showing the number of bullets obtained is as follows. Figure 4 As shown, this figure is a schematic diagram of a bullet quantity display image provided in an embodiment of this application.

[0098] The obtained bullet count display image may be composed of pixel values ​​of multiple colors, and these multiple colors may affect the recognition of the numbers. To facilitate accurate identification of the bullet count display image, image processing is required. Correspondingly, this application provides a vibration control method for a motor, as detailed below.

[0099] The bullet count display image may include multiple characters, such as multiple numeric characters and symbol characters. To improve the accuracy of identifying the bullet count corresponding to the bullet count display image, a digit image to be identified can be obtained from the bullet count display image. Specifically, the bullet count display image can be segmented to obtain the digit image to be identified. The digit image to be identified corresponds to a character, and the number of digit images to be identified is the same as the number of characters in the bullet count display image; one digit image to be identified includes one character. For example, for... Figure 4 After segmenting the bullet count image, we can obtain images of the numbers to be identified, each containing "1", "0", "0", " / ", "2", "8" and "1".

[0100] S202: Determine the current target bullet count corresponding to the bullet count display image using the digital image to be identified.

[0101] Based on the digital image to be identified, the characters contained in the digital image can be identified, thereby determining the number of bullets corresponding to the bullet quantity display image, i.e., the current target number of bullets.

[0102] In one possible implementation, the current target bullet number corresponding to the bullet number display image can be determined based on the position of the character images included in each image to be identified in the bullet number display image, and the numbers corresponding to each image to be identified.

[0103] Specifically, the characters included in the digital image to be recognized can be determined based on the standard digital image corresponding to the preset characters. This application provides a specific implementation method for determining the current target bullet quantity corresponding to the bullet quantity display image using the digital image to be recognized; please refer to the following for details.

[0104] S203: Based on the current number of target bullets and the historical number of target bullets, generate motor vibration control information; the motor vibration control information is used to control motor vibration.

[0105] The current target bullet count is the number of bullets displayed in the current bullet count image, while the historical target bullet count is the number of bullets displayed in previous bullet count images, such as the bullet count in the image preceding the previous bullet count image. By using the current and historical target bullet counts, the change in the target bullet count can be determined, and thus the number of bullets used by the user can be determined.

[0106] Specifically, for example, if the previous bullet count image corresponds to a historical target bullet count of "16 / 100", and the current bullet count image corresponds to a current target bullet count of "14 / 100", then the bullet count difference can be calculated to be 2. Correspondingly, the user may have used two bullets to fire in the game.

[0107] Based on the current number of target bullets and the historical number of target bullets, corresponding motor vibration control information is generated. This motor vibration control information is used to control motor vibration and may include information such as the number of vibrations and the vibration mode.

[0108] In one possible implementation, controlling the motor to vibrate also requires meeting triggering conditions. For example, when the terminal's speaker control unit controls the terminal speaker to play two gunshot sounds corresponding to two shots, the motor is triggered to vibrate twice according to the motor vibration control information.

[0109] Based on the above S201-S203, it is known that by processing the bullet count display image in the target game image, a digital image to be identified can be obtained. This digital image can then be used to determine the current target bullet count corresponding to the bullet count display image. The current target bullet count corresponding to the bullet count display image represents the remaining bullets of the weapon currently used by the user in the game. Furthermore, historical target bullet counts are used to generate motor vibration control information. Based on the current target bullet count and historical target bullet counts, the specific number of bullets consumed can be determined, thereby determining whether the user has performed a shooting operation and the number of shooting operations. This achieves motor vibration control information generation based on the number of bullets consumed by the user, thus controlling the motor to vibrate accurately based on the number of bullets consumed. This can more accurately correspond to the user's actions, improving the user experience.

[0110] In one possible implementation, the digital image to be identified is a black and white image, composed of black pixels and white pixels.

[0111] Correspondingly, this application provides a specific implementation method for determining the current target bullet quantity corresponding to the bullet quantity display image using the digital image to be identified, which specifically includes the following three steps:

[0112] A1: Sequentially obtain the number of target color pixels in each pixel region of the digital image to be identified, and obtain a number sequence; the pixel region is a pixel row or pixel column; the target color pixel is a white pixel or a black pixel.

[0113] The number of target color pixels in each pixel region of the digital image to be recognized is sequentially obtained. A pixel region can be a pixel row or a pixel column. Target color pixels can be white or black. Based on the number of target color pixels in each pixel region, a sequence of counts corresponding to the digital image to be recognized can be obtained. The number of data points in the count sequence is the same as the number of pixel regions.

[0114] The number sequence reflects the distribution of white or black pixels in various pixel regions of the digital image to be identified, corresponding to the character patterns in the digital image. For digital images representing different character patterns, the number of pixels in the sequence will be different, thus allowing determination of the corresponding number or symbol for each digital image.

[0115] Given that digital images are vertically distributed, the sequence of the number of white pixels in a row of pixels can better reflect the characteristics of the digital image.

[0116] A2: Select a target sequence from a preset sequence based on the number sequence; the preset sequence is a sequence composed of the number of target color pixels in each pixel region of the standard digital image corresponding to the preset character.

[0117] The preset character can be a number from 0 to 9, or a commonly used delimiter. The preset sequence is a sequence consisting of the number of target color pixels in each pixel region of the standard digital image corresponding to the preset character. The method for obtaining the number sequence is the same as that for obtaining the preset sequence, which facilitates comparison between the number sequence and the preset sequence.

[0118] See Figure 5 As shown in the figure, this is a schematic diagram of a preset sequence provided in an embodiment of this application. The horizontal axis of the coordinate system represents different pixel regions, and the vertical axis represents the number of target pixels in each pixel region. Different horizontal lines in the coordinate system represent different preset sequences.

[0119] The preset sequence can be stored in the sample library in advance. After obtaining the number of sequences, the preset sequence is retrieved from the sample library to determine the target sequence.

[0120] In one possible implementation, this application provides a specific method for selecting a target sequence from a preset sequence based on the number sequence, specifically including:

[0121] The preset sequence with the smallest difference from the number sequence or the ratio closest to 1 is taken as the target sequence.

[0122] Calculate the difference between the count sequence and the preset sequence, or calculate the ratio between the count sequence and the preset sequence, and take the preset sequence with the smallest difference or the ratio closest to 1 as the target sequence.

[0123] A3: Obtain the current target bullet count corresponding to the bullet count display image based on the preset character corresponding to the target sequence.

[0124] The target sequence is the preset sequence that is closest to the number sequence among the preset sequences. The preset character corresponding to the target sequence is used as the character corresponding to the digit image to be recognized. The current target bullet count corresponding to the bullet count display image is determined based on the digit image to be recognized.

[0125] In this embodiment of the application, by determining the target sequence, a preset sequence that is close to the number sequence can be determined, thereby achieving accurate recognition of the characters contained in the digital image to be identified and improving the accuracy of determining the current target bullet quantity.

[0126] In one possible implementation, the user can adjust the display size of the image in a shooting game, and the resulting image of the digit to be identified may be an image that has been resized. If the size of the image of the digit to be identified is inconsistent with the size of the standard digit image, the difference between the corresponding number sequence and the preset sequence will be large, making it difficult to determine the target digit.

[0127] Based on this, this application embodiment provides another vibration control method for a motor. Before selecting a target sequence from a preset sequence according to the number sequence, the method further includes the following steps:

[0128] If the image size of the standard digital image is different from the image size of the digital image to be identified, the number sequence or the preset sequence is processed to be of equal length.

[0129] If the image size of the standard digital image and the image size of the digital image to be identified are different, the sequence lengths and / or the value ranges of the data in the corresponding preset sequence and count sequence will be different, making it difficult to determine the target sequence based on the count sequence. Therefore, it is necessary to first perform equal-length processing on the count sequence or the preset sequence.

[0130] For two different situations, where the image size of the standard digital image is larger than the image size of the digital image to be identified, or the image size of the standard digital image is smaller than the image size of the digital image to be identified, there are methods for adjusting the preset sequence and adjusting the number sequence respectively.

[0131] Correspondingly, this application provides a specific implementation method for performing equal-length processing on the number sequence or the preset sequence if the image size of the standard digital image is different from the image size of the digital image to be identified, specifically including:

[0132] If the image size of the standard digital image is larger than the image size of the digital image to be identified, the preset sequence is adjusted to obtain an updated preset sequence;

[0133] If the image size of the digital image to be identified is larger than the image size of the standard digital image, the number sequence is adjusted to obtain an updated number sequence.

[0134] The image size of a standard digital image can be specifically represented by the number of pixels in the horizontal and vertical directions. Similarly, the image size of a digital image to be identified can be represented by the number of pixels in the horizontal and vertical directions. By comparing the image size of the acquired standard digital image with the image size of the digital image to be identified, it can be determined whether the digital image to be identified is the same size as the standard digital image.

[0135] If the image size of the standard digital image is larger than the image size of the digital image to be recognized, then the number of data points in the preset sequence is greater than the number of data points in the count sequence, and / or the value range of the data points in the preset sequence is greater than the value range of the data points in the count sequence. The preset sequence can be further adjusted so that the updated preset sequence and the count sequence are similar in length and value range for each data point, facilitating comparison between the updated preset sequence and the count sequence.

[0136] If the image size of the digital image to be identified is larger than the image size of the standard digital image, then the length of the counting sequence is greater than the length of the preset sequence, and / or the value range of the data in the counting sequence is greater than the value range of the data in the preset sequence. The counting sequence can be further adjusted to obtain an updated counting sequence.

[0137] This application provides a specific implementation method for adjusting a preset sequence to obtain an updated preset sequence, including the following four steps:

[0138] B1: Determine the first step length and the first ratio based on the image size of the standard digital image and the image size of the digital image to be identified.

[0139] The first step length is the length of the pixel region selected in the standard digital image. Specifically, the first step length can be determined based on the specific type of the pixel region in the standard digital image. For example, if the pixel region is a pixel row, the corresponding first step length can be determined based on the width of the standard digital image and the width of the digital image to be recognized. If the pixel region is a pixel column, the corresponding first step length can be determined based on the length of the standard digital image and the length of the digital image to be recognized.

[0140] The first ratio is used to adjust the values ​​of data in the preset sequence. Specifically, the first ratio can be determined based on the specific type of pixel region in the standard digital image. For example, if the pixel region is a pixel row, the corresponding first ratio can be determined based on the length of the standard digital image and the length of the digital image to be recognized. If the pixel region is a pixel column, the corresponding first ratio can be determined based on the width of the standard digital image and the width of the digital image to be recognized.

[0141] B2: Determine the first target pixel region in the standard digital image based on the first step length.

[0142] The first target pixel region is determined in the standard digital image based on the first step length. Specifically, the standard digital image can be divided into pixel regions according to the first step length to obtain the first target pixel region. Alternatively, a portion of the pixel region can be selected from the standard digital image according to the first step length to obtain the first target pixel region.

[0143] B3: Obtain the number of target color pixels in the first target pixel region as the first pixel count.

[0144] Based on the determined first target pixel region, the number of target color pixels in the first target pixel region is obtained as the first pixel count, and the preset sequence can be updated based on the first pixel count.

[0145] B4: Obtain the updated preset sequence based on the first number of pixels and the first ratio.

[0146] By using the first ratio again, the number of first pixels can be adjusted to obtain the updated preset sequence.

[0147] Based on the above, by determining the first step length and the first ratio, the updated preset sequence can be determined using the first step length and the first ratio, thereby enabling a more accurate determination of the target sequence from the preset sequence.

[0148] This application provides a specific calculation method for updating the preset sequence, as detailed below.

[0149] In one possible implementation, the number of pixels in the horizontal direction of both the standard digital image and the digital image to be recognized is first obtained to obtain the first and second dimension lengths. Then, the number of pixels in the vertical direction of both the standard digital image and the digital image to be recognized is obtained to obtain the third and fourth dimension lengths. Specifically, the first dimension length can be represented by X_Lib, the second dimension length by X_T, the third dimension length by Y_Lib, and the fourth dimension length by Y_T.

[0150] If the first target pixel region is a pixel row, the number of pixels corresponding to the pixel row in the preset number needs to be reduced, and the value of the preset number needs to be reduced accordingly.

[0151] In one possible calculation method, the pixel regions at the edges and the pixel regions in the middle of the selected portion can be used as the first target pixel regions respectively.

[0152] Subtract 2 from the first dimension length, then subtract 2 from the second dimension length. The ratio between these two values ​​gives the first step length. The formula for calculating the first step length is as follows:

[0153]

[0154] It should be noted that the first step length is used to reduce the number of corresponding pixel rows in the preset number. The calculated first step length has a value greater than 1, and can be an integer or a decimal.

[0155] Calculate the ratio of the fourth dimension length to the third dimension length to obtain the first ratio. The formula for calculating the first ratio is as follows:

[0156]

[0157] If the pixel region for obtaining the target number of pixels is a pixel column, the number of pixels corresponding to the pixel column in the preset number needs to be reduced, and the value of the preset number needs to be reduced accordingly.

[0158] Subtract 2 from the third dimension length, then subtract 2 from the fourth dimension length, and calculate the ratio of the two numbers to obtain the first step length. The formula for calculating the first step length is as follows:

[0159]

[0160] It should be noted that the first step length is used to reduce the number of corresponding pixel columns in the preset number. The calculated first step length has a value greater than 1, and it may be an integer or a decimal.

[0161] Calculate the ratio of the second dimension length to the first dimension length to obtain the first ratio. The formula for calculating the first ratio is as follows:

[0162]

[0163] For the preset sequence to be reduced, the updated preset sequence is obtained by using the number of target color pixels in the first target pixel region located at the edge of the standard digital image and the number of target color pixels in the first target pixel region located in the middle of the standard digital image. Using the number of target color pixels corresponding to the first pixel region in the preset region, the number of target color pixels corresponding to the first pixel region in the updated preset sequence is calculated. Multiplying the number of target color pixels corresponding to the first pixel region in the preset region by a first ratio yields the number of target color pixels corresponding to the reduced pixel region, and this number is used as the number of target color pixels corresponding to the first pixel region in the updated preset sequence.

[0164] The calculation formula is as follows:

[0165] X_Zoom1(0)=Image_Lib_Num_White(0)×A1 (6)

[0166] Where Image_Lib_Num_White(0) represents the number of target color pixels corresponding to the first pixel region in the preset region. X_Zoom1(0) represents the number of target color pixels corresponding to the first pixel region in the updated preset sequence. A1 represents the first ratio, and the specific value of A1 is related to the type of pixel region.

[0167] Understandably, since there are a large number of pixel regions in the preset sequence, it is necessary to use the first step to select some pixel regions from the preset sequence and adjust the number of target color pixels corresponding to the pixel regions.

[0168] The range of the pixel region to be adjusted is determined based on the first step length. The number of target color pixels corresponding to the [1+(i-1)×step1]th pixel region is taken as the first number to be compared in the preset sequence. Here, the initial value of i is 1, and step1 is the first step length. The specific value of step1 is related to the type of pixel region.

[0169] The number of target color pixels corresponding to the (i×step1)th pixel region is used as the last number to be compared in the preset sequence.

[0170] The number of target color pixels corresponding to the pixel region between the [1+(i-1)×step1]th pixel region and the (i×step1)th pixel region is also used as the first number to be compared.

[0171] The number of items to be compared in the first step is 1. By selecting the first number of items to be compared, a selection of a portion of the data in the preset sequence can be made, thereby adjusting the preset sequence.

[0172] To ensure the accuracy of the updated preset sequence, the largest value among the first number of comparisons is taken as the first pixel count. This preserves the largest number of target color pixels corresponding to the pixel regions in step 1, making the number of target color pixels corresponding to the pixel regions in the determined updated preset sequence more accurate.

[0173] Calculate the product of the number of first pixels and the first ratio to obtain the number of target color pixels corresponding to the i-th pixel region of the updated preset sequence.

[0174] The corresponding calculation formula is as follows:

[0175]

[0176] Increment the value of i by 1 to obtain the updated value of i. Use the updated value of i to determine whether to completely convert the middle part of the preset sequence into the corresponding updated preset sequence.

[0177] If the pixel region is a pixel row, compare the value of i with the value of X_T-2. If i is less than or equal to, it means that the middle part of the preset sequence has not been completely converted into the corresponding updated preset sequence. Repeat the above steps of determining the range of the pixel region to be adjusted and the subsequent steps of determining the number of the first pixel. Stop the calculation when the value of i is greater than X_T-2.

[0178] If the pixel region is a pixel column, compare i with Y_T-2. If i is less than or equal to Y_T-2, it means that the middle part of the preset sequence has not been completely converted into the corresponding updated preset sequence, and the above steps are repeated. Then, the calculation stops when the value of i is greater than Y_T-2.

[0179] Using the number of target color pixels corresponding to the last pixel region in the preset region, the number of target color pixels corresponding to the last pixel region in the updated preset sequence is calculated. This number is then multiplied by a first ratio to obtain the number of target color pixels corresponding to the reduced pixel region. This result is used as the number of target color pixels corresponding to the last pixel region in the updated preset sequence.

[0180] If the pixel region is a pixel row, the calculation formula is as follows:

[0181] X_Zoom1(X_T-1)=Image_Lib_Num_White(X_Lib-1)×A1 (8)

[0182] Here, Image_Lib_Num_White(X_Lib-1) represents the number of target color pixels corresponding to the last pixel region in the preset region. X_Zoom1(X_T-1) represents the number of target color pixels corresponding to the last pixel region in the updated preset sequence. A1 represents the first ratio, and the specific value of A1 is related to the type of pixel region.

[0183] If the pixel region is a column of pixels, the calculation formula is as follows:

[0184] X_Zoom1(Y_T-1)=Image_Lib_Num_White(Y_Lib-1)×A1 (9)

[0185] Here, Image_Lib_Num_White(Y_Lib-1) represents the number of target color pixels corresponding to the last pixel region in the preset region. X_Zoom1(Y_T-1) represents the number of target color pixels corresponding to the last pixel region in the updated preset sequence. A1 represents the first ratio, and the specific value of A1 is related to the type of pixel region.

[0186] Based on the above, the number of target color pixels corresponding to the first and last pixel regions of the preset sequence is obtained by counting the target color pixels corresponding to the first and last pixel regions of the preset sequence. Then, the number of target color pixels corresponding to a portion of the middle pixel regions of the preset sequence is selected, and the number of target color pixels corresponding to the middle pixel regions of the updated preset sequence is calculated. This adjusts the preset sequence so that the length of the updated preset sequence is consistent with the count sequence, and the value range of each number in the preset sequence is the same as the value range of each number in the count sequence, thus facilitating comparison between the updated preset sequence and the count sequence.

[0187] In another possible implementation, the standard digital image can be segmented using the first step length to obtain multiple first target pixel regions. The number of target color pixels in the middle position of the first target pixel region is taken as the first pixel count. Then, using the first ratio and the first pixel count, the updated preset sequence can be obtained.

[0188] Furthermore, this application embodiment also provides a specific implementation method for adjusting the number sequence to obtain an updated number sequence if the image size of the digital image to be identified is larger than the image size of the standard digital image, including the following four steps:

[0189] C1: Determine the second step size and the second ratio based on the image size of the standard digital image and the image size of the digital image to be identified.

[0190] The second step length is the length of the pixel region selected from the digital image to be recognized. Specifically, the second step length can be determined based on the specific type of the pixel region in the digital image to be recognized. For example, if the pixel region is a pixel row, the corresponding second step length can be determined based on the width of the digital image to be recognized and the width of the standard digital image. If the pixel region is a pixel column, the corresponding second step length can be determined based on the length of the digital image to be recognized and the length of the standard digital image.

[0191] The second ratio is used to adjust the values ​​of the data in the number sequence. Specifically, the second ratio can be determined based on the specific type of the pixel region in the digital image to be recognized. For example, if the pixel region is a pixel row, the corresponding second ratio can be determined based on the length of the digital image to be recognized and the length of the standard digital image. If the pixel region is a pixel column, the corresponding second ratio can be determined based on the width of the digital image to be recognized and the width of the standard digital image.

[0192] C2: Determine the second target pixel region in the digital image to be identified based on the second step size.

[0193] The second target pixel region is determined in the digital image to be recognized based on the second step size. Specifically, the second target pixel region can be obtained by dividing the digital image to be recognized into pixel regions according to the second step size. Alternatively, a portion of the pixel region can be selected from the digital image to be recognized according to the second step size to obtain the second target pixel region.

[0194] C3: Obtain the number of target color pixels in the second target pixel region, and use it as the number of second pixels.

[0195] Based on the determined second target pixel region, the number of target color pixels in the second target pixel region is obtained as the second pixel count, and the count sequence can be updated based on the second pixel count.

[0196] C4: Obtain the updated number sequence based on the second number of pixels and the second ratio.

[0197] By using the second ratio, the number of the second pixel can be adjusted to obtain the updated number sequence.

[0198] Based on the above, by determining the second step length and the second ratio, the updated number sequence can be determined using the second step length and the second ratio, thereby enabling a more accurate determination of the target sequence from the preset sequence.

[0199] Correspondingly, this application provides a specific calculation method for the updated number sequence, which can be found below.

[0200] The specific implementation method for updating the number sequence is similar to the above-described method for updating the preset sequence. The calculation formulas for the second step length, the second ratio, and the updated number sequence are described below.

[0201] If the pixel region is a pixel row, the formula for calculating the second step length is as shown in formula (10):

[0202]

[0203] The formula for calculating the second ratio is as follows:

[0204]

[0205] If the pixel region is a pixel column, the formula for calculating the second step length is as shown in formula (12):

[0206]

[0207] The formula for calculating the second ratio is as follows:

[0208]

[0209] If the pixel region is a pixel row, the number of target color pixels corresponding to the pixel region in the updated number sequence is calculated as follows:

[0210]

[0211] The initial value of j is 1, and 1≤j≤X_Lib-2.

[0212] If the pixel region is a pixel column, the number of target color pixels corresponding to the pixel region in the updated number sequence is calculated as follows:

[0213]

[0214] The initial value of j is 1, and 1≤j≤Y_Lib-2.

[0215] Based on the above, the number of target color pixels corresponding to the first and last pixel regions of the updated count sequence is obtained by counting the target color pixels corresponding to the first and last pixel regions of the count sequence. Then, the number of target color pixels corresponding to a portion of the middle pixel regions of the count sequence is selected, and the number of target color pixels corresponding to the middle pixel regions of the updated count sequence is calculated. This adjusts the count sequence so that the length of the updated count sequence is the same as the preset sequence, and the value range of each number in the count sequence is the same as the value range of each number in the preset sequence, thus facilitating comparison between the updated count sequence and the preset sequence.

[0216] In another possible implementation, the second step size can be used to segment the digital image to be recognized, resulting in multiple second target pixel regions. The number of target color pixels in the middle position of the second target pixel region is taken as the second pixel count. Then, using the second ratio and the second pixel count, the updated count sequence is obtained.

[0217] In one possible implementation, the target game image can be obtained by taking a screenshot of an image displayed on the terminal. This application also provides a vibration control method for a motor, which further includes, before obtaining the bullet count display image from the target game image:

[0218] If the image acquisition conditions are met, the original game images are acquired sequentially according to a preset time interval, and the original game images are identified by digital display identifiers.

[0219] If the original game image contains a digital display identifier, the original game image is used as the game image to be processed.

[0220] Image acquisition conditions are used to determine the conditions that trigger the acquisition of game images to be processed. It's understandable that during a user's use of a terminal to play a shooting game, there are stages where shooting is not possible; during these stages, there's no need to take a screenshot to obtain the game image. Specifically, the image acquisition condition could be that the terminal's display sensor detects the user touching the display screen. Another example is that the image acquisition condition could be the start of a game match.

[0221] Once the image acquisition conditions are met, the game image to be processed is acquired at preset time intervals. The game image to be processed can be obtained by taking a screenshot of the game screen displayed on the terminal. The time interval is the time interval between acquiring two game images to be processed. The time interval can be set according to the terminal's performance and the game mechanics. Specifically, the preset time interval can be 80ms.

[0222] Numerical display identifiers are used to indicate the number of bullets displayed in the image. The obtained game image to be processed may or may not contain numerical display identifiers. The numerical display identifiers are identified within the acquired game image. For example, a numerical display identifier might be a yellow selection box, corresponding to an image scanning object with a square shape and a yellow color.

[0223] If the game image to be processed contains a numerical display identifier, then the game image to be processed is identified as the target game image, which facilitates the subsequent extraction of the bullet count display image from the target game image.

[0224] Based on the above, by acquiring the game image to be processed after meeting the image acquisition conditions, and then filtering the game image to be processed, the target game image that needs to be processed can be determined, reducing the number of images that need to be processed and improving the efficiency of determining the target bullet number.

[0225] In one possible implementation, this application provides a specific implementation method for obtaining a bullet count display image from a target game image, performing image processing on the bullet count display image to obtain at least one digital image to be identified, including the following steps:

[0226] The bullet count display image is obtained from the target game image. The bullet count display image is then grayscaled and binarized to obtain a black and white digital image. The black and white digital image is composed of black pixels and white pixels.

[0227] Based on the regions where each character pattern is located in the black and white digital image, the black and white digital image is segmented to obtain at least one digital image to be identified; the digital image to be identified includes a character pattern.

[0228] Specifically, for grayscale processing, the color channel values of each pixel in the bullet count display image can be obtained. In the embodiments of the present application, the RGB color channel values of each pixel can be obtained. And the bullet count display image is converted into a grayscale image using formula (16).

[0229] Gray(a, b) = 0.299 × R(a, b) + 0.578 × G(a, b) + 0.114 × B(a, b) (16)

[0230] Where a represents the a-th pixel in the horizontal direction of the bullet count display image, 0 ≤ a < X, and X is the total number of horizontal pixels in the bullet count display image; b represents the b-th pixel in the vertical direction of the bullet count display image, 0 ≤ b < Y, and Y is the total number of vertical pixels in the bullet count display image. R(a, b) represents the red channel value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction. G(a, b) represents the green channel value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction. B(a, b) represents the blue channel value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction. The obtained Gray(a, b) represents the grayscale value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction after conversion.

[0231] Further, the bullet count display image after grayscale processing is binarized to obtain a black-and-white digital image with a black background and a white character pattern. See Figure 6 As shown, this figure is a schematic diagram of a black-and-white digital image provided by the embodiments of the present application.

[0232] In a possible implementation, the grayscale threshold can be set to 180 according to the character pattern with a color bias towards white in the bullet count display image. When binarizing the bullet count display image, the pixels with a grayscale value greater than the grayscale threshold are set as black pixels, and the pixels with a grayscale value less than or equal to the grayscale threshold are set as white pixels to obtain a digital image to be recognized. The specific calculation formula is as follows:

[0233]

[0234] Where Image_Num_Binary(a, b) represents the grayscale value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction in the binarized black-and-white digital image. Gray(a, b) represents the grayscale value of the a-th pixel in the horizontal direction and the b-th pixel in the vertical direction in the bullet count display image before binarization. GrayTd represents the grayscale threshold, and GrayTd = 180.

[0235] A black-and-white digital image contains numbers and symbols. The image is segmented based on the regions where each character pattern is located. One possible implementation involves scanning and combining adjacent white pixels in the black-and-white digital image. Connecting regions are then identified in the resulting images to distinguish between different connected regions. Figure 6 For example, the connected regions obtained after combining white pixels are "1", "0", "0", " / ", "2", "8" and "1". The corresponding connected region labels are "1", "2", "3", "4", "5", "6" and "7".

[0236] A bounding rectangle is constructed around the connected regions of different identifiers, and the black and white digital image is segmented according to the bounding rectangle. This yields a digital image to be identified, which includes a character pattern. The number of digital images to be identified is the same as the number of characters in the bullet count display image.

[0237] Based on the above, it can be seen that by converting and binarizing the bullet quantity display image, a black-and-white digital image consisting only of black and white pixels can be obtained. Segmenting this black-and-white digital image yields the image of the digit to be identified. By processing the bullet quantity display image, an image of the digit to be identified is obtained, making it easier to determine the corresponding number. This improves the accuracy of identifying the target bullet number corresponding to the bullet quantity display image, thereby enabling precise control of the motor.

[0238] Based on the vibration control method for a motor provided in the above-described embodiments, this application also provides a vibration control device for a motor, which will be described below with reference to the accompanying drawings.

[0239] See Figure 7 This figure is a schematic diagram of the structure of a vibration control device for a motor provided in an embodiment of this application. Figure 7 As shown, the vibration control device for the motor includes:

[0240] The first acquisition unit 701 is used to acquire a bullet count display image from a target game image, and perform image processing on the bullet count display image to obtain a digital image to be identified.

[0241] The first determining unit 702 is used to determine the current target bullet quantity corresponding to the bullet quantity display image using the digital image to be identified;

[0242] The generation unit 703 is used to generate motor vibration control information based on the current number of target bullets and the historical number of target bullets; the motor vibration control information is used to control motor vibration.

[0243] In one possible implementation, the digital image to be identified consists of black pixels and white pixels;

[0244] The first determining unit 702 includes:

[0245] The first acquisition subunit is used to sequentially acquire the number of target color pixels in each pixel region of the digital image to be identified, and obtain a sequence of counts; the pixel region is a pixel row or a pixel column; the target color pixel is a white pixel or a black pixel;

[0246] A selection subunit is used to select a target sequence from a preset sequence based on the number sequence; the preset sequence is a sequence composed of the number of target color pixels in each pixel region of a standard digital image corresponding to a preset character;

[0247] The second acquisition subunit is used to obtain the current target bullet count corresponding to the bullet count display image based on the preset character corresponding to the target sequence.

[0248] In one possible implementation, the device further includes:

[0249] An adjustment unit is used to perform equal-length processing on the number sequence or the preset sequence if the image size of the standard digital image is different from the image size of the digital image to be identified.

[0250] In one possible implementation, the adjustment unit includes:

[0251] The first adjustment subunit is used to adjust the preset sequence if the image size of the standard digital image is larger than the image size of the digital image to be identified, so as to obtain an updated preset sequence.

[0252] The second adjustment subunit is used to adjust the number sequence if the image size of the digital image to be identified is larger than the image size of the standard digital image, so as to obtain an updated number sequence.

[0253] In one possible implementation, the first adjustment subunit is specifically used to determine the first step length and the first ratio based on the image size of the standard digital image and the image size of the digital image to be identified;

[0254] The first target pixel region is determined in the standard digital image based on the first step length;

[0255] Obtain the number of target color pixels in the first target pixel region, and use it as the first pixel count;

[0256] The updated preset sequence is obtained based on the first number of pixels and the first ratio.

[0257] In one possible implementation, the second adjustment subunit is specifically used to determine a second step size and a second ratio based on the image size of the standard digital image and the image size of the digital image to be identified;

[0258] The second target pixel region is determined in the digital image to be identified based on the second step size;

[0259] Obtain the number of target color pixels in the second target pixel region, and use it as the number of second pixels;

[0260] The updated number sequence is obtained based on the second number of pixels and the second ratio.

[0261] In one possible implementation, the selection sub-unit is specifically used to select a preset sequence that has the smallest difference from the number sequence or the ratio closest to 1 as the target sequence.

[0262] In one possible implementation, the device further includes:

[0263] The second acquisition unit is used to acquire original game images sequentially at preset time intervals if the image acquisition conditions are met, and to identify the digital display identifiers of the original game images.

[0264] The second determining unit is used to determine the original game image as the game image to be processed if the original game image has a digital display identifier.

[0265] In one possible implementation, the first acquisition unit is specifically used to acquire a bullet count display image from a target game image, and to perform grayscale and binarization processing on the bullet count display image to obtain a black and white digital image; the black and white digital image is composed of black pixels and white pixels.

[0266] Based on the regions where each character pattern is located in the black and white digital image, the black and white digital image is segmented to obtain the digital image to be identified.

[0267] Based on the vibration control method for a motor provided in the above-described method embodiments, this application provides a vibration control chip for a motor, characterized in that it includes: a processor and a memory;

[0268] The memory is used to store computer-executed instructions;

[0269] When the instruction is executed by the processor, it causes the processor to perform the method described in the above embodiments.

[0270] Based on the vibration control method for a motor provided in the above-described method embodiments, this application provides a vibration control chip for a motor, comprising: a processor and a memory;

[0271] The memory is used to store computer-executed instructions;

[0272] When executed by the processor, the instruction causes the processor to perform the method described in any of the above embodiments.

[0273] Based on the vibration control method for a motor provided in the above-described method embodiments, this application provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the method described in the above embodiments.

[0274] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0275] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0276] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0277] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0278] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A vibration control method for a motor, characterized in that, The method includes: Obtain the bullet count display image from the target game image, and perform image processing on the bullet count display image to obtain the digital image to be identified; The number of target bullets corresponding to the bullet count display image is determined using the digital image to be identified; Based on the current number of target bullets and the historical number of target bullets, motor vibration control information is generated; the motor vibration control information is used to control motor vibration. The digital image to be identified is composed of black and white pixels. Correspondingly, determining the current target bullet count corresponding to the bullet count display image using the digital image to be identified includes: sequentially obtaining the number of target color pixels in each pixel region of the digital image to be identified, resulting in a count sequence; selecting a target sequence from a preset sequence based on the count sequence; and obtaining the current target bullet count corresponding to the bullet count display image based on a preset character corresponding to the target sequence. The preset sequence is a sequence composed of the number of target color pixels in each pixel region of the standard digital image corresponding to the preset character. Before selecting a target sequence from a preset sequence based on the count sequence, the method further includes: if the image size of the standard digital image is different from the image size of the digital image to be identified, performing equal-length processing on the count sequence or the preset sequence; specifically, if the image size of the standard digital image is larger than the image size of the digital image to be identified, adjusting the preset sequence to obtain an updated preset sequence; if the image size of the digital image to be identified is larger than the image size of the standard digital image, adjusting the count sequence to obtain an updated count sequence.

2. The method according to claim 1, characterized in that, The pixel region is a pixel row or pixel column; the target color pixel is a white pixel or a black pixel.

3. The method according to claim 1, characterized in that, The step of adjusting the preset sequence to obtain the updated preset sequence includes: The first step length and the first ratio are determined based on the image size of the standard digital image and the image size of the digital image to be identified; Based on the first step length, a first target pixel region is determined in the standard digital image; Obtain the number of target color pixels in the first target pixel region, and use it as the first pixel count; The updated preset sequence is obtained based on the first number of pixels and the first ratio.

4. The method according to claim 1, characterized in that, The step of adjusting the count sequence to obtain the updated count sequence includes: The second step size and the second ratio are determined based on the image size of the standard digital image and the image size of the digital image to be identified. The second target pixel region is determined in the digital image to be identified based on the second step size; Obtain the number of target color pixels in the second target pixel region, and use it as the number of second pixels; The updated number sequence is obtained based on the second number of pixels and the second ratio.

5. The method according to claim 2, characterized in that, The step of selecting a target sequence from a preset sequence based on the number sequence includes: The preset sequence with the smallest difference from the number sequence or the ratio closest to 1 is taken as the target sequence.

6. The method according to claim 1, characterized in that, Before obtaining the bullet count display image from the target game image, the method further includes: If the image acquisition conditions are met, the original game images are acquired sequentially according to a preset time interval, and the original game images are identified by digital display identifiers. If the original game image contains a digital display identifier, the original game image is used as the game image to be processed.

7. The method according to claim 1, characterized in that, The process of obtaining a bullet count display image from a target game image and performing image processing on the bullet count display image to obtain a digital image to be identified includes: The bullet count display image is obtained from the target game image. The bullet count display image is then grayscaled and binarized to obtain a black and white digital image. The black and white digital image is composed of black pixels and white pixels. Based on the regions where each character pattern is located in the black and white digital image, the black and white digital image is segmented to obtain the digital image to be identified.

8. A vibration control device for a motor, characterized in that, The device includes: The first acquisition unit is used to acquire a bullet count display image from a target game image, and to perform image processing on the bullet count display image to obtain a digital image to be identified. The first determining unit is used to determine the current target bullet quantity corresponding to the bullet quantity display image using the digital image to be identified; The generation unit is used to generate motor drive control information based on the current number of target bullets and the historical number of target bullets; the motor drive control information is used to control motor vibration. The digital image to be identified is composed of black pixels and white pixels. Correspondingly, the first determining unit includes: The first acquisition subunit is used to sequentially acquire the number of target color pixels in each pixel region of the digital image to be identified, and obtain a sequence of counts. A selection subunit is used to select a target sequence from a preset sequence based on the number sequence; the preset sequence is a sequence composed of the number of target color pixels in each pixel region of a standard digital image corresponding to a preset character; The second acquisition subunit is used to obtain the current target bullet count corresponding to the bullet count display image based on the preset character corresponding to the target sequence; The device further includes an adjustment unit, used to perform equal-length processing on the number sequence or the preset sequence if the image size of the standard digital image is different from the image size of the digital image to be identified; the process specifically involves: if the image size of the standard digital image is larger than the image size of the digital image to be identified, adjusting the preset sequence to obtain an updated preset sequence; if the image size of the digital image to be identified is larger than the image size of the standard digital image, adjusting the number sequence to obtain an updated number sequence.

9. A vibration control chip for a motor, characterized in that, include: Processor and memory; The memory is used to store computer-executed instructions; When executed by the processor, the instructions cause the processor to perform the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Information processing method and device, readable storage medium and electronic equipment

    CN112449055A

  • Vibration control method and device of motor, chip and medium

    CN115531861A