Image processing method and device, electronic equipment and storage medium
By obtaining the information on the change of the status of the entertainment equipment, obtaining video clips in the mid-air state of the prize and enhancing the image, the problem of high computing power cost in the prior art is solved, and efficient image processing and resource utilization are achieved.
Patent Information
- Application Number
- CN202411268600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, image processing requires a lot of computing power costs, resulting in higher consumption of computing resources and computing power costs.
By obtaining the status change information of the entertainment equipment's trolley during the recording period, we can judge whether the prize is clamped and fallen, and obtain a video clip with the prize in mid-air state, and perform several picture frames in the video clip Image enhancement.
It reduces the consumption of computing resources and computing power costs, improves image processing efficiency and resource utilization, and ensures the video clip processing effect at critical moments.
Smart Images

Figure CN119399807A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, some prize machines are equipped with cameras, which record videos through the start-up signal of the prize machine, so as to obtain the video information of users playing the equipment. However, since the cameras of such devices need to be synchronized with the network, the video quality is limited. At the same time, the camera is usually placed inside, and when shooting users, they need to pass through the transparent prize cabin, which will be affected by light and shadow. In addition, since the prize machine crane will generate certain vibrations during movement, the shooting effect is worse in a single frame.
[0003] Although single-frame images can be improved through image enhancement models and other methods, processing all images requires a lot of computing power. Summary of the invention
[0004] The present invention provides an image processing method, device, electronic device and storage medium, which are used to solve the defect of high computing power cost required for image processing in the prior art, reduce the consumption of computing resources and computing power cost, and improve image processing efficiency and resource utilization.
[0005] The present invention provides an image processing method, comprising the following steps: Acquiring information on state changes of a crane of an entertainment device during video recording; the entertainment device is a device that obtains prizes by controlling the crane, and the video is taken by a camera disposed in a gift compartment of the device toward a user side; If it is determined based on the state change information that the prize in the entertainment device is picked up, and it is determined based on the state change information that the prize does not block the user's face when it falls, then a video clip corresponding to the prize being in a mid-air state is obtained; Image enhancement is performed on a plurality of picture frames in the video clip.
[0006] According to an image processing method provided by the present invention, the state change information of the overhead crane during recording includes the clamping state of the clamping claws; determining that the prize in the entertainment device is clamped based on the state change information includes: Detecting the current state of the clamping jaw and acquiring the detection value of a sensor installed on the clamping jaw; Determining a clamping state of the clamping jaw according to a current state of the clamping jaw or a detection value of the sensor; In the case where the clamping state of the clamping claws is the closed state, it is determined that the prize in the entertainment device is clamped.
[0007] According to an image processing method provided by the present invention, the state change information of the overhead crane during the video recording also includes the moving position of the overhead crane; and determining based on the state change information that the prize does not block the user's face when it falls, comprises: Obtaining a release time point when the clamp releases the prize; If the position of the overhead travelling vehicle at the release time point is not within the shielding area, it is determined that the prize does not shield the user's face when it falls.
[0008] According to an image processing method provided by the present invention, the occluded area is determined based on the following method: Determine the probability that the user's face appears in multiple areas around the entertainment device; Selecting at least one target area whose probability is greater than a set threshold from the multiple areas; The blocked area is determined according to the target area, the installation position of the camera and the shooting direction of the camera.
[0009] According to an image processing method provided by the present invention, the step of obtaining a video clip corresponding to the prize being in a mid-air state includes: According to the release time point, determining the time interval corresponding to when the prize is in a half-empty state; The video clip corresponding to the time interval is intercepted from the original video clip to obtain the video clip corresponding to the prize being in a mid-air state; wherein the original video clip is a video clip shot from the start of the entertainment device to the end of the game.
[0010] According to an image processing method provided by the present invention, the image enhancement of a plurality of picture frames in the video clip comprises: Identifying a face region in the video clip, and extracting a plurality of picture frames from the face region; Each picture frame is subjected to separate image enhancement, or multiple continuous picture frames are subjected to image enhancement.
[0011] According to an image processing method provided by the present invention, the step of extracting a plurality of picture frames from the face region comprises: Acquiring information about changes in the user's facial expressions during the prize release process; A plurality of picture frames are extracted from the face area according to the facial expression change information.
[0012] The present invention also provides an image processing device, comprising the following modules: The first acquisition module is used to acquire the state change information of the overhead crane of the entertainment device during the video recording; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the video is taken by a camera set in the gift compartment of the device toward the user side; A second acquisition module is used to acquire a video clip corresponding to a state in which the prize is in mid-air if it is determined based on the state change information that the prize in the entertainment device is picked up and it is determined based on the state change information that the prize does not block the user's face when falling; The image enhancement module is used to perform image enhancement on the user's face area in the video clip.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned image processing methods when executing the computer program.
[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the image processing method described above is implemented.
[0015] The image processing method, device, electronic device and storage medium provided by the present invention obtain the state change information of the overhead crane of the entertainment device during the recording period; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the recording is taken by a camera set in the gift cabin of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not block the user's face when it falls, then the video clip corresponding to the prize in the mid-air state is obtained; and image enhancement is performed on several frames in the video clip. The present invention reduces the consumption of computing resources and computing power costs by performing image enhancement processing on the video clip at the critical moment (i.e., the moment when the prize falls), and at the same time, improves the image processing efficiency and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flowchart of the image processing method provided by the present invention.
[0018] Figure 2 It is a top projection schematic diagram of the prize cabin provided by the present invention.
[0019] Figure 3 It is a structural schematic diagram of the image processing device provided by the present invention.
[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] It should be noted that all actions of acquiring signals, information or data in the present invention are performed in compliance with the corresponding data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0023] Combine the following Figure 1-Figure 4 The image processing method, device, electronic device and storage medium of the present invention are described.
[0024] Figure 1 It is a flowchart of the image processing method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101, obtaining information on state changes of the overhead traveling device of the entertainment device during recording.
[0025] In the embodiment of the present invention, the entertainment device is a device for obtaining prizes by controlling an overhead crane, and the video is taken by a camera set in the gift compartment of the device toward the user. For example, the entertainment device may be a prize machine, a gashapon machine, a candy grabbing machine, or an object grabbing machine, etc. These devices are usually equipped with a gripper or a gripping device, and players can try to grab prizes, gashapon, candy, or other items by operating the gripper.
[0026] The crane refers to the mechanical part of the entertainment device used to grab prizes, including the gripper and the part above the gripper. The crane is responsible for moving the gripper in the horizontal or vertical direction inside the machine. The entertainment device is equipped with a camera to monitor the game process in real time and record the player's operation and the status of the device. The camera starts recording when the user starts the device and stops recording when the device game ends. For example, when the user starts the device (such as inserting a coin or pressing the start button), the camera starts recording video; when the game ends (such as the gripper completes grabbing or the user stops operating), the camera stops recording video.
[0027] After the camera starts recording, the state change information of the overhead crane of the entertainment equipment during the recording is obtained, wherein the state change information of the overhead crane refers to all actions and state changes that occur during the operation of the overhead crane, such as the gripping, placement, and holding states of the gripper, and the movement position changes of the overhead crane, etc. These state changes can help determine whether the gripper successfully grips the toy, and the behavior of the toy during the falling process.
[0028] For the clamping state of the clamp, the clamping state of the clamp can be analyzed by image processing technology using the video image captured by the camera; or the clamping state of the clamp can be determined by detecting the current state of the clamp; or the clamping state of the clamp can be determined by sensors installed on the clamp (such as occlusion sensors, pressure sensors, etc.). For the moving position of the overhead crane, the moving trajectory of the overhead crane can be tracked by image processing technology using the video image captured by the camera; or encoders can be installed on the moving parts of the overhead crane to record the horizontal and vertical movement of the overhead crane in real time; or the position data can be obtained from the control system of the overhead crane, which usually records the movement commands and feedback information, and these data can be extracted from the system.
[0029] Step 102: If it is determined based on the state change information that the prize in the entertainment device is picked up, and it is determined based on the state change information that the prize does not block the user's face when it falls, then obtain a video clip corresponding to the prize being in the mid-air state.
[0030] After obtaining the state change information of the overhead crane during the recording, it is determined whether the prize in the entertainment device is clamped and whether the prize blocks the user's face when it falls. If the prize is clamped and does not block the user's face when it falls, it means that the prize and the user's facial features can be completely and clearly recorded during the falling process, and the subsequent image enhancement processing can better enhance the details of the user's facial features and the prize.
[0031] Further obtain the video clip corresponding to the prize being in the half-empty state. In one embodiment, obtain the release time point of the prize, and then determine the time interval corresponding to the prize being in the half-empty state according to the release time point, and extract the video clip corresponding to the time interval from the original video clip to obtain the video clip corresponding to the prize being in the half-empty state; wherein the original video clip is a video clip shot from the start of the entertainment device to the end of the game.
[0032] For example, the release time point (such as 2 minutes and 10 seconds) and landing time point of the prize are determined from sensor data or video analysis, and then the time interval between the release time point and the landing time point of the prize is calculated, which is the time interval of the prize in mid-air. Assume that the video length of the original video clip is 5 minutes (300 seconds); by analyzing the video, it is found that the prize is released by the gripper at the 120th second of the video, which is the moment when the gripper begins to loosen and the prize begins to fall; continue to analyze the video and find that the prize touches the bottom of the device at the 130th second of the video and completes the landing; from the release time point (120th second) to the landing time point (130th second), the time interval of the prize in mid-air is 10 seconds; use video editing software or tools to cut the video clip between the 120th second and the 130th second from the original video clip.
[0033] The embodiment of the present invention automatically identifies and captures key video clips by detecting the clamping state of the clamp and the moving position of the overhead crane. This automated process reduces manual intervention and improves processing efficiency and accuracy. At the same time, by judging whether the prize blocks the user's face, it ensures that image enhancement is performed when the picture is clear and without occlusion, avoiding image processing failure due to occlusion and improving the accuracy of the processing results.
[0034] Step 103: performing image enhancement on a plurality of frames in the video clip.
[0035] After extracting the video clip corresponding to the time interval from the original video clip, several frames in the video clip are enhanced. It can be understood that the purpose of image enhancement is to improve the visual effect of the image and make the image clearer. For example, the following method can be used to enhance the image of several frames in the video clip: Denoising: remove noise from the image to improve the clarity of the picture; Sharpening: Enhance the edges and details of the image to make it clearer; Contrast adjustment: increase the contrast of the image to make the picture more layered; Brightness adjustment: optimize the brightness of the image and improve the visual effect; Color enhancement: adjust color saturation and hue to make the image colors more vivid; Super-resolution: Improve the resolution of images, enhance details and clarity; Image Smoothing: Reduces texture and noise in the image, making it softer.
[0036] The image processing method provided by the embodiment of the present invention obtains the state change information of the overhead crane of the entertainment device during the recording period; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the recording is taken by a camera set in the gift compartment of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not block the user's face when it falls, then a video clip corresponding to the prize being in the mid-air state is obtained; and image enhancement is performed on several frames in the video clip. The present invention reduces the consumption of computing resources and computing power costs by performing image enhancement processing on the video clips at the critical moment (i.e., the moment when the prize falls), and at the same time, improves the image processing efficiency and resource utilization.
[0037] Based on the above embodiment, determining that a prize in the entertainment device is clamped based on the state change information includes: Step 1020, detecting the current state of the clamping jaw, and obtaining the detection value of the sensor installed in the clamping jaw; Step 1021, determining the clamping state of the clamping jaw according to the current state of the clamping jaw or the detection value of the sensor; Step 1022, when the clamping state of the clamping claw is in the closed state, determine that the prize in the entertainment device is clamped.
[0038] In an embodiment of the present invention, a current sensor is installed in the power supply circuit of the motor or electromagnet of the clamp, wherein the current sensor can be a Hall effect sensor, a shunt resistor or other types of current measuring devices. The current intensity is measured in real time by the current sensor and converted into a voltage signal or a digital signal. The change in the current value can reflect whether the clamp has clamped the prize. When the clamp clamps the prize, the load of the motor or electromagnet increases, and the current value will rise. This is because clamping the prize will increase the mechanical load of the clamp, thereby requiring more current to drive the clamp. The signal of the current sensor is read by a microcontroller or a data acquisition system to monitor the change in the current value in real time. At the same time, a threshold is set to distinguish whether the clamp is in a clamping state. For example, if the current value exceeds a certain value, it is determined that the clamp has clamped the prize; if the current value is lower than the current value, it is determined that the clamp has not clamped the prize.
[0039] The sensor installed on the clamp is used to detect whether the clamp is holding the prize, wherein the sensor can be: (1) Pressure sensor: The pressure sensor installed in the gripper can measure the pressure applied by the gripper on the prize. When the prize is clamped, the pressure sensor will detect a certain pressure value, thereby confirming the gripping state of the gripper.
[0040] (2) Proximity sensor: used to detect the distance or proximity between the gripper and the prize. The proximity sensor can be an inductive proximity sensor or a capacitive proximity sensor. When the prize is gripped, the reading of the proximity sensor will change.
[0041] (3) Photoelectric sensor: Photoelectric sensor detects the presence of the prize by emitting and receiving light beams. When the prize is clamped, the reflection or obstruction of the light beam changes, thereby detecting the clamping state.
[0042] (4) Displacement sensor: used to measure the movement and position of the gripper jaws. The displacement sensor can help confirm whether the gripper jaws are fully closed to hold the prize.
[0043] Further, the clamping state of the clamping jaws is determined according to the current state of the clamping jaws or the detection value of the sensor, wherein the clamping state includes a closed state and an open state, wherein the closed state indicates that the clamping jaws are closed and clamp an object, and the open state indicates that the clamping jaws are in an open state and do not clamp an object. Therefore, when the clamping state of the clamping jaws is a closed state, it is determined that the prize in the entertainment device is clamped.
[0044] The embodiment of the present invention can accurately determine whether the clamping jaw is in a closed state by detecting the current state of the clamping jaw or the detection value of the sensor, thereby confirming whether the object is clamped successfully.
[0045] Based on the above embodiment, determining that the prize does not block the user's face when it falls based on the state change information includes: Step 1023, obtaining the release time point when the clamp releases the prize; Step 1024: If the position of the overhead travelling vehicle at the release time point is not within the shielding area, it is determined that the prize does not shield the user's face when it falls.
[0046] In the embodiment of the present invention, the release time point of the prize refers to the moment when the prize is released from the clamp and starts to fall freely. At this moment, the clamp no longer applies any force to the prize, and the prize completely enters a free state of falling. The release time point when the clamp releases the prize can be obtained by the following method: (1) The entertainment device is equipped with a gripper sensor that can record the gripper's movements. When the gripper releases the prize, the sensor generates a signal, and the timestamp of the signal is used as the release time.
[0047] (2) Detect the moment when the gripper starts to release the prize by analyzing the gripper’s action in the video. For example, computer vision technology can be used to identify the opening and closing state of the gripper to determine the release moment.
[0048] (3) The control system of the entertainment device will record the time of the operation instruction. By obtaining the timestamp of the gripper release instruction, the release time of the prize can be determined.
[0049] (4) When the gripper releases the prize, the device triggers an event or records a log. By monitoring these events, the exact release time can be obtained.
[0050] Through video analysis, the position of the overhead crane at the release time is determined, and further judged whether the position is within the set blocking area. If not, it means that the prize does not block the user's face when it falls.
[0051] For example, obtain the time (T_release) when the crane releases the prize, obtain the position (X_release, Y_release, Z_release) of the crane at time T_release, and convert the position (X_release, Y_release, Z_release) of the crane into the camera view coordinate system (X_camera, Y_camera, Z_camera). Then compare it with the occlusion area coordinate range, for example, the occlusion area coordinate range: X_min<=X_camera<=X_max and Y_min<=Y_camera<=Y_max. Judgment: If X_camera and Y_camera are within the occlusion area coordinate range, it is determined that the released prize may block the user's face. Otherwise, it is determined that the released prize will not block the user's face.
[0052] By combining the actual working status of the device and the situation where the user's face may be blocked, it is ensured that the final generated image can meet the user's needs for commemorative preservation.
[0053] In one embodiment, the occlusion area is determined by: determining the probability that the user's face appears in multiple areas around the entertainment device; selecting at least one target area with a probability greater than a set threshold from the multiple areas; and determining the occlusion area based on the target area, the installation position of the camera, and the shooting direction of the camera.
[0054] For example, by analyzing the usage of entertainment equipment and the user's behavior pattern, the possible location of the user's face is determined, for example, the front and middle areas of the entertainment equipment are the most likely places for the user to appear. Alternatively, data is collected or experiments are conducted to determine the location where the user's face often appears. For example, when the user operates the device, it is usually in a certain area in front of the device. Then, from the multiple areas where the user's face may appear, the areas with a probability of appearance greater than a set threshold are selected. These areas are considered to be the most likely places for the user's face to appear. Among them, the threshold can be 90%, which is used to select high-probability areas (i.e., target areas). The actual occlusion area is further determined based on the target area, the installation location of the camera (such as the top or side of the device), and the shooting direction (such as the area facing the user). For example, the intersection of the possible location of the user's face and the camera's view angle is calculated to obtain an accurate occlusion area. Alternatively, a model is created to represent the area within the camera's field of view, including the possible location of the user's face, and then the area with a high probability of the user's face appearing is mapped to the camera's field of view coordinate system based on the relative position of the camera's view angle and the device's front screen, thereby calibrating the coordinate range of the occlusion area.
[0055] Assuming that through observation and analysis, it is found that the probability of the user's face appearing in the middle area in front of the device is 85%, and the threshold is 70%, the middle area is selected as the high-probability area. If the camera is installed on the top of the device, the shooting direction is downward; combined with the camera's viewing angle, it is determined that the middle area is within the camera's viewing angle. Through calculation and adjustment, it is determined that the blocked area is the front middle area within the camera's viewing angle.
[0056] By judging whether the prize blocks the user's face when it falls, the embodiment of the present invention can avoid enhancing the image that blocks the user's face, save image processing and computing resources, and thus improve image processing efficiency.
[0057] Based on the above embodiment, the step of performing image enhancement on a plurality of picture frames in the video clip includes: Step 1030, identifying a face region in the video clip, and extracting a plurality of picture frames from the face region; Step 1031: Perform image enhancement on each frame of the picture individually, or perform image enhancement on multiple consecutive picture frames.
[0058] After extracting the video clip corresponding to the time interval from the original video clip, the face area in the video clip is identified. At the same time, the user's facial expression change information during the prize release process is obtained, and then a number of picture frames are extracted from the face area based on the facial expression change information; finally, each picture frame is individually enhanced, or multiple continuous picture frames are enhanced.
[0059] For example, a face detection algorithm is used to locate the face area in the video, and facial expression recognition technology is used to analyze the changes in the user's expression. For example, changes in smile, surprise or other emotional states can be detected. Multiple key frames are selected from the video, which can represent important moments of the user in the prize release process, where the key frame selection is based on the changes in the user's facial expression to ensure that meaningful moments are captured. Finally, image enhancement technology is applied to each frame of the image, such as adjusting brightness, contrast, sharpness, etc., to improve the image quality and make the facial expressions in each frame clearer. Another method is to process several consecutive frames together, using video enhancement technology such as temporal filtering or inter-frame interpolation to create a smoother and more natural enhancement effect.
[0060] By identifying the facial area, the embodiment of the present invention can ensure that the image enhancement focuses on the user's facial expression and improve the processing accuracy; process each frame separately or enhance continuous frames to improve the clarity and visual effect of the image and make the user's expression more vivid; continuous frame enhancement can ensure the smooth transition of the video and reduce the jumping feeling between pictures. Through the above processing method, the user's expression in the video will be displayed more clearly, enhancing the visual effect and viewing experience.
[0061] In order to further analyze and explain the image processing method proposed in the present invention, refer to Figure 2 And the following examples.
[0062] The goal of the embodiment of the present invention is to output a picture of the moment when the prize falls after the user grabs the prize, and to enhance the picture so that the quality and composition of the picture can meet the needs of the user to keep a commemorative picture. The composition captured by the embodiment of the present invention is the expression of the user when the prize falls. It is understandable that regardless of whether the prize eventually falls out, the user's expression will change to excitement, surprise or disappointment during the prize falling process. At this time, the user's expression and the state of the prize in mid-air will form a picture that attracts the user to keep. This image can be used as a cover picture of the entire video process, or it can be retained by the user alone.
[0063] The video processing method provided by the embodiment of the present invention mainly includes the following contents: Get the video footage taken during the device startup process. The camera starts when the user starts the device and ends when the device ends the game. Get the state change of the device's overhead crane during the recording, which includes the clamping state of the gripper and the moving position of the overhead crane. According to the gripping state of the gripper, determine whether the device has ever clamped the prize during this startup; if it is determined that the prize has been clamped, determine the time when the gripper releases the prize, and determine whether the released prize obscures the user's face based on the release time and the position information of the overhead crane at the time of release. Pre-calibrate the occlusion coordinate range in the overhead crane trajectory. When the prize is released, if the position of the overhead crane is in the occlusion area, it is determined that occlusion will occur when the prize falls. The coordinate range of the occlusion area is calibrated based on the area where the user's face is most likely to appear (the middle of the front barrier of the device), the installation position of the camera, and the shooting direction. Such as Figure 2 As shown. It is understandable that when the face is blocked, the given task cannot be completed, so the enhanced image is not output. When the face is not blocked, the time interval corresponding to the time segment when the prize is in the mid-air state is estimated based on the release time, and the segment of this interval is intercepted from the complete video; based on the picture of the segment time interval, the user's face area is enhanced. For example, a third-party image enhancement model is used to improve the picture quality. The third-party image model includes an enhancement model based on a single picture frame and a model based on multiple continuous picture frames.
[0064] The embodiment of the present invention processes key frames through an image enhancement model, which can significantly improve the clarity and visual effect of the picture at the moment the prize drops, making the final picture more emotionally valuable and commemorative, and improving the user experience; in addition, image enhancement processing is only performed on the video clip at the key moment (i.e., the moment the prize drops) instead of processing the entire video, which can greatly reduce the consumption of computing resources and time.
[0065] The image processing device provided by the present invention is described below. The image processing device described below and the image processing method described above can be referred to each other.
[0066] refer to Figure 3 The image processing device provided by the present invention includes a first acquisition module 301, a second acquisition module 302 and an image enhancement module 303.
[0067] The first acquisition module 301 is used to acquire the state change information of the overhead crane of the entertainment device during the video recording; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the video is taken by a camera set in the gift compartment of the device toward the user side; A second acquisition module 302 is configured to acquire a video clip corresponding to a state in which the prize is in mid-air if it is determined based on the state change information that the prize in the entertainment device is picked up and it is determined based on the state change information that the prize does not block the user's face when falling; The image enhancement module 303 is used to perform image enhancement on the user's face area in the video clip.
[0068] The image processing device provided by the embodiment of the present invention obtains the state change information of the overhead crane of the entertainment device during the video recording; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the video recording is taken by a camera set in the gift compartment of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not block the user's face when it falls, then the video clip corresponding to the prize in the mid-air state is obtained; and image enhancement is performed on several frames in the video clip. The present invention reduces the consumption of computing resources and computing power costs by performing image enhancement processing on the video clip at the critical moment (i.e., the moment when the prize falls), and at the same time, improves the image processing efficiency and resource utilization.
[0069] In one embodiment, the state change information of the overhead crane during the video recording includes the clamping state of the clamping claw; the second acquisition module 302 is further used for; Determining a clamping state of the clamping jaw according to a current state of the clamping jaw or a detection value of the sensor; In the case where the clamping state of the clamping claws is the closed state, it is determined that the prize in the entertainment device is clamped.
[0070] In one embodiment, the state change information of the overhead crane during the video recording also includes the moving position of the overhead crane; the second acquisition module 302 is further used to: Obtaining a release time point when the clamp releases the prize; If the position of the overhead travelling vehicle at the release time point is not within the shielding area, it is determined that the prize does not shield the user's face when it falls.
[0071] In one embodiment, the occlusion area is determined based on the following method: Determine the probability that the user's face appears in multiple areas around the entertainment device; Selecting at least one target area whose probability is greater than a set threshold from the multiple areas; The blocked area is determined according to the target area, the installation position of the camera and the shooting direction of the camera.
[0072] In one embodiment, the second acquisition module 302 is further configured to: According to the release time point, determining the time interval corresponding to when the prize is in a half-empty state; The video clip corresponding to the time interval is intercepted from the original video clip to obtain the video clip corresponding to the prize being in a mid-air state; wherein the original video clip is a video clip shot from the start of the entertainment device to the end of the game.
[0073] In one embodiment, the image enhancement module 303 is specifically configured to: Identifying a face region in the video clip, and extracting a plurality of picture frames from the face region; Each picture frame is subjected to separate image enhancement, or multiple continuous picture frames are subjected to image enhancement.
[0074] In one embodiment, the image enhancement module 303 is specifically configured to: Acquiring information about changes in the user's facial expressions during the prize release process; A plurality of picture frames are extracted from the face area according to the facial expression change information.
[0075] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the image processing method, which includes: obtaining the state change information of the overhead crane of the entertainment device during the video recording; the entertainment device is a device for obtaining prizes by controlling the overhead crane, and the video recording is taken by a camera arranged in the gift compartment of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not cover the user's face when it falls, then obtaining the video clip corresponding to the prize being in the mid-air state; and performing image enhancement on several frames in the video clip.
[0076] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0077] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image processing methods provided by the above-mentioned methods, which include: obtaining state change information of a crane of an entertainment device during recording; the entertainment device is a device that obtains prizes by controlling the crane, and the recording is taken by a camera set in a gift compartment of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not block the user's face when it falls, then obtaining a video clip corresponding to the prize in a mid-air state; and performing image enhancement on several frames in the video clip.
[0078] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the image processing methods provided by the above-mentioned methods, the methods comprising: obtaining state change information of an overhead crane of an entertainment device during recording; the entertainment device is a device that obtains prizes by controlling the overhead crane, and the recording is taken by a camera arranged in a gift compartment of the device toward the user side; if it is determined based on the state change information that the prize in the entertainment device is clamped, and it is determined based on the state change information that the prize does not block the user's face when it falls, then obtaining a video clip corresponding to the prize being in a mid-air state; and performing image enhancement on several frames in the video clip.
[0079] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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. However, 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 embodiments of the present invention.
Claims
1. An image processing method, characterized in that: include: Obtain information about the state changes of the overhead crane of the entertainment equipment during the recording period; The entertainment device is a device that obtains prizes by controlling an overhead crane, and the video is shot by a camera installed in a gift compartment of the device facing the user side; If it is determined based on the state change information that the prize in the entertainment device is picked up, and it is determined based on the state change information that the prize does not block the user's face when it falls, then a video clip corresponding to the prize being in a mid-air state is obtained; Image enhancement is performed on a plurality of picture frames in the video clip.
2. The image processing method according to claim 1, characterized in that: The state change information of the overhead crane during the video recording includes the clamping state of the clamping claws; Determining that a prize in the entertainment device is clamped based on the state change information includes: Detecting the current state of the clamping jaw and acquiring the detection value of a sensor installed on the clamping jaw; Determining a clamping state of the clamping jaw according to a current state of the clamping jaw or a detection value of the sensor; In the case where the clamping state of the clamping claws is the closed state, it is determined that the prize in the entertainment device is clamped.
3. The image processing method according to claim 2, characterized in that: The state change information of the overhead crane during the video recording also includes the moving position of the overhead crane; Determining based on the state change information that the prize does not block the user's face when it falls includes: Obtaining a release time point when the clamp releases the prize; If the position of the overhead travelling vehicle at the release time point is not within the shielding area, it is determined that the prize does not shield the user's face when it falls.
4. The image processing method according to claim 3, characterized in that: The occlusion area is determined based on the following method: Determine the probability that the user's face appears in multiple areas around the entertainment device; Selecting at least one target area whose probability is greater than a set threshold from the multiple areas; The blocked area is determined according to the target area, the installation position of the camera and the shooting direction of the camera.
5. The image processing method according to claim 3, characterized in that: The step of obtaining a video clip corresponding to the prize being in a mid-air state includes: According to the release time point, determining the time interval corresponding to when the prize is in a half-empty state; The video clip corresponding to the time interval is intercepted from the original video clip to obtain the video clip corresponding to the prize being in a mid-air state; wherein the original video clip is a video clip shot from the start of the entertainment device to the end of the game.
6. The image processing method according to claim 1, characterized in that: The performing image enhancement on a plurality of picture frames in the video clip comprises: Identifying a face region in the video clip, and extracting a plurality of picture frames from the face region; Each picture frame is subjected to separate image enhancement, or multiple continuous picture frames are subjected to image enhancement.
7. The image processing method according to claim 6, characterized in that: The step of extracting a plurality of picture frames from the face region comprises: Acquiring information about changes in the user's facial expressions during the prize release process; A plurality of picture frames are extracted from the face area according to the facial expression change information.
8. An image processing device, characterized in that: include: A first acquisition module is used to acquire the state change information of the overhead traveling device of the entertainment device during the recording period; The entertainment device is a device that obtains prizes by controlling an overhead crane, and the video is shot by a camera installed in a gift compartment of the device facing the user side; A second acquisition module is used to acquire a video clip corresponding to a state in which the prize is in mid-air if it is determined based on the state change information that the prize in the entertainment device is picked up and it is determined based on the state change information that the prize does not block the user's face when falling; The image enhancement module is used to perform image enhancement on the user's face area in the video clip.
9. An electronic device 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 image processing method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 7 is implemented.