A method and system for raster image processing
Patent Information
- Application Number
- CN202611169332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]然而,现有光栅动画在视角切换时存在跳帧、卡顿以及动态过渡不自然的问题
Smart Images

Figure CN122989972A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of raster image processing, and in particular to a raster image processing method and system. Background Technology
[0002] Raster graphics motion image generation is an important research direction at the intersection of raster printing and computer graphics. Its goal is to generate a sequence of frames with continuous micro-dynamic effects from a given static image. After pixel interleaving, these frames are printed behind a raster plate, allowing the observer to see a dynamically changing image from different perspectives. With the development of Web graphics technology and parametric design, this field has evolved from manual drawing to automatic algorithmic generation.
[0003] However, existing raster animation suffers from frame skipping, stuttering, and unnatural dynamic transitions when switching perspectives. Summary of the Invention
[0004] This specification provides one or more embodiments of a raster image processing method. The raster image processing method includes: acquiring a reference image; determining target sampling points based on the reference image, each target sampling point including feature information of one or more consecutive pixels in the reference image; determining attribute parameters for each target sampling point; obtaining rendering parameters for each frame in a sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point, wherein the attribute parameters represent the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence of frames; and rendering each target sampling point according to the rendering parameters corresponding to each frame, generating each frame in the sequence of frames.
[0005] In some embodiments, determining the target sampling point based on the reference image includes: sampling the reference image to generate a discrete point array, each sampling point in the discrete point array including feature information of one or more consecutive pixels in the reference image; and determining the target sampling point from the discrete point array.
[0006] In some embodiments, determining the target sampling point from the discrete point array includes: determining the brightness value of each sampling point in the discrete point array based on feature information of the one or more consecutive pixels; and determining the sampling point whose brightness value satisfies a first condition as a first sampling point, wherein the target sampling point includes the first sampling point.
[0007] In some embodiments, determining the target sampling point from the discrete point array includes: dividing the reference image into multiple regions; calculating the average brightness of each region within the multiple regions; determining the density of sampling points within each region based on the average brightness of each region; and determining sampling points within each region from the discrete point array based on the density as second sampling points, wherein the target sampling point includes the second sampling point.
[0008] In some embodiments, determining the target sampling point from the discrete point array includes: determining the channel value of each sampling point in the discrete point array on the target color channel based on the feature information of the one or more consecutive pixels; and determining the sampling point whose channel value satisfies a second condition as a third sampling point, wherein the target sampling point includes the third sampling point.
[0009] In some embodiments, the attribute parameters include frequency parameters and initial phase parameters; determining the attribute parameters for each target sampling point includes: for each target sampling point, randomly selecting a value in a frequency range of 1Hz to 5Hz according to a uniform distribution as the frequency parameter of the target sampling point; for each target sampling point, randomly selecting a value in a phase range of 0-2π according to a uniform distribution as the initial phase parameter of the target sampling point; wherein, the frequency parameters and initial phase parameters of different target sampling points are independent of each other and uncorrelated.
[0010] In some embodiments, obtaining the rendering parameters of each frame in the sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point includes: determining the time information corresponding to each frame in the sequence of frames; and determining the rendering parameters of each frame corresponding to each target sampling point based on the time information and the attribute parameters, wherein the rendering parameters include at least one of rendering radius, transparency, and glow intensity.
[0011] In some embodiments, determining the rendering radius of each target sampling point for each frame based on the time information and the attribute parameters includes: determining the maximum and minimum rendering radius of each target sampling point; and determining the rendering radius of each target sampling point for each frame based on the maximum rendering radius, the minimum rendering radius, the time information, and the attribute parameters.
[0012] In some embodiments, determining the rendering radius of each target sampling point corresponding to each frame based on the time information and the attribute parameters includes: obtaining a rendering parameter determination model, wherein the rendering parameter determination model represents the mapping relationship between the time information, the attribute parameters and the rendering radius; and determining the rendering parameters using the rendering parameter determination model based on the time information and the attribute parameters.
[0013] In some embodiments, the rendering parameter determination model is constructed based on a continuous periodic function, wherein the time information and the attribute parameters in the continuous periodic function are independent variables, and the rendering parameters are dependent variables.
[0014] In some embodiments, the continuous periodic function is a sine function, a cosine function, a trigonometric function, or Berlin noise.
[0015] In some embodiments, the rendering radius is smaller than the step size for sampling the reference image.
[0016] In some embodiments, the rendering radius is greater than the minimum point diameter and less than the maximum point diameter, the maximum point diameter being determined based on the step size of sampling the reference image.
[0017] In some embodiments, the glow intensity increases when the rendering radius of the same target sampling point increases over time, and decreases when the rendering radius of the same target sampling point decreases over time.
[0018] In some embodiments, determining the rendering parameters for each frame corresponding to each target sampling point based on the time information and the attribute parameters includes: determining a shared factor corresponding to each target sampling point based on the time information and the attribute parameters, wherein the shared factor is used to characterize the variation coefficients of the rendering radius, the transparency, and the glow intensity over time, and the shared factor changes periodically and continuously over time; and determining the rendering radius, the transparency, and the glow intensity based on the shared factor.
[0019] In some embodiments, obtaining the rendering parameters of each frame in the sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point includes: obtaining a preset frame rate and a preset number of frames; determining the time step between two adjacent frames according to the preset frame rate, wherein the time step is equal to the reciprocal of the preset frame rate; obtaining a plurality of discrete moments equal to the number of preset frames based on the time step; and obtaining the rendering parameters of each frame in the sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point and the plurality of discrete moments.
[0020] In some embodiments, the method further includes: determining the sampling step size and point diameter ratio coefficient of the sampling based on user input instructions.
[0021] This specification provides one or more embodiments of a raster image processing system, the system comprising: a first acquisition module for acquiring a reference image; a first determination module for determining target sampling points based on the reference image, each target sampling point including feature information of one or more consecutive pixels in the reference image; a second determination module for determining attribute parameters of each target sampling point; a second acquisition module for obtaining rendering parameters of each frame in the sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point, wherein the change in rendering parameters of the same target sampling point between adjacent frames is less than a preset threshold, the attribute parameters representing the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence of frames; and a rendering module for rendering each target sampling point according to the rendering parameters of each frame corresponding to each target sampling point, generating each frame in the sequence of frames.
[0022] This specification provides one or more embodiments of a raster image processing system, including a processor for performing a raster image processing method.
[0023] This specification provides one or more embodiments of a computer-readable storage medium that stores computer instructions. When a computer reads the computer instructions from the storage medium, the computer executes a raster image processing method. Attached Figure Description
[0024] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein:
[0025] Figure 1 These are schematic diagrams illustrating application scenarios of a raster image processing system according to some embodiments of this specification; Figure 2 This is an exemplary flowchart of a raster image processing method according to some embodiments of this specification; Figure 3 This is an exemplary flowchart illustrating the determination of rendering parameters according to some embodiments of this specification; Figure 4 This is an exemplary flowchart illustrating the determination of rendering parameters according to other embodiments of this specification; Figure 5 These are exemplary block diagrams of a raster image processing system according to some embodiments of this specification; Figure 6a These are exemplary schematic diagrams of reference images shown according to some embodiments of this specification; Figure 6b This is an exemplary schematic diagram of target sampling points according to some embodiments of this specification. Detailed Implementation
[0026] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this specification. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0027] It should be understood that the terms “system,” “device,” “unit,” and / or “module” used herein are one way to distinguish different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.
[0028] As indicated in this specification and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0029] Flowcharts are used in this specification to illustrate the operations performed by the system according to embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0030] Figure 1 This is a schematic diagram illustrating an application scenario of a raster image processing system according to some embodiments of this specification.
[0031] In some embodiments, in application scenario 100 of the raster image processing system, a video generation method can be implemented by carrying out the methods and / or processes disclosed in this specification. For example... Figure 1 As shown, the application scenario 100 of the raster image processing system involved in the embodiments of this specification includes a raster image 110, a processor 120, a terminal 130, a storage device 140, and a network 150.
[0032] A lenticular image 110 refers to a complete visual work that combines special lenticular materials with image processing technology, allowing observers to perceive continuous dynamic changes or three-dimensional depth from different perspectives. A lenticular image 110 is not a single flat painting; it comprises two core elements: first, at the physical level, it consists of a lenticular plate, a cylindrical lens covering the image surface. This lenticular plate is composed of a large number of parallel semi-cylindrical lenses, with the number of lenses per inch referred to as lines per inch, or lenticular density. Second, at the image data level, it consists of a composite image processed by pixel interlacing. This composite image is generated by slicing and alternating multiple frames reflecting different perspectives or times according to the optical refraction parameters of the lenticular plate. When the observer's perspective shifts, the line of sight passes through different cylindrical lenses and falls on different pixel slices, thus creating a visual illusion of continuous dynamic movement.
[0033] Processor 120 can process data and / or information acquired from terminal 130, storage device 140, network 150, and / or other components of application scenario 100 of raster image processing system. For example, processor 120 can obtain the aforementioned multi-frame sequence image by performing the following operations: acquiring a reference image; determining target sampling points based on the reference image, each target sampling point including feature information of one or more consecutive pixels in the reference image; determining attribute parameters for each target sampling point; obtaining rendering parameters for each frame in the sequence frame corresponding to each target sampling point based on the attribute parameters of each target sampling point, the attribute parameters representing the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence frame; and rendering each target sampling point according to the rendering parameters corresponding to each frame of each target sampling point to generate each frame in the sequence frame. Further explanation of this process can be found below. Figures 2-4 And its related descriptions.
[0034] In some embodiments, processor 120 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 120 may be local or remote. For example, processor 120 may access information and / or data from terminal 130 and / or storage device 140 via network 150. As another example, processor 120 may be directly connected to terminal 130 and / or storage device 140 to access information and / or data (e.g., processor 120 may acquire reference image 110 from terminal 130 and / or storage device 140). In some embodiments, processor 120 may be implemented on a cloud platform. For example, the cloud platform may include private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud cloud, multi-cloud, etc., or any combination thereof.
[0035] Terminal 130 can provide functional components related to user interaction and enable user interaction functions (such as providing or displaying information and data to the user). By way of example only, terminal 130 can be one or any combination of other devices with input and / or output functions, such as mobile devices, tablet computers, laptop computers, and desktop computers. By way of example only, output functions include, but are not limited to, one or more combinations of sound output such as voice, display screen, haptic transmission such as vibration, and electromagnetic wave signals such as light. By way of example only, input functions can include, but are not limited to, one or more combinations of keyboard input, touchscreen input, voice input, motion event input such as device tilt / shake / rotation / swing, and electromagnetic wave signal input such as light.
[0036] In some embodiments, a user can input information and / or data through terminal 130, and can also acquire information and / or data through terminal 130. For example, a user can input a reference image through terminal 130. As another example, a user can acquire generated multi-frame sequence images through terminal 130.
[0037] Storage device 140 may store data, instructions, and / or any other information. In some embodiments, storage device 140 may store data (e.g., reference images and / or sequence frames, etc.) acquired from processor 120, terminal 130, and / or other sources. In some embodiments, storage device 140 may store data and / or instructions used by processor 120 to perform or use in order to complete the exemplary methods described herein.
[0038] In some embodiments, storage device 140 may include one or more storage components, each of which may be a separate device or part of another device. In some embodiments, storage device 140 may include random access memory (RAM), read-only memory (ROM), mass storage, removable memory, volatile read-write memory, and any combination thereof. In some embodiments, storage device 140 may be implemented on a cloud platform.
[0039] Network 150 may include any suitable network capable of facilitating information and / or data exchange. In some embodiments, at least one component of application scenario 100 of the raster image processing system (e.g., processor 120, terminal 130, storage device 140) may exchange information and / or data with at least one other component of application scenario 100 of the raster image processing system via network 150. For example, processor 120 may send sequence frames to terminal 130 via network 150.
[0040] It should be noted that the application scenario 100 of the raster image processing system is provided for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can make various modifications or variations based on the description in this specification. For example, the application scenario 100 of the raster image processing system can achieve similar or different functions on other devices. However, these changes and modifications will not depart from the scope of this specification.
[0041] Figure 2 This is an exemplary flowchart of a raster image processing method according to some embodiments of this specification. In some embodiments, Figure 2 The process 200 shown can be executed by a processing device (such as a processor). Figure 2 As shown, the process may include the following operations.
[0042] Step 201: Obtain the reference image.
[0043] A reference image is a digital image. For example, the reference image could be a two-dimensional image with a resolution of 1920 pixels by 1080 pixels.
[0044] In some embodiments, the processor can directly read the reference image from the storage device or cloud storage space according to a preset reference image storage path.
[0045] In some embodiments, the processor may preprocess the acquired reference image, including denoising, resolution conversion, and image enhancement. For example, in resolution conversion, the processor may convert the acquired reference image to a preset resolution, such as 1920 pixels multiplied by 1080 pixels, to balance processing performance and printing accuracy.
[0046] Step 202: Determine target sampling points based on the reference image. Each target sampling point includes feature information of one or more consecutive pixels in the reference image.
[0047] Each target sampling point represents one or more consecutive pixels (a region) in a reference image. In other words, each target sampling point corresponds to one or more consecutive pixels (or a region) in the reference image.
[0048] Feature information refers to the characteristic attributes of the image region (or one or more consecutive pixels within the region) corresponding to the target sampling point. Examples include color attributes, grayscale attributes, red, green and blue channel values, and brightness values calculated based on channel values.
[0049] A target sampling point can correspond to a pixel in the reference image or a block composed of multiple pixels. Therefore, the feature information can be the average feature of multiple consecutive pixels.
[0050] The processor can determine the target sampling points in various ways. For example, it can obtain the target sampling points directly from the reference image through sampling. Another example is that it can sample the reference image to determine a discrete point matrix, and then determine the target sampling points based on the discrete point matrix. Yet another example is that it can select pixels from the reference image that meet certain brightness conditions as target sampling points; or it can select target sampling points from the reference image based on color channels, etc. The method for determining the target sampling points can be one of the above, or a combination of sampling points obtained through multiple methods.
[0051] In some embodiments, the processor determines the target sampling point based on the reference image by: sampling the reference image to generate a discrete point array, each sampling point in the discrete point array including feature information of one or more consecutive pixels in the reference image; and determining the target sampling point from the sampling points in the discrete point array.
[0052] A discrete point array is a set of discretely distributed points obtained by sampling a reference image at preset spatial intervals. Each point in the set is a sampling point.
[0053] In some embodiments, the processor can sample the reference image at equal intervals according to a sampling step size parameter (referred to as step size). The sampling step size refers to the pixel distance between two adjacent sampling points in the row and column directions of the reference image. For example, if the step size is ten pixels, the processor takes a sampling point every ten pixels in the row and column directions of the reference image, converting the reference image into a discrete point matrix composed of points uniformly distributed in the row and column directions. Connecting the sampling points forms a grid. The grid is a virtual coordinate matrix formed by equally spaced divisions in the horizontal and vertical directions. Each intersection point of the grid (or the center of the grid) is the spatial coordinate position of the sampling point. One grid can correspond to one sampling point, and the value of the sampling point is the average of the feature attributes of all pixels in the grid or the feature attribute of the pixel at the center of the grid. The grid can be square, circular, elliptical, or other irregular shapes. In some embodiments, the step size can be set by the user; for example, a point can be taken every 10 pixels in the reference image, with 10 being the step size.
[0054] In some embodiments, the step size can be determined based on the composition of the reference image. For example, a smaller step size can be set if the reference image has rich detail (e.g., a realistic painting), and a larger step size can be set if the reference image has less detail (e.g., a decorative painting).
[0055] In some embodiments, the grid step size can be set according to the LPI (Lines Per Inch) of the grating material: the higher the LPI, the finer the lens, requiring a similarly fine dot matrix, thus a smaller grid step size is set, resulting in a denser discrete dot matrix; conversely, the lower the LPI, the coarser the lens, and fine dots may produce moiré patterns due to aliasing, thus a larger grid step size is set. In some embodiments, a mapping relationship between the grid step size and LPI can be preset. The grid step size is determined based on the LPI of the grating material and this mapping relationship.
[0056] In some embodiments, the sampling step size in the row direction and the column direction of the reference image may be different. For example, the row direction may be sampled every 10 pixels, and the column direction may be sampled every 5 pixels.
[0057] In some embodiments, the processor can determine the sampling step size and the point diameter scaling factor based on user input instructions. For example, the user can specify the sampling step size and the point diameter scaling factor in the input instructions.
[0058] In some embodiments, the processor determines the target sampling point from the discrete dot matrix by: determining the brightness value of each sampling point in the discrete dot matrix based on feature information of the one or more consecutive pixels; and determining a sampling point whose brightness value satisfies a first condition as a first sampling point, wherein the target sampling point includes the first sampling point.
[0059] Brightness value is a numerical value used to characterize the brightness of the image area (including one or more consecutive pixels) corresponding to the sampling point.
[0060] The brightness value can be obtained by weighting the color channel values in the feature information of one or more consecutive pixels corresponding to a sampling point. A higher brightness value indicates a brighter area, and a lower brightness value indicates a darker area. For example, if the sampling point corresponds to a single pixel, the brightness value of that pixel can be directly used as the brightness value of the sampling point; if the sampling point corresponds to multiple consecutive pixels, the brightness value of each pixel can be read and accumulated, and then the accumulated result can be divided by the total number of pixels to obtain the average brightness of the multiple consecutive pixels as the brightness value.
[0061] The first condition refers to the judgment rule used to select sampling points within a specific brightness range from the sampling points. The first condition includes that the brightness value is within a preset brightness range. For example, the range of brightness values is 100-240, 100-400, etc.
[0062] The first sampling point refers to the sampling point whose brightness value satisfies the first condition. The target sampling point including the first sampling point means that the target sampling point consists only of the first sampling point, or that in addition to the first sampling point, the target sampling point may also include a second sampling point and / or a third sampling point. Detailed descriptions of the second and third sampling points are provided later.
[0063] The processor can compare the calculated brightness value of each sampling point with the brightness range to determine whether the brightness value falls within the brightness range. When the brightness value of a sampling point falls within the brightness range, the sampling point is determined as the first sampling point.
[0064] In this embodiment, by selecting target sampling points based on brightness values, targeted dynamic processing of specific brightness areas in the image is achieved. The breathing flicker effect is applied only to sampling points within the brightness range, effectively protecting the overall structure and contrast of the image and avoiding visual confusion caused by uniform dynamic processing across the entire image. Simultaneously, brightness range selection is suitable for low-contrast images such as night scenes, accurately preserving intermediate brightness details and concentrating the dynamic effect on areas sensitive to human vision. It also avoids exposure distortion in overly bright areas and detail loss in overly dark areas.
[0065] In some embodiments, the processor determining the target sampling point from the discrete point array may further include: dividing the reference image into multiple regions; calculating the average brightness of each region within the multiple regions; determining the density of second sampling points within each region based on the average brightness of each region; and determining at least a portion of the sampling points belonging to each region from the discrete point array based on the density as second sampling points, wherein the target sampling point includes the second sampling points.
[0066] A region refers to a spatially divided block into which a reference image is divided. Each block covers a certain range of consecutive pixels or consecutive sampling points in the reference image, and all regions together cover the entire range of the reference image. For example, a processor can equally divide a reference image with a width of 1920 pixels and a height of 1080 pixels into 8 regions horizontally and 6 regions vertically, resulting in a total of 48 regions. Each region has a width of 240 pixels and a height of 180 pixels.
[0067] In some embodiments, the processor divides the reference image into M equal parts along the row direction and N equal parts along the column direction according to the user-defined region number parameter, thereby dividing the entire reference image into M multiplied by N rectangular regions, where M and N are both positive integers. For example, if the user sets M to four and N to four, the processor divides the reference image into sixteen rectangular regions of equal area in four rows and four columns, with each region containing approximately the same number of sampling points.
[0068] In some embodiments, the processor divides the reference image into multiple regions based on an image segmentation algorithm. For example, the processor can perform adaptive region segmentation based on the edge detection results or salient region detection results of the reference image, dividing regions with rich texture or high visual saliency in the reference image into smaller regions to improve the density resolution within those regions, and dividing regions with flat texture or low saliency into larger regions to reduce computational overhead.
[0069] Average brightness refers to the average value obtained by statistically analyzing the brightness values of all sampling points within a region. Average brightness reflects the overall brightness of the region; a higher average brightness indicates a brighter visual area, while a lower average brightness indicates a dimmer visual area. For each region, the processor iterates through all sampling points within that region, reads the brightness value of each point, sums the brightness values, and then divides the sum by the total number of sampling points in that region to obtain the average brightness of that region.
[0070] The density of the second sampling point refers to the ratio of the number of second sampling points in a region to the total number of sampling points in that region. A higher density value indicates a denser concentration of second sampling points in the region, while a lower value indicates a sparser concentration of second sampling points in the region.
[0071] The processor determines the density value of the second sampling point within the region based on the average brightness of the region. The higher the average brightness of the region, the greater the density value of the second sampling point in that region; conversely, the lower the average brightness of the region, the smaller the density value of the second sampling point in that region.
[0072] In some embodiments, the processor pre-establishes a linear mapping relationship between the average brightness of the region and the density of the second sampling point, sets a minimum brightness threshold and a maximum brightness threshold, and sets the density of the region to zero when the average brightness of the region is lower than or equal to the minimum brightness threshold; when the average brightness of the region is higher than or equal to the maximum brightness threshold, the density of the region is set to a preset maximum density value, such as 0.8; when the average brightness of the region is between the minimum brightness threshold and the maximum brightness threshold, the density value of the second sampling point of the region is calculated by linear interpolation, that is, the density of the second sampling point is equal to the maximum density value multiplied by the difference between the average brightness of the region and the minimum brightness threshold, and then divided by the difference between the maximum brightness threshold and the minimum brightness threshold.
[0073] For example, density can be calculated as shown in the following formula (1): (1)
[0074] in, Indicates the average brightness of the area. Indicates the minimum brightness threshold. Indicates the highest brightness threshold. This indicates the preset maximum density value. This indicates the density of the second sampling point within the region.
[0075] The second sampling point refers to the sampling point selected from the sampling points in each region based on the density value.
[0076] In some embodiments, for each region, the processor calculates the number of second sampling points to be selected within that region based on the density of the second sampling points in that region. This number is equal to the total number of sampling points in that region multiplied by the density of the second sampling points in that region, rounded down. The processor can select this number of sampling points from all the sampling points in that region using a uniform random sampling method, and determine the selected sampling points as the second sampling points.
[0077] In some embodiments, the processor may also select sampling points with brightness values greater than preset conditions (such as the first condition) as second sampling points for each region.
[0078] In some embodiments, the processor may also randomly determine a second sampling point from the first sampling points based on a determined density for each region of the first sampling points.
[0079] The inclusion of a second sampling point in the target sampling point can mean that the target sampling point consists only of the second sampling point, or that in addition to the second sampling point, the target sampling point may also include a first sampling point and / or a third sampling point. The first sampling point and the second sampling point may overlap or be completely different. In this embodiment, by dividing the reference image into multiple regions and determining different sampling densities based on the average brightness of each region, the correlation and linkage between brightness and density are realized, enabling the bright areas to obtain more dynamic points, enriching the dynamic effects of the highlights in the image, and creating a natural visual experience of highlight breathing. This regional fine control method effectively avoids the influence of individual pixel brightness noise on the density distribution, making the density distribution of dynamic points smoother and more natural, and the visual focus more concentrated.
[0080] In some embodiments, the processor determines target sampling points from the discrete dot matrix, including: determining the channel value of each sampling point in the discrete dot matrix on a target color channel based on feature information of the one or more consecutive pixels; and determining sampling points whose channel values satisfy a second condition as third sampling points, wherein the target sampling points include the third sampling points.
[0081] The target color channel refers to the color component selected from the color space of the reference image. The target color channel can be any one or more of the red, green, or blue channels. The channel value refers to the numerical value of the reference image region corresponding to the sampling point on the target color channel. The channel value reflects the intensity of the color component corresponding to the target color channel in that region; a higher channel value indicates a stronger color component.
[0082] In some embodiments, for each sampling point in the discrete dot matrix, the processor extracts the color channel value from the feature information stored at that sampling point. When the color channel is the same as the target color channel, the color channel value is determined as the channel value of that sampling point in the target color channel. The processor iterates through all sampling points sequentially to obtain the channel value of each sampling point in the target color channel.
[0083] The second condition refers to the judgment rule used to filter out sampling points with specific color characteristics from the sampling points. In some embodiments, the second condition is that the channel value on the target color channel is within a preset numerical range, for example, within the range of 80-200.
[0084] The third sampling point refers to the sampling point where the channel value on the target color channel satisfies the second condition.
[0085] In some embodiments, after the processor extracts the channel value of each sampling point on the color channel, it obtains a preset value range of the target color channel, compares the channel value of each sampling point on the target color channel with the preset value range, and when the channel value of the sampling point on the target color channel falls within the preset value range, the sampling point is determined as the third sampling point.
[0086] In this embodiment, by filtering target sampling points based on color channel values, precise processing of specific color regions in the reference image is achieved. This allows the dynamic breathing effect of specific color regions to be highlighted, enhancing visual impact. The color channel filtering method is suitable for scenes rich in green information in plant or natural landscape images. It can make green vegetation areas present a natural flickering dynamic while maintaining overall image stability, enhancing the vividness of the image. Users can flexibly select the target color channel (such as the green channel) and filtering range according to image content and artistic needs, giving greater freedom and control in creating dynamic effects. See also Figure 6a and Figure 6b , Figure 6a These are exemplary schematic diagrams of reference images shown according to some embodiments of this specification. Figure 6b This is an exemplary schematic diagram of target sampling points according to some embodiments of this specification. Figure 6b To obtain from the reference image Figure 6a The image extracted, containing multiple target sampling points, is transformed from a regular reference image into a "light spot" image containing multiple target sampling points through sampling point extraction. Figure 6b In this specification, points in areas with higher brightness (such as white bright spots) can be the second sampling points identified in this specification, and their density is relatively higher than that of other sampling points.
[0087] Step 203: Determine the attribute parameters of each target sampling point among the plurality of target sampling points.
[0088] Attribute parameters refer to the set of variables that affect the variation pattern of target sampling points. Attribute parameters include frequency parameters and initial phase parameters. Attribute parameters are used to represent the rate of change of the rendering parameters of each target sampling point and / or the magnitude of the rendering parameters of each target sampling point in the initial frame of the sequence of frames.
[0089] To achieve a continuous, smooth, and "breathing" flickering visual effect on the physical raster board, this specification constrains the rendering through frequency and initial phase parameters. By assigning independent frequency and initial phase parameters to each target sampling point, "asynchronous phase fluctuation and continuous flickering within a narrow range" is achieved. Fluctuation refers to the periodic back-and-forth changes in rendering parameters such as the rendering radius, transparency, and glow intensity of the target sampling point (see step 204 below for explanation of rendering parameters). Flickering refers to the subjective perception of changes in brightness or size experienced by the user when viewing the raster image due to the periodic fluctuations of these rendering parameters.
[0090] The frequency parameter is used to represent the number of fluctuations that a target sampling point undergoes in one second to complete a full magnification and then shrink back to its original state. The larger the value, the faster the flickering rhythm of the point.
[0091] The initial phase parameter indicates the specific stage position of the target sampling point within its fluctuation period at the initial frame of the sequence frame. The initial phase parameter determines the starting point or time offset of the sampling point's radius fluctuation.
[0092] In some embodiments, for each target sampling point, a value is randomly selected from a frequency range of 1Hz to 5Hz according to a uniform distribution as the frequency parameter of the target sampling point. For example, for each target sampling point, a value is randomly selected from a frequency range of 1Hz to 5Hz using an independent random number generator, for example, by uniform distribution, and the selected value is used as the frequency parameter of the target sampling point. Uniform distribution means that the probability of selecting each value within the range is uniformly distributed and equal, and the selection is random during the selection process.
[0093] In some embodiments, the processor may also generate a first random number sequence equal to the total number of target sampling points. Each random number in the first random number sequence is independently and uniformly distributed within a preset frequency range of 1Hz to 5Hz. The random numbers in the first random number sequence are then assigned to each target sampling point in a corresponding order according to the arrangement of the target sampling points as their frequency parameters.
[0094] In some embodiments, for each target sampling point, a value is randomly selected from the phase range of 0-2π in a uniform distribution as the initial phase parameter of that target sampling point. For example, an independent random number generator can be used to select a value from the phase range of 0-2π radians (e.g., randomly selected in a uniform distribution) and use that value as the initial phase parameter of the target sampling point.
[0095] In some embodiments, the processor can generate a second random number sequence equal to the total number of target sampling points. Each random number in the second random number sequence is independently and uniformly distributed within a preset phase range of 0-2π radians. The random numbers in the second random number sequence are then assigned one-to-one to each target sampling point as its initial phase parameter.
[0096] In this system, the frequency parameters and initial phase parameters of different target sampling points are independent and uncorrelated. For example, the frequency parameter extraction process and the initial phase parameter extraction process are independent of each other. The generation processes of the first and second random number sequences can use different random seeds to ensure that the two sequences are uncorrelated. Uncorrelated means that there is no linear or nonlinear functional dependency between the frequency parameters and the initial phase parameters.
[0097] In this embodiment, by independently and randomly assigning frequency parameters to each target sampling point within the frequency range of 1Hz to 5Hz, the flickering rhythm of each point is made different, avoiding the mechanical feeling caused by global synchronous fluctuations. Simultaneously, by independently and randomly assigning initial phase parameters within the phase range of 0 to 2π, each point is initially at a different stage of the fluctuation cycle, forming a staggered and dynamic sense of layering. Furthermore, since the frequency parameters and initial phase parameters are independent and uncorrelated, the entire dot matrix is in a dynamically non-equilibrium state at any given time. When the user observes the lenticular image, they experience the rich dynamic of countless particles flickering at different rhythms and stages as the viewing angle moves, rather than the monotonous flickering of all points jumping synchronously, significantly improving the visual quality and artistic appeal of the lenticular image.
[0098] Step 204: Based on the attribute parameters of each target sampling point, obtain the rendering parameters of each frame in the sequence frame corresponding to each target sampling point.
[0099] Rendering parameters refer to the visual attribute data used to draw target sampling points in a sequence of frames. Rendering parameters include the rendering radius. In some embodiments, rendering parameters may further include transparency parameters, glow intensity parameters, etc.
[0100] Specifically, the change in rendering parameters at the same target sampling point between adjacent frames is less than a preset threshold. In some embodiments, the change in rendering parameters is continuous over time. The continuous change of rendering parameters over time can be explained in two ways: firstly, the continuity of the function curve in a mathematical sense, that is, the rendering parameters at each target sampling point follow a continuously differentiable periodic function that evolves smoothly on the time axis; secondly, the continuity of inter-frame changes in a sampling sense, that is, the change in rendering parameters at the same target sampling point between adjacent frames is always less than a preset threshold based on the limit of human visual perception.
[0101] The continuous changes at both the mathematical and sampling levels work together to transform discrete frame switching into continuous dynamic evolution, fundamentally eliminating the sense of frame skipping and stuttering that exists in traditional raster animation when the viewpoint changes. This results in a smooth, natural, and stutter-free breathing flickering effect when the viewpoint changes.
[0102] The preset threshold is the maximum allowable variation of the rendering radius between two adjacent frames. The preset threshold is used to constrain the fluctuation range of rendering parameters at the same target sampling point between two adjacent frames, ensuring that the fluctuation range is controlled within a range imperceptible to the human visual system, thereby presenting a seamless and smooth dynamic transition effect when the sequence frames are played continuously.
[0103] A sequence of frames is a collection of reference images arranged sequentially in time for final output to the raster plate for pixel interleaving. The frequency parameter in the attribute parameters controls the rate at which the rendering parameters change over time, while the initial phase parameter determines the specific value of that rendering parameter at the initial frame.
[0104] In some embodiments, the preset threshold needs to be smaller than the human eye's perception of changes in frame intervals. For example, based on the persistence of vision, when the frame rate is higher than 24 frames per second, the human eye no longer perceives the discontinuity between frames. Therefore, the preset threshold should ensure that, under a preset frame rate, the amount of visual feature change caused by variations in rendering parameters between adjacent frames is lower than the minimum difference that the human eye can perceive within that time interval. For example, when the frame rate is 25 frames per second, the time interval between adjacent frames is 0.04 seconds. The preset threshold should ensure that, within this time interval, the area difference corresponding to the radius change of the same target sampling point is less than the minimum area change that the human eye can perceive within 0.04 seconds.
[0105] In some embodiments, the processor calculates the total number of sequence frames to be generated based on the number of lines per inch of the raster material and the printing resolution, determines the time information corresponding to each frame based on the preset display frame rate, and substitutes the frequency parameters and initial phase parameters of each target sampling point into the rendering parameters to determine the model to calculate the rendering radius of each frame.
[0106] In some embodiments, the processor can determine the maximum and minimum rendering radius of each target sampling point; and based on the maximum and minimum rendering radius, time information, and attribute parameters, determine the rendering radius of each target sampling point for each frame.
[0107] In some embodiments, the processor may construct a rendering parameter determination model using a continuous periodic function, and substitute the frequency parameter and initial phase parameter of each target sampling point into the rendering parameter determination model to obtain the rendering parameters.
[0108] Further explanation on determining rendering parameters can be found below. Figure 3 And its related descriptions.
[0109] Step 205: Render each target sampling point according to the rendering parameters corresponding to each frame for each target sampling point to generate each frame in the sequence of frames.
[0110] Rendering refers to the process of drawing the visual elements of the target sampling points according to the rendering parameters corresponding to each frame. In some embodiments, the rendering parameters include at least one of rendering radius, transparency, and glow intensity. In some embodiments, the rendering parameters include color mapping. For example, the second sampling point is color-mapped into a colored point.
[0111] Render radius is a value used to control the size of the target sampling point when it is drawn on the canvas. Opacity is a value used to control the degree to which the target sampling point penetrates or obscures the background when drawn. A lower opacity value makes the point more transparent and the background more visible, while a higher opacity value makes the point less transparent. Glow intensity is a value used to control the intensity of the halo effect around the target sampling point; a higher value results in a stronger halo around the point.
[0112] In some embodiments, at each frame, the processor draws each target sampling point on the canvas by drawing a circular path and filling it with color, based on the rendering radius and original color information of each target sampling point corresponding to that frame. Simultaneously, the processor can dynamically adjust the shadow blur attribute value in the canvas according to the rendering radius value of the current frame, so that the glow intensity changes synchronously with the rendering radius; that is, the glow increases synchronously when the rendering radius increases and decreases synchronously when the rendering radius decreases.
[0113] After each frame is rendered, the processor can export and save the current canvas content, generating a reference image for one frame in the sequence.
[0114] In some embodiments, the processor overlays a glow effect based on the Glow parameter (glow intensity parameter) when rendering each point. For example, by manipulating the Canvas's shadowBlur and shadowColor properties, a light diffusion effect is created on the pixel array. The intensity of this effect changes synchronously in real time with the fluctuation of a sine function—the glow increases synchronously when the point becomes larger and decreases synchronously when the point becomes smaller, further blurring the physical boundaries of the raster stripes and enhancing the continuity of the dynamic transition.
[0115] In some embodiments of this specification, by combining the smooth change characteristics of continuous periodic functions, the image changes continuously without abrupt changes when the observer's viewpoint moves, fundamentally solving the frame skipping and stuttering problems caused by discrete frame switching in traditional raster animation. Simultaneously, the discrete frame switching is transformed into a continuous dynamic evolution, thereby allowing the raster image to exhibit a smooth, natural, and stutter-free breathing-like flickering effect when the viewpoint changes.
[0116] Figure 3 This is an exemplary flowchart illustrating the determination of rendering parameters according to some embodiments of this specification. In some embodiments, Figure 3 The process 300 shown can be executed by a processing device (such as a processor). Figure 3 As shown, the process may include the following operations.
[0117] Step 301: Determine the time information corresponding to each frame in the sequence frames.
[0118] Timing information is a numerical value used to characterize the position of each frame in a sequence of frames on the timeline. Timing information represents the time of each frame in the sequence relative to the initial frame; for example, the position of this value is relative to the position of the initial frame on the timeline.
[0119] In some embodiments, the processor can first determine the frame number based on the raster characteristics. For example, for a paper raster plate, the frame number equals the print resolution divided by the number of raster lines. For a liquid crystal display device, the frame number equals the raster pitch divided by the screen subpixel width. The processor can then obtain the frame rate, which can be determined based on the frame number. The frame rate is the number of frames of a reference image displayed within a preset unit of time (e.g., seconds). The reciprocal of the frame rate is used to determine the time interval between each frame, and then the frame number of the current frame is multiplied by this time interval to obtain the time information corresponding to that frame. For example, when the frame rate is 25 frames per second, the time interval is 0.04 seconds, and the time information corresponding to the tenth frame is 0.4 seconds. The frame rate can be set according to the number of viewing angles of the raster plate or the user's display requirements.
[0120] Step 302: Based on the time information and the attribute parameters, determine the rendering parameters for each frame corresponding to each target sampling point.
[0121] Regarding the rendering radius, the processor determines the rendering radius of each target sampling point for each frame based on the time information and the attribute parameters, including: determining the maximum and minimum rendering radius of each target sampling point; and determining the rendering radius of each target sampling point for each frame based on the maximum rendering radius, the minimum rendering radius, the time information, and the attribute parameters.
[0122] The maximum rendering radius is the largest size that the target sampling point can reach during the fluctuation period. The minimum rendering radius is the smallest size that the target sampling point shrinks to during the fluctuation period.
[0123] In some embodiments, the processor can calculate the maximum rendering radius based on the mesh step size and a preset point diameter scaling factor. For example, the maximum rendering radius is equal to the mesh step size multiplied by the point diameter scaling factor. The minimum rendering radius can be set to the maximum rendering radius multiplied by a preset scaling factor, such as setting the scaling factor to 0.3, so that the minimum rendering radius is smaller than the maximum rendering radius, ensuring that the sampled points are always visible and do not disappear completely.
[0124] In some embodiments, the processor calculates the upper limit of the point diameter based on the mesh step size and the point diameter, and the calculation method can be as shown in the following formula (2): (2)
[0125] in, For grid step size, Let be the diameter of the point.
[0126] In some embodiments, the processor can substitute time information, frequency parameters, and initial phase parameters into a rendering parameter determination model, which takes the maximum rendering radius, minimum rendering radius, time information, and attribute parameters (such as frequency parameters and initial phase parameters) as inputs and the rendering radius as output.
[0127] In some embodiments, the processor determines the rendering radius of each target sampling point for each frame based on the time information and the attribute parameters, including: obtaining a rendering parameter determination model, and determining the rendering parameters using the rendering parameter determination model based on the time information and the attribute parameters.
[0128] The rendering parameter determination model is a pre-built computational model used to map input parameters to output rendering parameters. It represents the mapping relationship between temporal information, attribute parameters, and rendering radius.
[0129] The mapping relationship means that for each set of input time information and attribute parameters, the model can output the corresponding rendering parameters through certain calculation rules.
[0130] In some embodiments, the rendering parameter determination model is constructed based on a continuous periodic function. In this continuous periodic function, the time information and the attribute parameters are independent variables, and the rendering parameters are dependent variables. Therefore, after inputting the time information and attribute parameters into the rendering parameter determination model, rendering parameters, such as the rendering radius, can be output.
[0131] A continuous periodic function is a mathematical function that is continuous at any point in its domain and exhibits periodic repetition. A continuous periodic function has no discontinuities or abrupt changes in the real number domain, and its function value changes smoothly and cyclically as the independent variable changes continuously.
[0132] In some embodiments, the continuous periodic function is a sine function, a cosine function, a trigonometric function, or Berlin noise.
[0133] Trigonometric functions can be constructed using absolute value functions, whose rates of increase and decrease are constant (linear). Visually, they lack the sense of lingering at extreme points, making the flicker appear rather harsh, uniform, and mechanical. Perlin noise, on the other hand, is a non-periodic pseudo-random waveform. Because it lacks a fixed cycle, the flicker appears even more irregular and extremely natural.
[0134] In some implementations, the rendering parameter determination model (also known as the rendering radius mapping function) based on a continuous periodic function for determining the rendering radius can be as shown in the following formula (3): (3)
[0135] in, For rendering radius, Minimum rendering radius, For the maximum rendering radius, This is a continuous periodic function; for illustrative purposes, it is a sine function here, but it could also be any other function. This refers to the frequency parameter in the attribute parameters. For time information, This refers to the initial phase parameter in the attribute parameters. and This is a preset constant, for example, it could be 1 / 2. The introduced time information can be used to represent the time corresponding to each frame of the image. The time information is continuously increased; for example, for the ... A frame, corresponding to a time t, equals , It is related to the preset frame rate and is the reciprocal of the preset frame rate.
[0136] and The value of satisfies the overflow prevention constraint: to ensure that the rendered point radius is not less than 0 (less than 2 may cause an error in the underlying Canvas rendering engine) and does not exceed the set physical raster limit (i.e., the maximum point diameter, which would lead to uncontrollable excessive overlap), the constant... and satisfy: -| |≥0, and| |+ ≤1.
[0137] right and The technical effects of different values are compared below: Full-scale smooth flicker (best implementation): =0.5, =0.5. The point smoothly transitions between its maximum and minimum states, resulting in the strongest visual dynamic effect. Micro-amplitude controlled flickering: If we take... =0.2, If the product term is 0.5, its range will narrow to [0.3, 0.7]. At this point, the value of the point fluctuates only slightly within the middle 40% range, resulting in a more controlled flickering.
[0138] In some embodiments, the rendering radius is smaller than the step size for sampling the reference image. A rendering radius smaller than the step size ensures that the rendering size of each target sampling point is confined to a single grid cell, preventing it from exceeding the boundary of its own grid and encroaching on the area of adjacent grids.
[0139] In some embodiments, the rendering radius is greater than the minimum point diameter and less than the maximum point diameter. The maximum point diameter is determined based on the step size of sampling the reference image. The minimum point diameter refers to the smallest size value that the target sampled point shrinks to during the fluctuation period. The minimum point diameter is a non-negative number to ensure that the point is always visible and does not completely disappear. The maximum point diameter refers to the largest size value that the target sampled point can reach during the fluctuation period, which defines the upper limit boundary of point expansion. The rendering radius is within the open interval defined by the minimum and maximum point diameters in each frame, i.e., greater than the minimum point diameter and less than the maximum point diameter.
[0140] In some embodiments, when the processor samples the reference image to generate a discrete dot matrix, it can simultaneously acquire a user-defined dot diameter scaling factor. As mentioned earlier, the dot diameter scaling factor can be less than 1 or greater than 1. The processor calculates the maximum dot diameter based on the product of the grid step size and the dot diameter scaling factor; that is, the maximum dot diameter equals the step size multiplied by the dot diameter scaling factor. When the dot diameter scaling factor is less than 1, the maximum dot diameter is less than the step size, resulting in gaps between sampled points and a sparse dot matrix effect. When the dot diameter scaling factor is greater than 1, the maximum dot diameter is greater than the step size, resulting in overlap between points and reserving physical redundancy space for relative displacement under the raster.
[0141] For example, in formula (3) above, When the amplitude is less than the step size, the range of variation of the sampling points is constrained within a single grid cell, without infringing on the vibration regions of adjacent points; when and When each value is 1 / 2, The value is in the range of 0-1, ensuring that the radius of the point is within... and They are monotonically correlated, with no overflow and no return to zero; The offset of 1 / 2 is used to avoid negative values and keep the point always visible.
[0142] In some embodiments, transparency can be determined by multiplying a reference transparency by a volatility factor, where the volatility factor is a constant. Multiply by the sharing factor and add a constant An explanation of the shared factor can be found below.
[0143] For example, the rendering parameter determination model (also known as the transparency mapping function) for determining transparency, constructed based on a continuous periodic function, can be shown in the following formula (4): (4)
[0144] in, For transparency, For reference transparency.
[0145] In formula (4), the independent variable of the continuous periodic function is The value of this continuous periodic function changes periodically between +1 and -1 as time progresses. When the function value increases, the sharing factor increases, and the transparency approaches or exceeds the reference transparency; when the function value decreases, the sharing factor decreases, the transparency decreases, and the point becomes more transparent. Parameters and Together, they determine the range of variation of the volatility factor and the benchmark offset, and their values are limited by constraints, namely... and The sum is less than or equal to 1 and and The difference is greater than or equal to 0. For example, and The value can be 1 / 2.
[0146] In some embodiments, the glow intensity increases as the rendering radius of the same target sampling point increases over time, and the glow intensity decreases as the rendering radius of the same target sampling point decreases over time.
[0147] In some embodiments, the glow intensity can be determined by adding a reference glow intensity to a shared factor multiplied by a preset multiple.
[0148] For example, the rendering parameter determination model (also known as the glow intensity mapping function) for determining glow intensity, constructed based on a continuous periodic function, can be shown in the following formula (5): (5)
[0149] in, Glow intensity For reference glow intensity, This is a preset constant, for example, it can be 3.
[0150] The independent variable of a continuous periodic function is This allows the glow intensity to share the same dynamic rhythm as transparency and rendering radius. When the continuous periodic function value increases, the glow intensity strengthens based on the reference glow intensity, making the halo effect around the point brighter and more diffused; when the continuous periodic function value decreases, the glow intensity weakens based on the reference glow intensity, and the halo effect around the point fades accordingly. Preset constants. The preset multiplier determines the amplitude of the glow intensity variation with the sinusoidal fluctuation. The value can be 3.
[0151] In some embodiments, the processor determines the rendering parameters for each frame corresponding to each target sampling point based on the time information and the attribute parameters, including: determining a shared factor corresponding to each target sampling point based on the time information and the attribute parameters; and determining the rendering radius, the transparency, and the glow intensity based on the shared factor.
[0152] The sharing factor is a scalar value that changes periodically and continuously over time. The sharing factor characterizes the coefficients by which the rendering radius, transparency, and glow intensity change over time, and it changes periodically and continuously over time.
[0153] For example, the sharing factor can be one of the factors in formulas (2) to (5) above. .
[0154] In some embodiments, the processor can substitute the attribute parameters of each target sampling point and the time information corresponding to the current frame into a continuous periodic function to calculate the sharing factor.
[0155] Furthermore, the processor can determine the rendering radius, transparency, and glow intensity values based on a shared factor.
[0156] The rendering radius is determined based on a shared factor, the maximum rendering radius, and the minimum rendering radius. For example, the rendering radius equals the minimum rendering radius plus the difference between the maximum and minimum rendering radii multiplied by the shared factor.
[0157] Transparency is determined based on a reference transparency and a sharing factor. For example, transparency equals the base transparency multiplied by the sharing factor, such that transparency increases as the sharing factor increases and decreases as the sharing factor decreases.
[0158] The glow intensity is determined based on a reference glow intensity and a sharing factor. For example, the glow intensity is equal to the base glow intensity multiplied by the sharing factor, ensuring that the glow intensity and the sharing factor change in the same direction.
[0159] In this embodiment, since the shared factor changes continuously over time and participates in the calculation of the three rendering parameters simultaneously, synchronous fluctuations are achieved among the rendering radius, transparency, and glow intensity. This ensures that the three visual dimensions change in tandem when the viewpoint is switched, effectively blurring the physical boundaries of the raster and enhancing the continuity of the dynamic transition.
[0160] In determining the rendering parameters mentioned above, various constraints were applied to make the rendered sequence of frames more natural and enhance dynamic continuity. These constraints can be summarized as follows:
[0161] Narrow interval constraint: This means that the range of motion is strictly limited to a single grid step, where If n is smaller than a single grid step, then the rendering radius is smaller than a single grid step.
[0162] Asynchronous constraint: The random frequency operator and random initial phase at each point are completely random and independent, avoiding the "pumping effect" caused by all synchronous fluctuations.
[0163] Continuous constraint: The sinusoidal function is continuously differentiable, and the radius and transparency of each point change sinusoidally over time, with the changes strictly constrained within a "narrow interval" of the grid step size. Since the frequency parameters and initial phase parameters of each point are completely independent and asynchronous, the overall image will produce an extremely smooth, non-linear flickering effect due to the "relative displacement within the narrow interval" when the viewpoint moves, thus effectively avoiding the frame skipping defects of physical raster plates.
[0164] Specifically, the sine function possesses the mathematical property of being twice continuously differentiable, meaning that the change of the sine function is not only smooth (first-order continuous), but also that the rate of change is smooth (second-order continuous). Physically, this means that in the process of a point changing from "minimum" to "maximum," there are no sudden changes in velocity; at the peaks and troughs, the rate of change smoothly returns to zero and then accelerates in the opposite direction; the entire motion process is completely shock-free and vibration-free, which is the key to eliminating the frame skipping effect in raster graphics.
[0165] Continuity constraint: This refers to the fact that the rendering radius and opacity of each target sampling point evolve over time according to a continuously differentiable function curve, without any abrupt changes or discontinuities. Specifically, for any given time, the rendering radius satisfies that the left-hand limit equals the right-hand limit equals the function value itself, and the first derivative exists and is finite. This specification preferably uses a sine function to implement this constraint. The sine function is infinitely differentiable in the real number domain, and its third-order continuous differentiability ensures that the motion trajectory of the lattice particles is smooth and vibration-free.
[0166] From another perspective, continuity constraint can refer to the fact that the change in rendering parameters at the same target sampling point between adjacent frames in a sequence of frames is controlled within a range that is imperceptible to the human eye (less than a threshold). For example, all rendering parameters are driven by a continuous periodic function, and the continuous function is sampled at equal intervals at a preset frame rate (such as 25-30 frames / second), so that the parameter difference between adjacent sampling points is small enough that the observer perceives a smooth dynamic process when the viewpoint changes continuously, rather than the switching of discrete frames.
[0167] Value range constraint: Ensure that the rendering radius is always between the preset minimum and maximum values. Normalize the difference (i.e. fluctuation range) between the maximum and minimum point diameters through a shared factor, so that invalid values that exceed the boundary will not appear.
[0168] Figure 4 This is an exemplary flowchart illustrating the determination of rendering parameters according to other embodiments of this specification. In some embodiments, Figure 4 The process 400 shown can be executed by a processing device (such as a processor). Figure 4 As shown, the process may include the following operations.
[0169] Step 401: Obtain the preset frame rate and preset frame count.
[0170] The preset frame rate refers to the number of reference image frames to be displayed per unit of time (second). The preset frame count refers to the total number of reference image frames to be generated. For example, the preset frame rate can be set to 30 frames per second, and the preset frame count can be set to 37 frames, indicating that 37 reference image frames need to be generated.
[0171] In some embodiments, the processor may receive frame rate and frame number values input by the user through a user interface.
[0172] In some embodiments, the processor may also automatically calculate the preset number of frames and the preset frame rate based on the parameters of the physical lenticular sheet. For example, for a paper lenticular sheet, the preset number of frames is equal to the printing resolution divided by the number of lenticular lines. For a liquid crystal display device, the preset number of frames is equal to the lenticular pitch divided by the screen subpixel width.
[0173] Step 402: Determine the time step between two adjacent frames based on the preset frame rate, wherein the time step is equal to the reciprocal of the preset frame rate.
[0174] The time step refers to the time interval between two adjacent frames in a sequence. For example, when the preset frame rate is 25 frames per second, a time step of 0.04 seconds means that the time step between two adjacent frames is 0.04 seconds.
[0175] Step 403: Based on the time step, obtain a number of discrete moments equal to the preset number of frames.
[0176] A discrete moment refers to a sequence of discrete time points divided sequentially on the time axis starting from time zero according to the time step. Each discrete moment corresponds to one frame in the sequence, and the number of discrete moments is equal to the preset number of frames; that is, the number of discrete moments is equal to the number of frames.
[0177] In some embodiments, the processor may generate an arithmetic sequence starting from zero based on a preset number of frames. The common difference of the sequence is the time step, and the number of terms in the sequence is the preset number of frames. Each term in the sequence is a discrete moment.
[0178] Step 404: Based on the attribute parameters of each target sampling point and the multiple discrete time points, obtain the rendering parameters of each frame in the sequence frames corresponding to each target sampling point.
[0179] In some embodiments, for each target sampling point and each discrete time, the processor substitutes the frequency parameter and initial phase parameter of the target sampling point and the current discrete time into a continuous periodic function to calculate a shared factor, and further converts the shared factor into rendering radius, transparency and glow intensity through different mapping relationships.
[0180] For example, the rendering radius equals the minimum rendering radius plus the difference between the maximum and minimum rendering radii multiplied by a sharing factor; the transparency equals the base transparency multiplied by a sharing factor; and the glow intensity equals the base glow intensity multiplied by a sharing factor. After sequentially traversing all target sampling points and all discrete time points, the rendering parameters for each frame in the sequence of frames corresponding to each target sampling point can be obtained.
[0181] In this embodiment, by setting a preset frame rate to determine the time step and generating discrete moments, equal-interval sampling of continuous time signals is achieved, preserving the original information of the dynamic waveform to the greatest extent and ensuring that the dynamic effect after printing is consistent with the algorithm design. Automatic calculation of the frame number based on the grating material parameters ensures that the generated sequence frames match the beam splitting accuracy of the physical grating board, avoiding trial and error based on manual experience.
[0182] Figure 5 These are exemplary block diagrams of a raster image processing system according to some embodiments of this specification. Figure 5 As shown, system 500 may include a first acquisition module 510, a first determination module 520, a second determination module 530, a second acquisition module 540, and a rendering module 550.
[0183] The first acquisition module 510 is used to acquire a reference image.
[0184] The first determining module 520 is used to determine target sampling points based on the reference image, wherein each target sampling point includes feature information of one or more consecutive pixels in the reference image.
[0185] The second determining module 530 is used to determine the attribute parameters of each target sampling point among the plurality of target sampling points.
[0186] The second acquisition module 540 is used to obtain the rendering parameters of each frame in the sequence frame corresponding to each target sampling point based on the attribute parameters of each target sampling point, wherein the attribute parameters are used to represent the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence frame.
[0187] The rendering module 550 is used to render each target sampling point according to the rendering parameters corresponding to each frame of each target sampling point, and generate each frame in the sequence frame.
[0188] For detailed descriptions of each module of System 500, please refer to the relevant descriptions in the method flowchart above, which will not be repeated here.
[0189] It should be noted that the above descriptions of the various processes are for illustrative purposes only and do not limit the scope of this specification. Those skilled in the art can make various modifications and changes to the processes under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, adding a storage step between process steps, or adjusting the execution order of process steps, etc.
[0190] The basic concepts have been described above. Obviously, for those skilled in the art, the detailed disclosure above is merely illustrative and does not constitute a limitation of this specification. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this specification. Such modifications, improvements, and corrections are suggested in this specification and therefore remain within the spirit and scope of the exemplary embodiments described herein.
[0191] Furthermore, this specification uses specific terms to describe embodiments thereof. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Moreover, certain features, structures, or characteristics in one or more embodiments of this specification can be appropriately combined.
[0192] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this specification are not intended to limit the order of the processes and methods described herein. Although various examples have been discussed in the foregoing disclosure of some embodiments of the invention that are currently considered useful, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments; rather, the claims are intended to cover all modifications and equivalent combinations that conform to the spirit and scope of the embodiments described herein. For example, while the system components described above can be implemented using hardware devices, they can also be implemented solely using software solutions, such as installing the described system on existing servers or mobile devices.
[0193] Similarly, it should be noted that, in order to simplify the description disclosed herein and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of embodiments in this specification may sometimes combine multiple features into a single embodiment, drawing, or description thereof. However, this method of disclosure does not imply that the subject matter of this specification requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of a single embodiment disclosed above.
[0194] In some embodiments, numbers describing the quantity of components and attributes are used. It should be understood that such numbers used in the description of embodiments are modified in some examples with the terms "approximately," "approximately," or "generally." Unless otherwise stated, "approximately," "approximately," or "generally" indicates that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may be changed depending on the characteristics required by individual embodiments. In some embodiments, numerical parameters should take into account specified significant digits and employ a general method of digit reservation. Although the numerical ranges and parameters used to confirm their breadth of range in some embodiments of this specification are approximate values, in specific embodiments, such values are set as precisely as feasible.
[0195] For each patent, patent application, patent application publication, and other material such as articles, books, specifications, publications, and documents referenced in this specification, the entire contents of which are incorporated herein by reference. This excludes historical application documents that are inconsistent with or conflict with the content of this specification, as well as documents that limit the broadest scope of the claims in this specification (currently or subsequently appended to this specification). It should be noted that in the event of any inconsistency or conflict between the descriptions, definitions, and / or terminology used in the supplementary materials to this specification and the content of this specification, the descriptions, definitions, and / or terminology used in this specification shall prevail.
[0196] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.
Claims
1. A raster image processing method, characterized in that, The method includes: Obtain a reference image; Target sampling points are determined based on the reference image, and each target sampling point includes feature information of one or more consecutive pixels in the reference image; Determine the attribute parameters of each target sampling point among the plurality of target sampling points; Based on the attribute parameters of each target sampling point, the rendering parameters of each frame in the corresponding sequence of frames are obtained, wherein the attribute parameters are used to represent the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence of frames; and Each target sampling point is rendered according to the rendering parameters corresponding to each frame of each target sampling point to generate each frame in the sequence of frames.
2. The method according to claim 1, characterized in that, The determination of target sampling points based on the reference image includes: The reference image is sampled to generate a discrete point array, each sampled point in the discrete point array including feature information of one or more consecutive pixels in the reference image; and The target sampling point is determined from the discrete point matrix.
3. The method according to claim 2, characterized in that, Determining the target sampling point from the discrete point matrix includes: Based on the feature information of the one or more consecutive pixels, determine the brightness value of each sampling point in the discrete dot matrix; and The sampling point whose brightness value satisfies the first condition is determined as the first sampling point, and the target sampling point includes the first sampling point.
4. The method according to claim 2, characterized in that, Determining the target sampling point from the discrete point matrix includes: The reference image is divided into multiple regions; Calculate the average brightness of each of the multiple regions; The density of sampling points within each region is determined based on the average brightness of each region. Based on the density, sampling points in each region are determined as second sampling points from the discrete point matrix, and the target sampling points include the second sampling points.
5. The method according to claim 2, characterized in that, Determining the target sampling point from the discrete point matrix includes: Based on the feature information of the one or more consecutive pixels, determine the channel value of each sampling point in the discrete dot matrix in the target color channel; and The sampling point whose channel value satisfies the second condition is determined as the third sampling point, and the target sampling point includes the third sampling point.
6. The method according to claim 1, characterized in that, The attribute parameters include frequency parameters and initial phase parameters; determining the attribute parameters for each target sampling point includes: For each target sampling point, a value is randomly selected from the frequency range of 1Hz to 5Hz according to a uniform distribution as the frequency parameter of the target sampling point; For each target sampling point, a value is randomly selected from the phase range of 0-2π according to a uniform distribution as the initial phase parameter of the target sampling point; Among them, the frequency parameters and initial phase parameters of different target sampling points are independent of each other and uncorrelated.
7. The method according to claim 1, characterized in that, The step of obtaining the rendering parameters for each frame in the sequence frame corresponding to each target sampling point based on the attribute parameters of each target sampling point includes: Determine the time information corresponding to each frame in the sequence frames; Based on the time information and the attribute parameters, the rendering parameters corresponding to each frame for each target sampling point are determined. The rendering parameters include at least one of rendering radius, transparency, and glow intensity.
8. The method according to claim 7, characterized in that, Based on the time information and the attribute parameters, the rendering radius of each target sampling point corresponding to each frame is determined, including: Determine the maximum and minimum rendering radius for each of the target sampling points; Based on the maximum rendering radius, the minimum rendering radius, the time information, and the attribute parameters, the rendering radius of each target sampling point corresponding to each frame is determined.
9. The method according to claim 7, characterized in that, The step of determining the rendering radius of each target sampling point for each frame based on the time information and the attribute parameters includes: The rendering parameter determination model is obtained, wherein the rendering parameter determination model represents the mapping relationship between the time information, the attribute parameters, and the rendering radius; and Based on the time information and the attribute parameters, the rendering parameters are determined using the rendering parameters to determine the model.
10. The method according to claim 9, characterized in that, The rendering parameter determination model is constructed based on a continuous periodic function, in which the time information and the attribute parameters are independent variables, and the rendering parameters are dependent variables.
11. The method according to claim 10, characterized in that, The continuous periodic function is a sine function, a cosine function, a trigonometric function, or Berlin noise.
12. The method according to claim 10, characterized in that, The rendering radius is smaller than the step size for sampling the reference image.
13. The method according to claim 10, characterized in that, The rendering radius is greater than the minimum point diameter and less than the maximum point diameter, wherein the maximum point diameter is determined based on the step size of sampling the reference image.
14. The method according to claim 7, characterized in that, The glow intensity increases when the rendering radius of the same target sampling point increases over time, and decreases when the rendering radius of the same target sampling point decreases over time.
15. The method according to claim 7, characterized in that, The step of determining the rendering parameters for each frame corresponding to each target sampling point based on the time information and the attribute parameters includes: Based on the time information and the attribute parameters, a shared factor is determined for each target sampling point. This shared factor characterizes the time-varying coefficients of the rendering radius, transparency, and glow intensity. The shared factor changes periodically and continuously over time. The rendering radius, transparency, and glow intensity are determined based on the shared factor.
16. The method according to claim 1, characterized in that, The step of obtaining the rendering parameters for each frame in the sequence frame corresponding to each target sampling point based on the attribute parameters of each target sampling point includes: Get the preset frame rate and preset frame count; The time step between two adjacent frames is determined based on the preset frame rate, and the time step is equal to the reciprocal of the preset frame rate. Based on the time step, a number of discrete moments equal to the preset number of frames are obtained; Based on the attribute parameters of each target sampling point and the multiple discrete time points, the rendering parameters of each frame in the sequence frames corresponding to each target sampling point are obtained.
17. The method according to claim 1, characterized in that, The method further includes: Based on the user's input instructions, the sampling step size and point diameter ratio coefficient are determined.
18. A raster image processing system, characterized in that, The system includes: The first acquisition module is used to acquire the reference image; The first determining module is used to determine target sampling points based on the reference image, wherein each target sampling point includes feature information of one or more consecutive pixels in the reference image; The second determining module is used to determine the attribute parameters of each target sampling point among the plurality of target sampling points; The second acquisition module is used to obtain the rendering parameters of each frame in the sequence of frames corresponding to each target sampling point based on the attribute parameters of each target sampling point, wherein the attribute parameters are used to represent the rate of change of the rendering parameters of each target sampling point and / or the size of the rendering parameters of each target sampling point in the initial frame of the sequence of frames; and The rendering module is used to render each target sampling point according to the rendering parameters corresponding to each frame of each target sampling point, and generate each frame in the sequence of frames.
19. A raster image processing system, comprising a processor, the processor being configured to perform the raster image processing method as described in any one of claims 1-17.
20. A computer-readable storage medium storing computer instructions, wherein when a computer reads the computer instructions in the storage medium, the computer executes the raster image processing method as described in any one of claims 1-17.
