Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for lossless amplification of irregular picture based on cocos2dx

An irregular and picture-based technology, applied in the computer field, can solve the problems of irregular pictures that cannot be stretched and zoomed in, stretching ratio distortion, etc.

Pending Publication Date: 2022-05-27
宝宝巴士股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Currently, cocos2dx adopts the method of undistorting and enlarging images by using Jiugongge sprites to stretch images. The principle behind it is to cut the original texture resource into 9 parts, keep 4 corners without deformation, and stretch 4 sides in one direction (that is, 4 corners The sides between the two sides, such as the upper side is only stretched horizontally, the left side is only stretched vertically), and the middle part is bidirectionally stretched (that is, the middle part of Jiugongge, stretched horizontally and vertically at the same time but the stretching ratio is not necessarily the same), the The disadvantage of the method is that it is only suitable for rectangular regular pictures, and cannot be stretched and enlarged for irregular pictures, and it will still be distorted when the stretching factor is too large

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for lossless amplification of irregular picture based on cocos2dx
  • Method and device for lossless amplification of irregular picture based on cocos2dx

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Please refer to Figure 1 , a method of non-destructive enlargement of irregular pictures based on cocos2dx, including steps:

[0027] S1. Obtain the irregular original image to be processed in cocos2dx for directed distance field processing, and obtain the processed image;

[0028] The processed image is an SDF image.

[0029] Specifically, the information stored in the normal picture is color information, and after the directed distance field processing, the picture is stored as distance information, and the distance information is expressed as the distance from each point in the irregular picture to the inside of the irregular picture, that is, the picture becomes a vector map, and the processed picture is a solid color picture.

[0030] Because the picture is a solid color picture, there is no need to store the picture color information, which is smaller than the original picture and saves a lot of memory resources.

[0031] S2, according to the distance information of eac...

Embodiment 2

[0040] Please refer to Figure 2 , based on cocos2dx lossless enlargement of the irregular picture apparatus 1, comprising memory 2, processor 3 and stored on memory 2 and may run on the processor 3 computer program, the processor 3 implements the various steps in Example I when executing the program.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

According to the method and the device for lossless amplification of the irregular picture based on the cocos2dx, the to-be-processed irregular original picture is acquired in the cocos2dx, and directed distance field processing is performed to obtain the processed picture; performing interpolation calculation according to the distance information of each pixel point in the processed picture to generate an interpolated picture; and amplifying the interpolated picture to obtain a lossless amplified picture, so that lossless amplification of the irregular picture is realized, and the picture can be amplified infinitely.

Description

Technical field [0001] The present invention relates to the field of computer technology, particularly to a method and apparatus for non-destructive enlargement of irregular pictures based on cocos2dx. Background [0002] At present, the undeliverorized enlargement method used in cocos2dx is to use the nine-square grid genie to stretch the picture, the principle behind it is to cut the original texture resource into 9 parts, keep the 4 corners without deformation, stretch 4 edges in one direction (that is, the edges between the two corners of the 4 corners, such as the upper side only do horizontal stretching, the left side only does longitudinal stretching), the middle part of the biaxially stretched (that is, the middle part of the nine-square grid, horizontal and longitudinal stretches at the same time but the stretching ratio is not necessarily the same), the disadvantage of this method is that it is only suitable for rectangular regular pictures. It is not possible to stretc...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06T3/40
CPCG06T3/4007
Inventor 黄新伟唐光宇卢学明闫乃永
Owner 宝宝巴士股份有限公司