[go: up one dir, main page]

WO2019006999A1 - Procédé de génération de reflet appliqué à une télévision android, support d'informations, dispositif et système - Google Patents

Procédé de génération de reflet appliqué à une télévision android, support d'informations, dispositif et système Download PDF

Info

Publication number
WO2019006999A1
WO2019006999A1 PCT/CN2017/117368 CN2017117368W WO2019006999A1 WO 2019006999 A1 WO2019006999 A1 WO 2019006999A1 CN 2017117368 W CN2017117368 W CN 2017117368W WO 2019006999 A1 WO2019006999 A1 WO 2019006999A1
Authority
WO
WIPO (PCT)
Prior art keywords
reflection
picture
height
value
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/117368
Other languages
English (en)
Chinese (zh)
Inventor
尹成
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Publication of WO2019006999A1 publication Critical patent/WO2019006999A1/fr
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the present invention relates to the field of Android TV applications, and in particular, to a method, a storage medium, a device and a system for generating a reflection for an Android TV.
  • Reflection is very common in the Android UI effect. Because the reflection makes the display effect more natural and more stereoscopic, the reflection effect is usually added in the position where the UI interaction is more prominent, so as to achieve the purpose of highlighting the core content of the layout.
  • the reflection effect is achieved by rotating the original image with the Z axis of the vertical screen as the central axis by 180°, then performing the height cropping and RGB gradation adjustment to generate a reflection image, and finally stitching the head and tail with the original image.
  • ImageView does not have a multiplexing mechanism for the reflection image. Each time you repaint (invalidate), you need to create a reflection resource repeatedly, which is inefficient.
  • the reflection generation mechanism of the original image and the reflection image there are advantages and disadvantages in the reflection generation mechanism of the original image and the reflection image.
  • the advantages are as follows: (1) the generation of the reflection image and the original image segmentation, which have no effect on the authenticity of the original image; (2) use The RGB progressive adjustment mode adjusts the reflection generated by the reflection image to be used across platforms.
  • its shortcomings are: (1) the smoothness of the connection between the reflection image and the original image is difficult to handle, especially the variety of resolution caused by Android fragmentation, the large-area adaptation is cumbersome and complicated, and the effects of different models are obviously different, affecting Iterative update; (2) The reflection is spliced and spliced, and the processing efficiency is low. It is suitable for the reflection to generate the global use scenario. If there is repeated refresh and repeated creation of the reflection, the performance will be affected, and the processed image memory is too large. Perform compression processing.
  • the scheme adopts the original map extension based on Cavas to draw the reflection technique, solves the problem of the smoothness of the original image and the reflection, and adds the reflection buffer pool to solve the performance problem caused by the reflection redraw.
  • an object of the present invention is to provide a reflection generation method for an Android TV that can solve the problem of smoothness of convergence between an original picture and a reflection picture, and can solve the performance problem caused by reflection redraw.
  • a reflection generation method for an Android TV comprising the following steps:
  • the cached reflection picture is read from the reflection buffer pool to complete the redrawing of the reflection picture.
  • step S1 further includes the step of turning off the pre-rendering function of the ImageView.
  • the Least Recently Used cache algorithm is used to construct the reflection buffer pool in step S2.
  • the data structure container of the reflection buffer pool is LinkedHashMap, and the calculation formula of the buffer capacity of the data structure container of the buffer pool is:
  • SIZE cache is the final cache size
  • maxMemery is the maximum memory value of the application runtime
  • ByteCount is the maximum memory occupancy value of a single picture
  • minElement is the minimum capacity value defined by the Least Recently Used algorithm.
  • the atomic wrapping class is used to perform atomic wrapping on the linear rendering of the brush in step S6.
  • the reflection picture is drawn by the path drawing method or the matrix drawing method in step S6.
  • the drawing path is fitted according to the pixel coordinate value of the reflection, and then the path value is read by using RectF, and the path value is directly read from the RectF when drawing, and the completion is completed.
  • the drawing of the reflection picture is
  • the reflection generating method further includes the step of cleaning the reflection buffer pool.
  • the present invention also provides a storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
  • the present invention also provides an apparatus comprising a memory, a processor, and a computer program stored on the memory and running on the processor, the processor implementing the steps of the method when the computer program is executed.
  • a reflection generating system for an Android TV comprising:
  • a drawing module for creating an original bitmap, converting the original bitmap into an RGB color value matrix, and setting a conversion mode of the RGB color value matrix to a vertical extension or offset mode, the drawing module also according to the original bit
  • the drawing creates a canvas, and the matrix vector of the RGB color value matrix and the canvas extend in the same direction in the positive direction of the height direction, and the height of the extension is the sum of the height value of the reflection and the height value of the joint, and then on the extended canvas.
  • a cache module for caching a reflection image drawn by the drawing module
  • the module is called, which is used to read the cached reflection picture from the cache module when it is necessary to redraw the reflection picture.
  • the method for generating a reflection for an Android TV first performs an extension process on a matrix vector and a canvas of an RGB color value matrix, and after extending the original image and the reflection image in a subsequent step, the two are Becoming a whole, there is no pixel gap in the middle, which is a good solution to the smoothness problem.
  • the reflection buffer pool is built using the LRU (Least Recently Used) cache algorithm.
  • the calculation of the cache capacity is dynamically calculated according to the memory of the device application runtime, avoiding the memory overload or memory overflow caused by initializing the fixed value. .
  • the reflection picture is added to the reflection buffer pool mechanism based on the LRU cache algorithm. If the reflection picture needs to be redrawn, the pre-cached reflection picture is directly read from the reflection buffer pool, and the reset canvas layer is notified to complete the weight. Drawing, the efficiency of repeated drawing or over-drawing reflections is more efficient and reasonable than conventional methods.
  • FIG. 1 is a flowchart of a method for generating a reflection of an Android TV according to an embodiment of the present invention
  • FIG. 2 is a block diagram of a device connection in an embodiment of the present invention.
  • an embodiment of the present invention provides a method for generating a reflection for an Android TV, the method comprising the following steps:
  • Drawing a reflection causes the resulting bitmapped height to exceed the height of the original ImageView, so you need to set the height of the ImageView to a height-adjustable mode in advance, setting clipToPadding to an unavailable state. In order to prevent overlapping of the drawn layers, you also need to turn off the pre-rendering of ImageView.
  • the original bitmap needs to be converted into a 3x3 RGB color value matrix, and the conversion mode of the RGB color value matrix is set to the vertical extension or offset mode.
  • the problem of smoothness of the original picture and the reflection picture is that there is a pixel gap between the original picture and the reflection picture, because the two are isolated and not a whole.
  • the matrix vector of the RGB color value matrix and the canvas are first extended.
  • the method of extending the original image and the reflected image is used, and then the two become a whole, and there is no pixel gap in the middle.
  • the use of extended drawing can solve the smoothness problem very well.
  • the embodiment of the present invention constructs a reflection buffer pool BitmapMemeryCache before drawing the reflection picture, and the reflection picture is filled into the buffer pool after being completed, and is to be read directly from the reflection buffer pool after subsequent re-rendering. Take the cached data without repeating the canvas initialization.
  • the reflection buffer pool is constructed by using the LRU (Least Recently Used) cache algorithm.
  • the data structure container used by the cache is a LinkedHashMap (the key is the MD5 value of the original image, and the value Value is the bitmap image resource Bitmap): LinkedHashMap ⁇ MD5 , Bitmap>.
  • the hash table and link list implementation of the Map interface has a predictable iteration order. This implementation differs from HashMap in that it maintains a double-linked list that runs on all entries. This list of links defines the iteration order, which is usually the sequential reflection of the key inserted into the map.
  • SIZE cache is the final cache size
  • maxMemery is the maximum memory value of the application runtime
  • ByteCount is the maximum memory occupancy value of a single picture
  • minElement is the minimum capacity value defined by the Least Recently Used algorithm.
  • the brush To prevent mosaic effects when drawing reflections, the brush needs to turn off Anti-aliasing AntiAlias.
  • the brush draws a reflection on the canvas into two phases.
  • the first phase is to draw the original image.
  • the state of this phase is STATE Orgin , and the brush's ARGB progressive value LinearGradient is the system default:
  • the second stage is to draw a reflection picture.
  • the state of this stage is STATE Reflect .
  • the initial and intermediate Shard values of the ARGB progressive value of the brush in this stage will be dimmed, and the Alpha transparent channel is set in the range of 0.1 to 0.9.
  • the embodiment of the present invention uses the atomic packaging class Atomic to atomize the LinearGradient. If concurrent access occurs, the brush is maintained as the first access state, and when the latest access is completed, the LinearGradient is performed. The unpacking operation releases the attribute access permission to switch the Paint state.
  • the anti-aliasing effect is turned off in the Android system 4.3 (API18) and the Android system 4.4 (API19) and above, which may result in a progressive value loss of the reflection drawing. Therefore, in order to prevent this problem, the embodiment of the present invention corresponds to Different Android system versions can use the path drawing method or the matrix drawing method to draw the reflection picture.
  • RectF is a structure that stores View coordinate information (top, bottom, left, and right) in floating point data. RectF maintains the progress loss before and after drawing or during drawing.
  • the Vector Vector drawing method is also a matrix drawing method. It converts the matrix data into a vector, and the Vector transposes according to the ARGB matrix determinant of the bitmap, so the anti-aliasing problem can be effectively solved.
  • the cached reflection picture is read from the reflection buffer pool to complete the redrawing of the reflection picture.
  • the reflection picture is added to the reflection buffer pool mechanism based on the LRU cache algorithm, if the reflection picture needs to be redrawn, the pre-cached reflection picture is directly read from the reflection buffer pool, and the reset canvas is notified.
  • the layer is redrawed so that the efficiency of repeating or over-drawing the reflection is more efficient and reasonable than the conventional method.
  • the embodiment of the present invention unbinds the window in the ImageView. Invisible state will do the object recovery operation Bitmap.recycle, and the LRU object will also do the reference forced release operation to prevent memory overflow MemmeryLeak.
  • the embodiment of the present invention first performs the extension processing on the matrix vector and the canvas of the RGB color value matrix. After the method of extending the original image and the reflected image in the subsequent steps, the two become a whole, and the middle does not There is a pixel gap, which is a good solution to the smoothness problem.
  • the reflection buffer pool is built using the LRU (Least Recently Used) cache algorithm. The calculation of the cache capacity is dynamically calculated according to the runtime of the device application runtime, avoiding the memory overrun or memory overflow caused by initializing the fixed value. The reflection picture is added to the reflection buffer pool mechanism based on the LRU cache algorithm.
  • the embodiment of the present invention further provides a storage medium on which a computer program is stored, and when the computer program is executed by the processor, the Android TV for the above embodiment can be implemented.
  • the steps of the reflection generation method includes a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk, and the like, which can store program codes. medium.
  • an embodiment of the present invention further provides an apparatus, including a memory, a processor, and a computer program stored on the processor and operable on the processor.
  • the processor executes the computer program, the steps of the reflection generation method for the Android TV in the above embodiment may be implemented.
  • the embodiment of the invention further provides a reflection generating system for an Android TV, which comprises a drawing module, a cache module and a calling module.
  • the matrix vector of the RGB color value matrix and the canvas extend in the same direction in the positive direction of the height direction
  • the height of the extension is the sum of the height value of the reflection and the height value of the joint, and then is drawn on the canvas after the extension.
  • a cache module for caching a reflection image drawn by the drawing module
  • the module is called, which is used to read the cached reflection picture from the cache module when it is necessary to redraw the reflection picture.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

La présente invention concerne le domaine de l'application de télévision Android et concerne un procédé de génération de reflet appliqué à une télévision Android, un support d'informations, un dispositif et un système. Le procédé comprend les étapes suivantes consistant : à régler la taille de la Vue d'Image en un mode pouvant être réglé, à créer une table de bits et à la convertir en matrice de valeur de couleur RVB (S1), et à régler le mode de conversion de la matrice en un mode d'extension longitudinale ou un mode à décalage ; à créer une toile, à étendre les vecteurs de matrice de la matrice de valeur de couleur RVB et la toile de la même manière le long d'une direction en avant de la direction en hauteur, et la taille d'extension est la somme de la valeur de taille d'un reflet et la valeur de taille d'un raccord ; à développer une réserve de mémoire cache (S3) ; à dessiner une image originale (S4) ; à réinitialiser un pinceau, et à régler une valeur de changement graduel RVB du pinceau (S5) ; à dessiner une image de reflet et à l'ajouter dans la réserve de mémoire cache de reflet (S6) ; et, lorsque l'image de reflet doit être dessinée à nouveau, à lire l'image de reflet en mémoire cache à partir de la réserve de mémoire cache de reflet pour dessiner à nouveau l'image de reflet (S7). Le procédé résout le problème concernant la régularité de raccord entre l'image originale et de l'image de reflet et le problème concernant les performances provoqué lorsque le reflet est dessiné à nouveau.
PCT/CN2017/117368 2017-07-01 2017-12-20 Procédé de génération de reflet appliqué à une télévision android, support d'informations, dispositif et système Ceased WO2019006999A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710528340.5A CN107492131B (zh) 2017-07-01 2017-07-01 用于安卓电视的倒影生成方法、存储介质、设备及系统
CN201710528340.5 2017-07-01

Publications (1)

Publication Number Publication Date
WO2019006999A1 true WO2019006999A1 (fr) 2019-01-10

Family

ID=60644427

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/117368 Ceased WO2019006999A1 (fr) 2017-07-01 2017-12-20 Procédé de génération de reflet appliqué à une télévision android, support d'informations, dispositif et système

Country Status (2)

Country Link
CN (1) CN107492131B (fr)
WO (1) WO2019006999A1 (fr)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492131B (zh) * 2017-07-01 2020-06-12 武汉斗鱼网络科技有限公司 用于安卓电视的倒影生成方法、存储介质、设备及系统
CN110737476B (zh) * 2018-07-18 2021-08-20 华为技术有限公司 一种终端重启方法及装置
CN112346613A (zh) * 2020-10-29 2021-02-09 深圳Tcl新技术有限公司 图标显示效果的控制方法、终端及计算机可读存储介质
CN112837255A (zh) * 2021-04-13 2021-05-25 上海影卓信息科技有限公司 在图像中添加浮世绘海浪倒影的方法和系统
CN114549704A (zh) * 2022-01-26 2022-05-27 惠州华阳通用电子有限公司 一种动画进度条的显示方法及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394488A (zh) * 2008-08-28 2009-03-25 新奥特(北京)视频技术有限公司 一种基于模板的字幕渲染效率的统计方法
CN101470893A (zh) * 2007-12-26 2009-07-01 中国科学院声学研究所 一种基于位图缓存的矢量图形显示的加速方法
CN101662597A (zh) * 2008-08-28 2010-03-03 新奥特(北京)视频技术有限公司 一种基于模板的字幕渲染效率的统计系统
US20130021361A1 (en) * 2010-04-21 2013-01-24 Zte Corporation Method and device for rendering user interface font
CN107492131A (zh) * 2017-07-01 2017-12-19 武汉斗鱼网络科技有限公司 用于安卓电视的倒影生成方法、存储介质、设备及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003094253A2 (fr) * 2002-05-03 2003-11-13 Luxell Technologies Inc. Film sombre pour dispositif electroluminescent
JP4372700B2 (ja) * 2005-02-17 2009-11-25 シャープ株式会社 画像形成装置、画像形成装置の制御プログラム及び記録媒体
US7583780B2 (en) * 2006-06-22 2009-09-01 General Electric Company Systems and methods for improving a resolution of an image
US20100013959A1 (en) * 2008-07-17 2010-01-21 Barinder Singh Rai Efficient Generation Of A Reflection Effect

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470893A (zh) * 2007-12-26 2009-07-01 中国科学院声学研究所 一种基于位图缓存的矢量图形显示的加速方法
CN101394488A (zh) * 2008-08-28 2009-03-25 新奥特(北京)视频技术有限公司 一种基于模板的字幕渲染效率的统计方法
CN101662597A (zh) * 2008-08-28 2010-03-03 新奥特(北京)视频技术有限公司 一种基于模板的字幕渲染效率的统计系统
US20130021361A1 (en) * 2010-04-21 2013-01-24 Zte Corporation Method and device for rendering user interface font
CN107492131A (zh) * 2017-07-01 2017-12-19 武汉斗鱼网络科技有限公司 用于安卓电视的倒影生成方法、存储介质、设备及系统

Also Published As

Publication number Publication date
CN107492131B (zh) 2020-06-12
CN107492131A (zh) 2017-12-19

Similar Documents

Publication Publication Date Title
WO2019006999A1 (fr) Procédé de génération de reflet appliqué à une télévision android, support d'informations, dispositif et système
AU2010313045B2 (en) Image file generation device, image processing device, image file generation method, image processing method, and data structure for image files
CN103793893B (zh) 采用限缓冲区处理的世界和屏幕空间管线间基元重新排序
US9715750B2 (en) System and method for layering using tile-based renderers
US9129581B2 (en) Method and apparatus for displaying images
US9905036B2 (en) Graphics processing unit for adjusting level-of-detail, method of operating the same, and devices including the same
KR102454893B1 (ko) 그래픽 프로세싱 장치 및 그래픽 프로세싱 장치의 동작 방법
JP5368254B2 (ja) 画像ファイル生成装置、画像処理装置、画像ファイル生成方法、画像処理方法、および画像ファイルのデータ構造
US9811940B2 (en) Bandwidth reduction using vertex shader
JP2017505476A (ja) タイルベースのアーキテクチャ上での最適化されたマルチパスレンダリング
KR102055467B1 (ko) 가상 서피스 할당 기법
US9235925B2 (en) Virtual surface rendering
CN105335364B (zh) 一种实现视图滑动显示加速的方法及装置
US20110069065A1 (en) Image processing apparatus, computer readable medium and method thereof
CN114998087B (zh) 渲染方法及装置
JP5296656B2 (ja) 画像処理装置および画像処理方法
JP2006209108A (ja) フォントキャッシュとメタフォント
CN103650004B (zh) 图像处理装置、图像处理方法及集成电路
CN120198562A (zh) 一种仿真场景渲染优化方法
US9019292B2 (en) Reordering graph execution for processing optimization
EP4379647A1 (fr) Procédé de sélection de format de rendu et dispositif associé
US7295210B2 (en) Bin pointer and state caching apparatus and method
KR20230107554A (ko) 컴퓨트 작업로드들의 래스터화를 위한 방법들 및 장치
US9251557B2 (en) System, method, and computer program product for recovering from a memory underflow condition associated with generating video signals
CN117573048A (zh) 一种文档水印自动生成方法及终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17916557

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17916557

Country of ref document: EP

Kind code of ref document: A1