Gashapon machine and its control method, device and storage medium
By using a joystick device and a special-shaped screen of a display device in a gashapon machine to display the gashapon animation shot by a virtual camera, the problem that existing gashapon machines cannot be watched by multiple people is solved, and a 3D effect is achieved at a lower cost.
Patent Information
- Application Number
- CN202211736096.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The operation process of the existing gashapon machine cannot be watched by multiple people at the same time, which is not conducive to completing the lottery interaction of large-scale activities. If it is designed as a large-scale device, the production cost will be high.
A joystick device and a display device are used. The display device includes a special-shaped screen consisting of a first screen and a second screen. The joystick device is used to trigger and send a gashapon command, so that the first screen and the second screen respectively display the gashapon animation shot by the virtual camera, with the same angle to achieve a 3D effect.
It enables multiple people to watch the 3D effect of the capsule machine at the same time, reducing equipment costs.
Smart Images

Figure CN116153000B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart devices, and in particular to a gashapon machine and its control method, device and storage medium. Background Art
[0002] A gashapon machine typically refers to a device that dispenses capsule toys. When you insert a coin and twist the mechanism on the front of the machine, a round, egg-shaped capsule, often called a gashapon, falls out from the bottom. Because the capsules that fall out are random, gashapon machines are often used in random draws to help people win prizes.
[0003] However, current gashapon machines are usually small devices, and the operation process of the gashapon machine cannot be watched by multiple people at the same time, which is not conducive to completing the lottery interaction of large-scale events. If it is designed as a large device, the production cost is high, which is not conducive to saving equipment costs. Summary of the Invention
[0004] In view of this, the embodiments of the present application provide a gashapon machine and its control method, device and storage medium to solve the problem in the prior art that the operation process of the gashapon machine cannot be watched by multiple people at the same time, which is not conducive to completing the lottery interaction of large-scale activities. If it is designed as a large-scale device, the production cost is high, which is not conducive to saving equipment costs.
[0005] A first aspect of an embodiment of the present application provides a method for controlling a gashapon machine, wherein the gashapon machine includes a joystick device and a display device, wherein the display device includes a special-shaped screen consisting of a first screen and a second screen, and the method includes:
[0006] When the joystick device detects that it is triggered, it sends a gashapon instruction to the display device;
[0007] Based on the capsule toy instruction, the first screen of the display device displays a first capsule toy animation pre-shot by a first virtual camera, and the second screen of the display device displays a second capsule toy animation pre-shot by a second virtual camera, wherein the angle between the first virtual camera and the second virtual camera is the same as the angle between the first screen and the second screen.
[0008] In conjunction with the first aspect, in a first possible implementation of the first aspect, before, based on the gashapon instruction, the first screen of the display device displays a first gashapon animation pre-shot by a first virtual camera and the second screen of the display device displays a second gashapon animation pre-shot by a second virtual camera, the method further includes:
[0009] Determine the best viewpoint location;
[0010] According to the optimal viewpoint position, offset values of the first virtual camera and the second virtual camera are determined.
[0011] In conjunction with the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, determining the offset value of the first virtual camera and the second virtual camera according to the optimal viewpoint position includes:
[0012] Determining, based on the optimal viewpoint position, a first distance from a first perpendicular point of the optimal viewpoint position perpendicular to the plane where the first screen resides to a nearest edge of the first screen, and a second distance from a second perpendicular point of the optimal viewpoint position perpendicular to the plane where the second screen resides to a nearest edge of the second screen;
[0013] The offset values of the first virtual camera and the second virtual camera are determined according to the first distance, the second distance, the height of the optimal viewpoint position, and the parameters of the first screen and the second screen.
[0014] In conjunction with the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, determining the offset value between the first virtual camera and the second virtual camera based on the first distance, the second distance, the height of the optimal viewpoint position, and parameters of the first screen and the second screen includes:
[0015] According to: x = (lx / 2 + lenghL) / lx, y = (ly / 2 + d) / ly, determine the offset value of the first virtual camera;
[0016] According to: x = -(rx / 2 + lenghR) / rx, y = (ry / 2 + d) / ry, determine the offset value of the second virtual camera;
[0017] Among them, lx, ly are the length and width of the first screen respectively, rx, ry are the length and width of the second screen respectively, lenghL is the first distance, lenghR is the second distance, and d is the difference between the distance between the intersection of the lower edge of the first screen and the second screen and the ground and the height of the optimal viewpoint position.
[0018] In conjunction with the first possible implementation of the first aspect, in a fourth possible implementation of the first aspect, determining the optimal viewpoint position includes:
[0019] acquiring an image of a scene location for viewing the first screen and the second screen;
[0020] The optimal viewpoint position is determined according to the portrait information in the image.
[0021] In combination with the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, determining the optimal viewpoint position according to portrait information in the image includes:
[0022] Obtaining the distribution density of portrait information in the image;
[0023] According to the distribution density of the portrait information, the center point of the area with the maximum distribution density is determined to determine the optimal viewpoint position.
[0024] In combination with the first aspect, in a sixth possible implementation manner of the first aspect, the angle between the first screen and the second screen is any angle greater than 0 degrees and less than 360 degrees.
[0025] A second aspect of an embodiment of the present application provides a control device for a gashapon machine, the gashapon machine comprising a joystick device and a display device, the display device comprising a special-shaped screen consisting of a first screen and a second screen, the device comprising:
[0026] An instruction sending unit, configured for the joystick device to send a gashapon instruction to the display device when detecting that it is triggered;
[0027] An animation playback unit is used to, based on the gashapon instruction, cause the first screen of the display device to display a first gashapon animation pre-shot by a first virtual camera, and the second screen of the display device to display a second gashapon animation pre-shot by a second virtual camera, wherein the angle between the first virtual camera and the second virtual camera is the same as the angle between the first screen and the second screen.
[0028] A third aspect of an embodiment of the present application provides a capsule toy machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in any one of the first aspects are implemented.
[0029] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0030] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application set a joystick device and a display device, and the display device includes a first screen and a second screen, and the angle between the first screen and the second screen is the same as the angle between the first virtual camera and the second virtual camera. When the joystick device is triggered, a gashapon instruction is sent to the display device. Based on the gashapon instruction triggered by the joystick, the display device causes the first screen to display the first gashapon image captured by the first virtual camera, and the second screen to display the second gashapon image captured by the second virtual camera, so that the display device displays the 3D effect of the virtual gashapon machine gashapon process, which can effectively meet the requirements of multiple viewers, and only requires two screens and a joystick device to complete, which is conducive to reducing the cost of the gashapon machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 Schematic diagram of a gashapon machine provided in an embodiment of the present application;
[0033] Figure 2 This is a schematic diagram of the implementation flow of a control method for a gashapon machine provided in an embodiment of the present application;
[0034] Figure 3 is a schematic diagram of determining an optimal viewpoint position provided by an embodiment of the present application;
[0035] Figure 4 1 is a schematic diagram of a control device for a gashapon machine provided in an embodiment of the present application;
[0036] Figure 5 This is a schematic diagram of a gashapon machine provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0038] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0039] Figure 1 This is a structural diagram of a gashapon machine provided in an embodiment of the present application. Figure 1 As shown, the capsule machine includes a display device 1 and a joystick device 2. The joystick device and the display device establish a communication connection via a wired or wireless method. The wireless communication connection may include a Bluetooth connection, a Wi-Fi network connection, or a mobile network connection.
[0040] The joystick device 2 is provided with a trigger button, which may include a touch button or a mechanical button. The mechanical button may be a push button or a rotary button. When the trigger button of the joystick device meets a preset trigger state, a gashapon instruction may be generated to control the display device to perform a gashapon operation.
[0041] After receiving the Gacha command, display device 1 executes the Gacha operation. The first screen plays the first Gacha image, and the second screen plays the second Gacha image. The first Gacha image is pre-captured using the first virtual camera, and the second Gacha image is pre-captured using the second virtual camera. The angle between the first and second virtual cameras is the same as the angle between the first and second screens, so that the Gacha images played on the first and second screens present a naked-eye 3D effect.
[0042] The first and second screens can be positioned higher to facilitate simultaneous viewing by multiple people. The first and second screens can be spliced together at a predetermined angle to form a custom-shaped screen. This splicing angle can be any angle between 0 and 360 degrees. In one possible implementation, users can simultaneously view the images displayed on both the first and second screens from the viewing position of the capsule toy machine.
[0043] Figure 2 This is a schematic diagram of the implementation flow of a control method for a gashapon machine provided in an embodiment of the present application. Figure 1 The gashapon machine shown, the method includes:
[0044] In S201, when the joystick device detects that it is triggered, it sends a gashapon instruction to the display device.
[0045] Specifically, when a button of the joystick device is triggered to a predetermined state, including when a touch button is touched, or a physical button is pressed or rotated to a predetermined position, the joystick device is detected to be triggered, and the joystick device can send a capsule instruction to the display device through a wired or wireless communication line, so that the display device plays the capsule animation.
[0046] The joystick device is not limited to a joystick-shaped device and may also include devices such as smart terminals. Once the smart terminal has downloaded a terminal application for the gashapon machine, registered and logged into the application, and obtained control authorization for the gashapon machine, the gashapon command can be triggered through the smart terminal and sent to the display device. The smart terminal may include a smartphone, tablet computer, or laptop computer.
[0047] The gashapon command can include a single-trigger command or a long-trigger command. When the joystick device detects a single-trigger command, the display device of the gashapon machine can be controlled to play a gashapon animation for a predetermined duration. When the joystick device detects a long-trigger command, the display device of the gashapon machine can be controlled to continue playing the gashapon animation until the long-trigger command is triggered.
[0048] In addition, the triggering method of the capsule machine in the embodiment of the present application may also include voice commands. Keywords for triggering commands may be pre-set. When the detected sound signal includes a predetermined keyword, the capsule command may be triggered to control the display device to play the capsule animation. Alternatively, in order to improve the convenience of control, the timbre characteristics of the user with control authority may be pre-set. When the sound signal is detected to include a predetermined keyword, and the timbre characteristics of the sound signal match the preset timbre characteristics, the capsule command may be triggered to control the display device to play the capsule animation.
[0049] Alternatively, in a possible implementation, a gashapon command can be triggered based on a user's gestures or body movements. For example, a portrait image of a person at a predetermined location can be captured, and based on the gesture information or body movement information in the portrait image, the captured gesture information or body movement information can be compared with preset gesture information or body movement information to determine the user's command, including starting a gashapon operation, stopping a gashapon operation, checking gashapon results, etc.
[0050] In S202 , based on the gashapon instruction, the first screen of the display device displays a first gashapon animation pre-photographed by a first virtual camera, and the second screen of the display device displays a second gashapon animation pre-photographed by a second virtual camera.
[0051] After receiving the gashapon animation command sent by the joystick device, the display device can play the first gashapon animation on the first screen and the second gashapon animation on the second screen, and the angle between the first screen and the second screen is the same as the angle between the first virtual camera shooting the first gashapon animation and the second virtual camera shooting the second gashapon animation, so that the gashapon animations played on the first screen and the second screen present a naked-eye 3D effect. When a user watches the gashapon animations on the first screen and the second screen, it feels like watching a real gashapon box being used to spin the gashapon.
[0052] In an embodiment of the present application, in order to further enhance the naked-eye 3D effect, the optimal viewpoint position in the actual scene can also be determined, and based on the determined optimal viewpoint position, the offset value of the first virtual camera and the second virtual camera can be determined, and the shooting picture of the virtual camera can be controlled based on the determined offset value, so as to obtain a better viewing effect at the optimal viewpoint position.
[0053] like Figure 3 FIG. 1 is a schematic diagram of an optimal viewpoint position provided by an embodiment of the present application. Figure 3 As shown, the optimal viewpoint can be any position in front of the screen. After determining the optimal viewpoint position, the shooting parameters of the virtual camera can be adjusted based on the optimal viewpoint position, so that a better viewing effect of the capsule screen can be obtained at the optimal viewpoint position.
[0054] like Figure 3 As shown, the optimal viewpoint position is the user's position A, and the height of the optimal viewpoint position is the height of the user's eyes, that is, when the user is in this position, he can stand and view a better Gachapon picture. In order to realize the function of the optimal viewpoint position, a perpendicular line can be drawn to the plane where the first screen is located based on the optimal viewpoint position to obtain the first distance lenghL between the perpendicular point A1 and the nearest edge of the first screen. Similarly, a perpendicular line can be drawn to the plane where the second screen is located based on the optimal viewpoint position to obtain the perpendicular point A2. The second distance lenghR between the perpendicular point A2 and the nearest edge of the second screen is obtained. The length of the first screen is lx and the width is ly, and the length of the second screen is rx and the width is ry. The intersection point A3 of the bottom line of the first screen and the second screen is arranged at a distance h1 from the ground, and the arrangement of the optimal viewpoint position from the ground is h2. Then, the vertical distance between the optimal viewpoint and the intersection point A3 is d=h1-h2.
[0055] After determining the above-mentioned screen size parameters and the optimal viewpoint position, the offset values of the first virtual camera and the second virtual camera can be determined based on the screen size parameters, the first distance, the second distance and the height of the optimal viewpoint position, thereby obtaining the first capsule animation and the second capsule animation that match the optimal viewpoint position.
[0056] In a possible implementation, the offset value of the first virtual camera can be expressed as:
[0057] x=(lx / 2+lenghL) / lx;
[0058] y=(ly / 2+d) / ly.
[0059] The offset value of the second virtual camera can be expressed as:
[0060] x=-(rx / 2+lenghR) / rx;
[0061] y=(ry / 2+d) / ry.
[0062] Among them, lx and ly are the length and width of the first screen respectively, rx and ry are the length and width of the second screen respectively, lenghL is the first distance between the optimal viewpoint position and the plane where the first screen is located, after obtaining the vertical point A2, the vertical point A2 is obtained by drawing a perpendicular line from the optimal viewpoint position to the plane where the second screen is located, and the vertical point A1 is obtained by drawing a perpendicular line from the optimal viewpoint position to the plane where the second screen is located, and the second distance between the vertical point A1 and the nearest edge of the second screen, d is the distance h1 from the intersection point A3 of the lower edges of the first and second screens and the ground, and the difference between it and the height h2 of the optimal viewpoint position, that is, d = h1-h2.
[0063] After obtaining the offset values of the first and second virtual cameras relative to the optimal viewpoint, the sizes of the first and second virtual cameras, i.e., the sizes of the captured images, are further determined. The size of the first virtual camera is the same as the size of the first screen, and the size of the second virtual camera is the same as the size of the second screen, so that the images captured by the first and second virtual cameras can be directly played on the first and second screens.
[0064] The shooting focal lengths of the first virtual camera and the second virtual camera can be the vertical distance between the optimal viewpoint and the plane where the screen is located. That is, the shooting focal length of the first virtual camera is the vertical distance between the optimal viewpoint and the plane where the first screen is located, and the shooting focal length of the second virtual camera is the vertical distance between the optimal viewpoint and the plane where the second screen is located.
[0065] According to the determined offset value, combined with the determined shooting focal length, and according to the angle between the first screen and the second screen, the shooting parameters of the angle between the first virtual camera and the second virtual camera are determined, and the first capsule animation and the second capsule animation are captured. The captured images are projected onto the corresponding first screen and second screen respectively, thereby obtaining screen images corresponding to the optimal viewpoint position.
[0066] In the embodiment of the present application, the setting of the optimal viewpoint position may be a default value or may be determined according to the actual scene content.
[0067] For example, the default value of the optimal viewpoint position can be a position on the angle bisector of the intersection angle between the first screen and the second screen, with a distance from the intersection line of the first screen and the second screen being a predetermined distance and a height being a predetermined average height.
[0068] In a possible implementation, the optimal viewpoint position can be dynamically adjusted based on the user's position in the actual scene. For example, an image at the scene position for viewing the first screen and the second screen can be captured by a camera, and the optimal viewpoint position can be determined based on the portrait information in the image.
[0069] For example, when the captured image only includes a single person portrait, the optimal viewpoint position can be directly determined based on the captured single person portrait, and the position of the eyes of the person portrait can be used as the optimal viewpoint position.
[0070] When the captured image includes multiple portraits, a user selection instruction may be received to specify a portrait to determine the optimal viewpoint position, for example, the optimal viewpoint position is determined based on the eye position of the specified portrait.
[0071] Alternatively, when the captured image includes multiple portraits, the gaze directions of the captured portraits can be identified, and the portrait with the gaze direction towards the screen can be selected, and the optimal viewpoint position can be determined based on the eye position of the portrait.
[0072] Alternatively, when the captured image includes multiple portraits, or multiple portraits in the captured image are all looking in the direction of the screen, the distribution density of the portrait information can be further obtained, and the optimal viewpoint position can be determined based on the distribution density. For example, based on the distribution density of the portrait information, the area with the highest distribution density can be determined, and the optimal viewpoint position can be determined based on the center point of this area. The height of this center point can be a preset height of the user's eyes.
[0073] In addition, in embodiments of the present application, when determining the optimal viewpoint position, a pre-set tracking target can be used to determine the optimal viewpoint position based on the tracking target. For example, a certain portrait can be pre-selected as the target portrait for the optimal viewpoint position. The optimal viewpoint position is updated in real time based on the position of the target portrait detected in the image.
[0074] In the embodiment of the present application, when the first screen and the second screen are triggered to play the gashapon animation, the animation of the gashapon result can be played through the first screen and the second screen after the animation of the gashapon operation is completed. The animation of the gashapon result can be randomly generated.
[0075] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0076] Figure 4 This is a schematic diagram of a control device for a gashapon machine provided in an embodiment of the present application. The gashapon machine includes a joystick device and a display device. The display device includes a special-shaped screen consisting of a first screen and a second screen. The device includes:
[0077] The instruction sending unit 401 is used for the joystick device to send a gashapon instruction to the display device when detecting that it is triggered;
[0078] The animation playback unit 402 is used to display the first capsule animation pre-shot by the first virtual camera on the first screen of the display device and the second capsule animation pre-shot by the second virtual camera on the second screen of the display device based on the capsule instruction, wherein the angle between the first virtual camera and the second virtual camera is the same as the angle between the first screen and the second screen.
[0079] Figure 4 The control device of the gashapon machine shown in FIG. Figure 2 This corresponds to the control method of the gashapon machine shown.
[0080] Figure 5 Schematic diagram of a capsule egg machine provided by an embodiment of the present application. Figure 5 As shown, the capsule toy machine 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a control program for the capsule toy machine. When the processor 50 executes the computer program 52, it implements the steps of the aforementioned capsule toy machine control method embodiments. Alternatively, when the processor 50 executes the computer program 52, it implements the functions of the various modules / units in the aforementioned device embodiments.
[0081] For example, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the gashapon machine 5.
[0082] The gashapon machine may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that Figure 5 This is only an example of the gashapon machine 5 and does not constitute a limitation of the gashapon machine 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the gashapon machine may also include input and output devices, network access devices, buses, etc.
[0083] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0084] The memory 51 can be an internal storage unit of the gashapon machine 5, such as a hard disk or memory of the gashapon machine 5. The memory 51 can also be an external storage device of the gashapon machine 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the gashapon machine 5. Furthermore, the memory 51 can also include both an internal storage unit of the gashapon machine 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the gashapon machine. The memory 51 can also be used to temporarily store data that has been output or is about to be output.
[0085] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0086] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0087] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0088] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0090] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0091] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0092] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for controlling a gashapon machine, characterized in that: The gashapon machine includes a joystick device and a display device, wherein the display device includes a special-shaped screen consisting of a first screen and a second screen, and the method includes: When the joystick device detects that it is triggered, it sends a gashapon instruction to the display device; Based on the gashapon instruction, the first screen of the display device displays a first gashapon animation pre-photographed by a first virtual camera, and the second screen of the display device displays a second gashapon animation pre-photographed by a second virtual camera, wherein an angle between the first virtual camera and the second virtual camera is the same as an angle between the first screen and the second screen; Before the first screen of the display device displays a first gashapon animation pre-photographed by a first virtual camera and the second screen of the display device displays a second gashapon animation pre-photographed by a second virtual camera, the method further comprises: Determine the best viewpoint location; Determining, based on the optimal viewpoint position, a first distance from a first perpendicular point of the optimal viewpoint position perpendicular to the plane where the first screen resides to a nearest edge of the first screen, and a second distance from a second perpendicular point of the optimal viewpoint position perpendicular to the plane where the second screen resides to a nearest edge of the second screen; Determining an offset value between the first virtual camera and the second virtual camera according to the first distance, the second distance, the height of the optimal viewpoint position, and parameters of the first screen and the second screen includes: According to: x = (lx / 2 + lenghL) / lx, y = (ly / 2 + d) / ly, determine the offset value of the first virtual camera; According to: x = -(rx / 2 + lenghR) / rx, y = (ry / 2 + d) / ry, determine the offset value of the second virtual camera; Among them, lx, ly are the length and width of the first screen respectively, rx, ry are the length and width of the second screen respectively, lenghL is the first distance, lenghR is the second distance, and d is the difference between the distance between the intersection of the lower edge of the first screen and the second screen and the ground and the height of the optimal viewpoint position.
2. The method according to claim 1, characterized in that Determine the best viewpoint location, including: acquiring an image of a scene location for viewing the first screen and the second screen; The optimal viewpoint position is determined according to the portrait information in the image.
3. The method according to claim 2, characterized in that Determining the optimal viewpoint position according to the portrait information in the image includes: Obtaining the distribution density of portrait information in the image; According to the distribution density of the portrait information, the center point of the area with the maximum distribution density is determined to determine the optimal viewpoint position.
4. The method according to claim 1, wherein The included angle between the first screen and the second screen is any angle greater than 0 degrees and less than 360 degrees.
5. A control device for a gashapon machine, characterized in that: The gashapon machine includes a rocker device and a display device, wherein the display device includes a special-shaped screen consisting of a first screen and a second screen, and the device includes: An instruction sending unit, configured for the joystick device to send a gashapon instruction to the display device when detecting that it is triggered; an animation playback unit, configured to, based on the gashapon instruction, cause the first screen of the display device to display a first gashapon animation pre-photographed by a first virtual camera, and the second screen of the display device to display a second gashapon animation pre-photographed by a second virtual camera, wherein an angle between the first virtual camera and the second virtual camera is the same as an angle between the first screen and the second screen; The device is also used to determine the best viewpoint position; based on the best viewpoint position, determine a first distance from a first perpendicular point of the best viewpoint position perpendicular to the plane where the first screen is located to the nearest edge of the first screen, and a second distance from a second perpendicular point of the best viewpoint position perpendicular to the plane where the second screen is located to the nearest edge of the second screen; based on the first distance and the second distance, combined with the height of the best viewpoint position and parameters of the first screen and the second screen, determine the offset values of the first virtual camera and the second virtual camera, including: determining the offset value of the first virtual camera according to: x = (lx / 2 + lenghL) / lx, y = (ly / 2 + d) / ly; determining the offset value of the second virtual camera according to: x = - (rx / 2 + lenghR) / rx, y = (ry / 2 + d) / ry; wherein lx, ly are the length and width of the first screen respectively, rx, ry are the length and width of the second screen respectively, lenghL is the first distance, lenghR is the second distance, and d is the difference between the distance between the intersection of the lower edges of the first screen and the second screen and the ground and the height of the best viewpoint position.
6. A gashapon machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image display method and device, computer system and computer readable storage medium
CN111766951A
Doll clamping machine with turn round egg machine
CN208229372U