CN104183228B - Layer acquisition method, data acquisition device and layer acquisition arrangement method - Google Patents
Layer acquisition method, data acquisition device and layer acquisition arrangement method Download PDFInfo
- Publication number
- CN104183228B CN104183228B CN201310195459.7A CN201310195459A CN104183228B CN 104183228 B CN104183228 B CN 104183228B CN 201310195459 A CN201310195459 A CN 201310195459A CN 104183228 B CN104183228 B CN 104183228B
- Authority
- CN
- China
- Prior art keywords
- horizontal
- vertical
- layer
- layers
- data
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000000605 extraction Methods 0.000 claims description 12
- 238000001514 detection method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 19
- 238000013481 data capture Methods 0.000 description 11
- 101100172874 Caenorhabditis elegans sec-3 gene Proteins 0.000 description 8
- 239000000284 extract Substances 0.000 description 5
- 238000011068 loading method Methods 0.000 description 5
- 101100172879 Caenorhabditis elegans sec-5 gene Proteins 0.000 description 4
- 101100172886 Caenorhabditis elegans sec-6 gene Proteins 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 230000003068 static effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Processing Or Creating Images (AREA)
Abstract
Description
技术领域technical field
本发明是关于图层撷取方法、数据撷取装置与图层撷取安排方法,尤其是关于可节省频宽及/或运作效能的图层撷取方法、数据撷取装置与图层撷取安排方法。The present invention relates to a layer capture method, a data capture device, and a layer capture arrangement method, in particular to a layer capture method, a data capture device, and a layer capture method that can save bandwidth and/or operational performance Arrangement method.
背景技术Background technique
在日常生活中,我们会接触到许多显示装置。举例而言,我们会观赏电视、使用移动电话通讯、使用平板电脑上网等。随着多媒体显示技术的进步以及商业模式与收视习惯的改变,同一显示画面可能会同时显示许多不同来源的影像及讯息,例如一显示画面除显示一动态或静态图像背景外,亦同时显示了动态或静态的字幕、图示、广告、或操作介面等。由于该些影像及讯息分属不同来源,因此我们需要一数据撷取装置来从该些不同来源撷取所需的内容,然后再依据一预设的显示顺序于该图像背景上迭加该些不同来源的影像及讯息,最后于一显示面板上显示迭加后的画面。In our daily life, we come into contact with many display devices. For example, we watch TV, communicate with mobile phones, surf the Internet with tablets, etc. With the advancement of multimedia display technology and changes in business models and viewing habits, the same display screen may display images and information from many different sources at the same time. For example, a display screen not only displays a dynamic or static image background, but also displays dynamic Or static subtitles, icons, advertisements, or operation interfaces, etc. Since these images and information belong to different sources, we need a data capture device to capture the required content from these different sources, and then superimpose these images on the background of the image according to a preset display order. Images and information from different sources are finally displayed on a display panel as a superimposed image.
然而,如图1所示,假如我们想要于一背景画面110上显示一非矩形图示122,则目前技术会依据该非矩形图式的横向及纵向起始位置(x_st,y_st)与结束位置(x_end,y_end)来载入一相对应的矩形图式120(包含该待显示的非矩形图式122以及无需显示的不必要资讯124),以迭加于该背景画面110上以显示,如此一来,会浪费许多频宽于载入不需要的资讯并降低效能;另外,如图2所示,假如我们想要于一背景画面210上显示多个重迭的图示例如一第一矩形图式220及一第二矩形图式230,则目前技术会依据显示顺序较低的第一矩形图式220的横向及纵向起始位置(x_st_1,y_st_1)与结束位置(x_end_1,y_end_1)来载入图式内容以迭加于该背景画面210上,接着再依据显示顺序较高的第二矩形图式230的横向及纵向起始位置(x_st_2,y_st_2)与结束位置(x_end_2,y_end_2)来载入图式内容以迭加于第一矩形图式220及该背景画面210上,由于该二矩形图式220、230高度重迭,因此显示顺序较低的第一矩形图式220的大部分内容都不会被显示,该些不会被显示的数据的载入会造成频宽的浪费及效能的降低;再者,请继续参阅图2,假如我们欲以像素为单位来判断该背景画面210上的每个像素位置是否需用来显示一其它图式来源的像素时,则目前技术会将每个像素位置的横向及纵向位置(x,y)分别与该二矩形图式220、230的横向与纵向起始位置(x_st_1,y_st_1)、(x_st_2,y_st_2)及横向与纵向结束位置(x_end_1,y_end_1)、(x_end_2,y_end_2)来比较,藉此判断每一像素的位置(x,y)是否落入该二矩形图式220、230所涵盖的范围,进而确定该位置(x,y)是否应显示该二矩形图式220、230所包含的内容,然而,由于此一作法以像素为单位来进行比较,因此会耗费许多运算效能及硬件成本,尤其当来源影像的数目增加时,比较次数会相对应地大幅增加,效能及成本的消耗也会更加可观。However, as shown in FIG. 1, if we want to display a non-rectangular icon 122 on a background image 110, the current technology will be based on the horizontal and vertical start positions (x_st, y_st) and end positions of the non-rectangular graphic. position (x_end, y_end) to load a corresponding rectangular pattern 120 (including the non-rectangular pattern 122 to be displayed and unnecessary information 124 not to be displayed), so as to be superimposed on the background image 110 for display, In this way, a lot of bandwidth will be wasted in loading unnecessary information and reducing performance; in addition, as shown in FIG. 2, if we want to display multiple overlapping icons such as a first rectangular diagram 220 and a second rectangular diagram 230, the current technology will base on the horizontal and vertical start position (x_st_1, y_st_1) and end position (x_end_1, y_end_1) of the first rectangular diagram 220 with a lower display order. Load the graphic content to be superimposed on the background image 210, and then according to the horizontal and vertical start position (x_st_2, y_st_2) and end position (x_end_2, y_end_2) of the second rectangular graphic 230 with a higher display order The content of the graphic is loaded to be superimposed on the first rectangular graphic 220 and the background image 210. Since the two rectangular graphic 220, 230 are highly overlapped, most of the lower first rectangular graphic 220 is displayed. The content will not be displayed, and the loading of the data that will not be displayed will cause a waste of bandwidth and a decrease in performance; moreover, please continue to refer to Figure 2, if we want to judge the background image in pixels Whether each pixel position on 210 needs to be used to display a pixel from another pattern source, then the current technology will compare the horizontal and vertical positions (x, y) of each pixel position with the two rectangular patterns 220, 230 The horizontal and vertical start positions (x_st_1, y_st_1), (x_st_2, y_st_2) and the horizontal and vertical end positions (x_end_1, y_end_1), (x_end_2, y_end_2) are compared to determine the position of each pixel (x, y ) falls within the scope covered by the two rectangular diagrams 220, 230, and then determine whether the position (x, y) should display the content contained in the two rectangular diagrams 220, 230, however, because this approach uses pixels Therefore, it will consume a lot of computing performance and hardware cost. Especially when the number of source images increases, the number of comparisons will correspondingly increase significantly, and the consumption of performance and cost will be even more considerable.
由于上述先前技术存在频宽浪费及效能不彰等问题,加上多重影像显示的需求逐日增加,因此本技术领域甚为需要一高效率的解决方案以克服先前技术的问题。Due to the problems of bandwidth waste and poor performance in the above-mentioned prior art, and the demand for multiple image display is increasing day by day, there is a great need in the art for a high-efficiency solution to overcome the problems of the prior art.
发明内容Contents of the invention
鉴于上述,本发明的一目的在于提供一种图层撷取方法、一种数据撷取装置与一种图层撷取安排方法,以解决先前技术的问题。In view of the above, an object of the present invention is to provide a layer capture method, a data capture device and a layer capture arrangement method to solve the problems of the prior art.
本发明另揭示了一种图层撷取方法,供一数据撷取装置自N个图层撷取数据以显示一画面,其中N为正整数,且该N个图层的每一图层包含一水平起点、一水平终点、一垂直起点以及一垂直终点,该方法的一实施例包含下列步骤:依据该些水平起点、该些水平终点、该些垂直起点以及该些垂直终点将该画面区分为多个区域,其中该些区域分别对应该些图层的其中之一;以及于显示该画面时分别自该些区域所对应的图层撷取数据。The present invention also discloses a layer extraction method for a data acquisition device to extract data from N layers to display a picture, wherein N is a positive integer, and each layer of the N layers includes A horizontal starting point, a horizontal ending point, a vertical starting point and a vertical ending point, an embodiment of the method includes the following steps: distinguishing the picture according to the horizontal starting points, the horizontal ending points, the vertical starting points and the vertical ending points It is a plurality of regions, wherein the regions respectively correspond to one of the layers; and when the screen is displayed, data is respectively fetched from the layers corresponding to the regions.
本发明亦揭示了一种数据撷取装置,用来自N个图层撷取数据以显示一画面,其中N为正整数,该N个图层储存于一储存装置中,且该N个图层的每一图层包含一水平起点、一水平终点、一垂直起点以及一垂直终点,该装置的一实施例包含:一处理器,用来耦接该储存装置以执行多个步骤。所述多个步骤包含:依据该N个水平起点、该N个水平终点、该N个垂直起点以及该N个垂直终点将该画面区分为多个区域,其中该些区域分别对应该些图层的其中之一;以及于显示该画面时分别自该些区域所对应的图层撷取数据。The present invention also discloses a data acquisition device for displaying a picture by acquiring data from N layers, where N is a positive integer, the N layers are stored in a storage device, and the N layers Each layer includes a horizontal start point, a horizontal end point, a vertical start point, and a vertical end point. An embodiment of the device includes: a processor coupled to the storage device to perform a plurality of steps. The multiple steps include: dividing the screen into a plurality of regions according to the N horizontal starting points, the N horizontal ending points, the N vertical starting points and the N vertical ending points, wherein the regions correspond to the layers respectively one of them; and when the screen is displayed, the data is respectively fetched from the layers corresponding to the areas.
本发明揭示了一种图层撷取安排方法,供一数据撷取装置自N个图层撷取数据以显示一画面,适合藉由一储存于存储器中的软件来实现,并藉由该数据撷取装置来执行,其中N为正整数,且该N个图层的每一图层包含一水平起点、一水平终点、一垂直起点以及一垂直终点,该方法的一实施例包含下列步骤:依据该些水平起点、该些水平终点、该些垂直起点以及该些垂直终点将该画面区分为多个区域,其中该些区域分别对应该些图层的其中之一,且该些区域与该些图层的对应关系用来供该数据撷取装置于显示该画面时分别自该些区域所对应的图层撷取数据。The present invention discloses a method for arranging layer retrieval for a data retrieval device to retrieve data from N layers to display a picture, which is suitable for realization by a software stored in a memory, and by using the data Extracting device to execute, wherein N is a positive integer, and each layer of the N layers includes a horizontal starting point, a horizontal ending point, a vertical starting point and a vertical ending point, an embodiment of the method includes the following steps: According to the horizontal starting points, the horizontal ending points, the vertical starting points and the vertical ending points, the screen is divided into multiple regions, wherein the regions correspond to one of the layers respectively, and the regions are related to the The corresponding relationship of these layers is used for the data acquisition device to respectively acquire data from the layers corresponding to these areas when displaying the picture.
有关本发明的特征、实作与功效,兹配合附图作较佳实施例详细说明如下。Regarding the characteristics, implementation and effects of the present invention, preferred embodiments are described in detail below in conjunction with the accompanying drawings.
附图说明Description of drawings
图1为先前技术的图层载入方式的示意图;FIG. 1 is a schematic diagram of a layer loading method in the prior art;
图2为先前技术的图层载入方式的另一示意图;Fig. 2 is another schematic diagram of the layer loading method of the prior art;
图3a为本发明的图层撷取安排方法的一实施例的示意图;FIG. 3a is a schematic diagram of an embodiment of the method for extracting and arranging layers of the present invention;
图3b为图3a的一实施范例的示意图;Fig. 3b is a schematic diagram of an implementation example of Fig. 3a;
图4a与图4b为图3b的实施例的一应用的示意图;4a and 4b are schematic diagrams of an application of the embodiment of FIG. 3b;
图5a本发明的图层撷取方法的一实施例的示意图;FIG. 5a is a schematic diagram of an embodiment of the layer extraction method of the present invention;
图5b为图5a的步骤S52的一实施范例的示意图;FIG. 5b is a schematic diagram of an implementation example of step S52 in FIG. 5a;
图6为图5b的实施例的一应用的示意图;Fig. 6 is a schematic diagram of an application of the embodiment of Fig. 5b;
图7为图5b的步骤S510的一实施变化的示意图;FIG. 7 is a schematic diagram of an implementation variation of step S510 in FIG. 5b;
图8为图5b的实施例的一实施变化的示意图;Fig. 8 is a schematic diagram of an implementation variation of the embodiment of Fig. 5b;
图9为图5b的步骤S520及S530的一实施例的示意图;及FIG. 9 is a schematic diagram of an embodiment of steps S520 and S530 of FIG. 5b; and
图10为本发明的数据撷取装置的一实施例的示意图。FIG. 10 is a schematic diagram of an embodiment of the data capture device of the present invention.
符号说明Symbol Description
110 背景画面110 background screen
120 矩形图式120 Rectangular Schema
122 非矩形图式122 Non-rectangular schema
124 不必要资讯124 Unnecessary information
210 背景画面210 background screen
220 第一矩形图式220 First rectangular schema
230 第二矩形图式230 Second rectangular schema
400 背景画面400 background image
410 第一图层410 first layer
420 第二图层420 second layer
450 L形图层450 L-shaped layers
452 矩形图层452 rectangle layers
454 矩形图层454 rectangle layers
460 长方形图层460 rectangle layer
600 背景画面600 background images
610 第一图层610 first layer
620 第二图层620 second layer
630 第三图层630 third layer
640 第四图层640 fourth layer
1010 处理器1010 processor
1020 储存装置1020 storage device
S30 依据多个水平起点、水平终点、垂直起点及垂直终点将一画面区分为多个区域,其中该些区域分别对应该些图层的其中之一,且该些区域与图层的对应关用来供一数据撷取装置于显示该画面时分别自该些区域所对应的图层撷取数据S30 Divide a screen into multiple areas according to multiple horizontal start points, horizontal end points, vertical start points, and vertical end points, wherein each of these areas corresponds to one of the layers, and the corresponding relationship between these areas and layers applies To provide a data capture device to capture data from layers corresponding to these areas when displaying the screen
S50 依据多个水平起点、水平终点、垂直起点及垂直终点将一画面区分为多个区域,其中该些区域分别对应多个图层的其中之一S50 Divide a screen into multiple areas based on multiple horizontal start points, horizontal end points, vertical start points, and vertical end points, wherein these areas correspond to one of the multiple layers
S52 于显示该画面时分别自该些区域所对应的图层撷取数据S52 Retrieve data from the layers corresponding to the areas when displaying the screen
S310 依据N个垂直起点与N个垂直终点界定N个垂直图层区间S310 Defining N vertical layer intervals according to N vertical starting points and N vertical end points
S320 依据N个水平起点与N个水平终点界定N个水平图层区间S320 Defining N horizontal layer intervals according to N horizontal start points and N horizontal end points
S330 排序该N个水平起点与该N个水平终点以得到M个水平区段及其顺序S330 Sort the N horizontal start points and the N horizontal end points to obtain M horizontal segments and their order
S510 判断一水平扫描线的垂直位置是否位于N个垂直图层区间的其中之一S510 Determine whether the vertical position of a horizontal scanning line is located in one of the N vertical layer intervals
S520 依序判断在每一水平区段中该水平扫描线的一水平位置位于N个水平图层区间的何者以产生一判断结果S520 Sequentially determine which of the N horizontal layer intervals a horizontal position of the horizontal scan line is located in in each horizontal segment to generate a determination result
S530 依据该判断结果由该N个图层的其中之一撷取数据S530 Retrieve data from one of the N layers according to the judgment result
S710 判断该水平扫描线的垂直位置是否大于该N个垂直终点的最大者S710 Determine whether the vertical position of the horizontal scanning line is greater than the maximum of the N vertical endpoints
S720 若判断该水平扫描线的垂直位置大于该N个垂直终点的最大者,进入一闲置状态S720 If it is judged that the vertical position of the horizontal scanning line is greater than the maximum of the N vertical endpoints, enter an idle state
S810 当判断该水平扫描线的垂直位置非位于该N个垂直图层区间的其中之一时,进行下一水平扫描线的判断S810 When it is judged that the vertical position of the horizontal scanning line is not located in one of the N vertical layer intervals, judge the next horizontal scanning line
S812 递增该水平扫描线的垂直位置S812 Increment the vertical position of the horizontal scan line
S814 依据递增后的该水平扫描线的垂直位置重新执行图5b的步骤S510、S520及S530S814 Re-execute steps S510, S520 and S530 in FIG. 5b according to the incremented vertical position of the horizontal scanning line
S910 判断于该M个水平区段的一第K水平区段中该水平扫描线的当前水平位置位于该N个水平图层区间的何者以产生该判断结果S910 Determine which of the N horizontal layer intervals the current horizontal position of the horizontal scan line is located in in a K-th horizontal segment of the M horizontal segments to generate the determination result
S920 依据该判断结果由该N个图层的其中之一撷取数据S920: Retrieve data from one of the N layers according to the judgment result
S930 递增该K并依序重新执行步骤S910、S920及S930直至该K等于该MS930 Increment the K and re-execute steps S910, S920 and S930 in sequence until the K is equal to the M
sec_1 第一水平区段sec_1 first horizontal section
sec_2 第二水平区段sec_2 second horizontal section
sec_3 第三水平区段sec_3 third horizontal section
sec_4 第四水平区段sec_4 fourth horizontal section
sec_5 第五水平区段sec_5 fifth horizontal section
sec_6 第六水平区段sec_6 Sixth horizontal section
sec_7 第七水平区段sec_7 seventh horizontal section
h 水平扫描线h Horizontal scan line
具体实施方式detailed description
以下说明内容的技术用语参照本技术领域的习惯用语,如本说明书对部分用语有加以说明或定义,该部分用语的解释以本说明书的说明或定义为准。The technical terms in the following explanations refer to the customary terms in this technical field. If some terms are explained or defined in this manual, the explanations or definitions of this part of the terms shall prevail.
本发明的揭示露内容包含一种图层撷取安排方法、一种图层撷取方法及一种数据撷取装置,该些方法及装置可依据一或多个图层的垂直起点与终点以及水平起点与终点来决定所欲撷取的图层的数据,进而达到一通用且有效率的图层撷取过程。本发明的方法与装置可应用于一影像处理装置,例如一电视影像处理装置、一监视器影像处理装置或一移动装置影像处理装置。在实施为可能的前提下,本技术领域具有通常知识者能够依据本发明揭露内容来选择等效的元件或步骤来实现本发明,亦即本发明的实施并不局限于本发明所揭示的实施例。再者,由于本发明的图层撷取安排方法及图层撷取方法可藉由本发明的数据撷取装置来实现,亦可能透过其它数据撷取装置来实现,因此在不影响该些方法发明的充分揭示及可实施性的前提下,以下方法发明的说明将着重于方法本身而非硬件装置的细节;类似地,本发明的数据撷取装置所包含的部分或全部元件的任一单独而言可能为已知的元件,因此,在不影响该装置发明的充分揭示及可据以实施的前提下,以下说明对于个别已知元件的细节将予以节略。The disclosed content of the present invention includes a method for layer capture arrangement, a layer capture method and a data capture device. These methods and devices can be based on the vertical start point and end point of one or more layers and The horizontal start point and end point are used to determine the data of the layer to be captured, so as to achieve a general and efficient layer capture process. The method and device of the present invention can be applied to an image processing device, such as a TV image processing device, a monitor image processing device or a mobile device image processing device. On the premise that the implementation is possible, those skilled in the art can select equivalent elements or steps to realize the present invention according to the content disclosed in the present invention, that is, the implementation of the present invention is not limited to the implementation disclosed in the present invention example. Furthermore, since the layer retrieval arrangement method and the layer retrieval method of the present invention can be realized by the data retrieval device of the present invention, and may also be realized by other data retrieval devices, these methods will not be affected. Under the premise of full disclosure and practicability of the invention, the description of the following method invention will focus on the details of the method itself rather than the hardware device; similarly, any individual part or all of the components included in the data acquisition device of the present invention Therefore, on the premise of not affecting the full disclosure and implementation of the device invention, the details of individual known components will be omitted in the following description.
请参阅图3a,其是本发明的图层撷取安排方法的一实施例的示意图,本实施例可藉由一固件来实现,该固件是指储存于存储器(例如一非挥发性存储器)中的软件,并可被一数据撷取装置读取以供该装置决定撷取N个图层(N为正整数)的至少一部分数据的手段,其中每该图层包含一水平起点、一水平终点、一垂直起点与一垂直终点。本实施例包含下列步骤:Please refer to FIG. 3a, which is a schematic diagram of an embodiment of the method for layer capture and arrangement of the present invention. This embodiment can be realized by a firmware, and the firmware is stored in a memory (such as a non-volatile memory). software, and can be read by a data capture device for the device to decide to capture at least a part of the data of N layers (N is a positive integer), wherein each layer includes a horizontal starting point and a horizontal end point , a vertical start point and a vertical end point. This embodiment includes the following steps:
步骤S30:依据该些水平起点、该些水平终点、该些垂直起点以及该些垂直终点将该画面区分为多个区域,其中,该些区域分别对应该些图层的其中之一,且该些区域与该些图层的对应关系用来供该数据撷取装置于显示该画面时分别自该些区域所对应的图层撷取数据。Step S30: Dividing the screen into a plurality of regions according to the horizontal starting points, the horizontal ending points, the vertical starting points and the vertical ending points, wherein the regions correspond to one of the layers respectively, and the The corresponding relationship between the areas and the layers is used for the data acquisition device to acquire data from the layers corresponding to the areas when displaying the picture.
另请参阅图3b,其是图3a的一实施范例的示意图,如图所示,步骤S30可包含:Please also refer to FIG. 3b, which is a schematic diagram of an implementation example in FIG. 3a. As shown in the figure, step S30 may include:
步骤S310:依据该N个垂直起点与N个垂直终点界定N个垂直图层区间,其中每个垂直图层区间对应该N个图层的其中之一,易言之,每个图层的垂直起点与终点界定出一垂直图层区间,用来定义该图层的垂直范围。举例而言,请参阅图4a,假定于一背景画面400上欲显示一第一图层410与一第二图层420(亦即图层数N等于2),且该第一图层410的垂直起点与终点分别为y_st_1与y_end_1以及该第二图层420的垂直起点与终点分别为y_st_2与y_end_2,则步骤S310将y_st_1与y_end_1之间的垂直范围定义为一第一垂直图层区间V01,并将y_st_2与y_end_2之间的垂直范围定义为一第二垂直图层区间V02;Step S310: Define N vertical layer intervals according to the N vertical starting points and N vertical end points, wherein each vertical layer interval corresponds to one of the N layers. In other words, the vertical layer interval of each layer The start point and end point define a vertical layer interval, which is used to define the vertical range of the layer. For example, referring to FIG. 4a, it is assumed that a first layer 410 and a second layer 420 are to be displayed on a background image 400 (that is, the number of layers N is equal to 2), and the first layer 410 The vertical start point and end point are y_st_1 and y_end_1 respectively and the vertical start point and end point of the second layer 420 are y_st_2 and y_end_2 respectively, then step S310 defines the vertical range between y_st_1 and y_end_1 as a first vertical layer interval V01, And define the vertical range between y_st_2 and y_end_2 as a second vertical layer interval V02;
步骤S320:依据该N个水平起点与N个水平终点界定N个水平图层区间,其中每该水平图层区间对应该N个图层的其中之一,换言之,每个图层的水平起点与终点界定出一水平图层区间,用来定义该图层的水平范围。举例而言,请参阅图4a,若该第一图层410的水平起点与终点分别为x_st_1与x_end_1以及该第二图层420的水平起点与终点分别为x_st_2与x_end_2,则步骤S320将x_st_1与x_end_1之间的水平范围定义为一第一水平图层区间H01,并将x_st_2与x_end_2之间的水平范围定义为一第二水平图层区间H02;以及Step S320: Define N horizontal layer intervals according to the N horizontal starting points and N horizontal end points, wherein each horizontal layer interval corresponds to one of the N layers, in other words, the horizontal starting point and the horizontal end point of each layer The end point defines a horizontal layer interval, which is used to define the horizontal range of the layer. For example, please refer to FIG. 4 a, if the horizontal start point and end point of the first layer 410 are x_st_1 and x_end_1 respectively and the horizontal start point and end point of the second layer 420 are x_st_2 and x_end_2 respectively, then step S320 sets x_st_1 and x_end_2 respectively. The horizontal range between x_end_1 is defined as a first horizontal layer interval H01, and the horizontal range between x_st_2 and x_end_2 is defined as a second horizontal layer interval H02; and
步骤S330:排序该N个水平起点与该N个水平终点,以得到M个水平区段并得到该M个水平区段的顺序,其中该M为正整数,且不大于(2×N-1)。举例而言,请参阅图4a,步骤S330依据该些水平起点与终点得到3个水平区段及其顺序如下:从x_st_2至x_st_1为一第一水平区段sec_1;从x_st_1至x_end_1之间为一第二水平区段sec_2;以及从x_end_1至x_end_2之间为一第三水平区段sec_3。Step S330: Sort the N horizontal start points and the N horizontal end points to obtain M horizontal segments and obtain the order of the M horizontal segments, wherein M is a positive integer and is not greater than (2×N-1 ). For example, please refer to FIG. 4a. Step S330 obtains 3 horizontal sections and their order according to the horizontal start and end points as follows: from x_st_2 to x_st_1 is a first horizontal section sec_1; from x_st_1 to x_end_1 is a first horizontal section sec_1; The second horizontal section sec_2; and a third horizontal section sec_3 between x_end_1 and x_end_2.
承上所述,图3b的步骤中,N个垂直图层区间供数据撷取装置判断一水平扫描线的垂直位置是否位于该N个垂直图层区间的其中之一,若是,此代表该水平扫描线的至少一像素的内容需从该N个图层的其中之一来撷取,此时该M个水平区段的顺序供该数据撷取装置依序判断在每该水平区段中该水平扫描线的一水平位置位于该N个水平图层区间的何者以产生一判断结果,进而供该数据撷取装置依据该判断结果从该N个图层的其中之一撷取数据。举例来说,请参阅图4a,第一及第二垂直图层区间V01、V02可依序供数据撷取装置判断一水平扫描线h的垂直位置y是否落于其间,亦即供该数据撷取装置依序进行以下比较的至少其中之一直到任一比较满足或所有比较均不满足:y_st_1≦y≦y_end_1及y_st_2≦y≦y_end_2,若上述任一比较满足,数据撷取装置即判断此水平扫描线h的至少一像素的内容需从该第一图层410或第二图层420来撷取,此时第一至第三水平区段的顺序可供数据撷取装置依序判断该水平扫描线h的一水平位置x于每个水平区段中对应该N个水平图层区间H01、H02的何者以产生前述判断结果,易言之,数据撷取装置对每个水平区段均依序进行以下比较的至少其中之一直到任一比较满足:x_st_1≦x≦x_end_1(后称式A)及x_st_2≦x≦x_end_2(后称式B),若判断结果指出该水平位置x于第一水平区段sec_1中对应第二图层420(亦即当x介于x_st_2与x_st_1之间时,式B满足)、于第二水平区段sec_2中对应第一图层410(亦即当x介于x_st_1与x_end_1之间时,式A满足)以及于第三水平区段sec_3中对应第二图层420(亦即当x介于x_end_1与x_end_2之间时,式B满足),数据撷取装置即依序由第二图层420撷取对应该第一水平区段sec_1的数据、由第一图层410撷取对应该第二水平区段sec_2的数据以及由第二图层420撷取对应该第三水平区段sec_3的数据。以此类推,更多的图层所衍生的数据撷取以及其它水平扫描线的数据撷取均可依上述方法进行安排。As mentioned above, in the steps of FIG. 3b, N vertical layer intervals are used for the data acquisition device to determine whether the vertical position of a horizontal scanning line is located in one of the N vertical layer intervals. If so, this represents the horizontal The content of at least one pixel of the scan line needs to be retrieved from one of the N layers. At this time, the order of the M horizontal segments is for the data retrieval device to sequentially determine the Which one of the N horizontal layer intervals is a horizontal position of the horizontal scanning line is located to generate a judgment result, and then the data acquisition device retrieves data from one of the N layers according to the judgment result. For example, please refer to FIG. 4a, the first and second vertical layer intervals V01, V02 can be sequentially used by the data acquisition device to determine whether the vertical position y of a horizontal scanning line h falls between them, that is, for the data acquisition The fetching device performs at least one of the following comparisons in sequence until any comparison is satisfied or all comparisons are not satisfied: y_st_1≦y≦y_end_1 and y_st_2≦y≦y_end_2, if any of the above comparisons is satisfied, the data acquisition device judges this The content of at least one pixel of the horizontal scanning line h needs to be retrieved from the first layer 410 or the second layer 420. At this time, the order of the first to third horizontal segments can be used by the data retrieval device to determine the A horizontal position x of the horizontal scanning line h corresponds to which of the N horizontal layer intervals H01 and H02 in each horizontal segment to generate the aforementioned judgment result. In other words, the data acquisition device determines each horizontal segment Perform at least one of the following comparisons in sequence until any comparison is satisfied: x_st_1≦x≦x_end_1 (hereinafter referred to as formula A) and x_st_2≦x≦x_end_2 (hereinafter referred to as formula B), if the judgment result indicates that the horizontal position x is at the first A horizontal section sec_1 corresponds to the second layer 420 (that is, when x is between x_st_2 and x_st_1, formula B is satisfied), and a second horizontal section sec_2 corresponds to the first layer 410 (that is, when x between x_st_1 and x_end_1, formula A is satisfied), and corresponding to the second layer 420 in the third horizontal section sec_3 (that is, when x is between x_end_1 and x_end_2, formula B is satisfied), data extraction The device sequentially retrieves data corresponding to the first horizontal section sec_1 from the second layer 420 , retrieves data corresponding to the second horizontal section sec_2 from the first layer 410 , and retrieves data corresponding to the second horizontal section sec_2 from the second layer 420 Corresponding to the data of the third horizontal section sec_3. By analogy, the data acquisition derived from more layers and the data acquisition of other horizontal scan lines can be arranged according to the above method.
另外,由于前述N个图层可能包含一或多个非矩形图层,因此于执行图3b的步骤前,本发明的图层撷取安排方法可先执行下列步骤(未图示):In addition, since the aforementioned N layers may include one or more non-rectangular layers, before performing the steps in Figure 3b, the method for layer retrieval and arrangement of the present invention may first perform the following steps (not shown):
步骤S302:检测每该图层是否为一矩形,并据以产生一检测结果;Step S302: Detect whether each layer is a rectangle, and generate a detection result accordingly;
步骤S304:若该检测结果表示该N个图层包含Q个非矩形图层(其中该Q为正整数),利用多个不相重迭的矩形图层来界定每该非矩形图层,其中每该矩形图层同样会包含一水平起点与一水平终点以及一垂直起点与一垂直终点;以及Step S304: If the detection result indicates that the N layers include Q non-rectangular layers (wherein the Q is a positive integer), use a plurality of non-overlapping rectangular layers to define each non-rectangular layer, wherein Each of the rectangle layers also includes a horizontal start point and a horizontal end point and a vertical start point and a vertical end point; and
步骤S306:当该些矩形图层的总数目为Z个,将该N更新为[(N-Q)+Z],并据以执行图3b的步骤,换句话说,将该Z个矩形图层及原本该N个图层中的N-Q个矩形图层视为更新后的N个图层,以执行图3b的步骤,其中该Z为大于1的正整数。Step S306: When the total number of these rectangular layers is Z, update the N to [(N-Q)+Z], and execute the steps in Figure 3b accordingly, in other words, the Z rectangular layers and Originally, the N-Q rectangular layers in the N layers are regarded as the updated N layers to perform the steps in FIG. 3b, wherein the Z is a positive integer greater than 1.
举例而言,请参阅图4b,图4b包含一L型图层450与一长方形图层460分别位于一背景画面400上,L形图层450的水平起点与终点分别为x_st_1、x_end_1以及垂直起点与终点分别为y_st_1、y_end_1,长方形图层460的水平起点与终点分别为x_st_2、x_end_2以及垂直起点与终点分别为y_st_2、y_end_2,因此,步骤S302可经由预先给定的图层范围、像素值或透明度的分析而检测到L形图层450并非矩形,然后步骤S304即可利用矩形图层452、454来界定L型图层450,其中矩形图层452、454的范围总合不小于该L型图层450,且矩形图层452的水平起点与终点分别为x_st_1、x_end_1以及垂直起点与终点分别为y_st_1、y_end_1-1,而矩形图层454的水平起点与终点分别为x_st_1-1、x_end_1以及垂直起点与终点分别为y_end_1-1、y_end_1,此时图4b的原始图层数N等于2、非矩形图层数Q等于1、矩形图层数Z等于2,故步骤S306会以画面中所有的矩形图层数[(2-1)+2]=3来代替原始图层数2,以进行图3b的步骤,换句话说,本发明可利用该Z个矩形图层来取代该Q个非矩形图层以执行图3b的步骤。请注意,当有多个种可能方式来使用多个矩形图层以界定一非矩形图层时,本技术领域人士可依本发明的揭示自行选择适合的方式。另请注意,依据图3b的步骤可于图4b中界定出三个垂直图层区间(y_st_1至y_end_1-1;y_end_1-1至y_end_1;及y_st_2至y_end_2)、三个水平图层区间(x_st_1至x_end_1;x_st_1-1至x_end_1;及x_st_2至x_end_2)以及四个水平区段(sec_1:x_st_1至x_st_2;sec_2:x_st_2至x_end_2;sec_3:x_end_2至x_st_1-1;及sec_4:x_st_1-1至x_end_1),由于本技术领域人士可从图3b及图4a的相关说明充分了解该些区间及区段的界定及后续利用并加以实现,因此冗余或不必要的说明在此予以节略。For example, please refer to FIG. 4b. FIG. 4b includes an L-shaped layer 450 and a rectangular layer 460 respectively located on a background image 400. The horizontal starting point and end point of the L-shaped layer 450 are x_st_1, x_end_1 and vertical starting point respectively. and the end point are y_st_1 and y_end_1 respectively, the horizontal starting point and the ending point of the rectangular layer 460 are respectively x_st_2 and x_end_2 and the vertical starting point and the ending point are respectively y_st_2 and y_end_2, therefore, step S302 can be obtained via the preset layer range, pixel value or The analysis of transparency detects that the L-shaped layer 450 is not a rectangle, and then step S304 can use the rectangular layers 452, 454 to define the L-shaped layer 450, wherein the sum of the ranges of the rectangular layers 452, 454 is not less than the L-shaped layer. layer 450, and the horizontal start point and end point of the rectangle layer 452 are respectively x_st_1, x_end_1 and the vertical start point and end point are respectively y_st_1, y_end_1-1, while the horizontal start point and end point of the rectangle layer 454 are respectively x_st_1-1, x_end_1 and The vertical starting point and end point are y_end_1-1 and y_end_1 respectively. At this time, the number of original layers N in Figure 4b is equal to 2, the number of non-rectangular layers Q is equal to 1, and the number of rectangular layers Z is equal to 2. Therefore, in step S306, all The number of rectangular layers [(2-1)+2]=3 to replace the original number of layers 2, to carry out the steps of Figure 3b, in other words, the present invention can use the Z rectangular layers to replace the Q Non-rectangular layers to perform the steps of Figure 3b. Please note that when there are multiple possible ways to use multiple rectangular layers to define a non-rectangular layer, those skilled in the art can choose a suitable method according to the disclosure of the present invention. Please also note that three vertical layer intervals (y_st_1 to y_end_1-1; y_end_1-1 to y_end_1; and y_st_2 to y_end_2), three horizontal layer intervals (x_st_1 to x_end_1; x_st_1-1 to x_end_1; and x_st_2 to x_end_2) and four horizontal segments (sec_1: x_st_1 to x_st_2; sec_2: x_st_2 to x_end_2; sec_3: x_end_2 to x_st_1-1; and sec_4: x_st_1-1 to x_end_1), Since those skilled in the art can fully understand the definition and subsequent utilization and realization of these intervals and sections from the relevant descriptions in FIG. 3b and FIG. 4a , redundant or unnecessary descriptions are omitted here.
基于本发明的图层撷取安排方法,本发明相对应地提供了一种图层撷取方法,用来撷取N个图层的至少一部分数据,并可藉由一数据撷取装置来执行,类似地,每该图层包含一水平起点、一水平终点、一垂直起点与一垂直终点。如图5a所示,该图层撷取方法的一实施例包含下列步骤:Based on the layer retrieval arrangement method of the present invention, the present invention correspondingly provides a layer retrieval method, which is used to retrieve at least part of the data of N layers, and can be executed by a data retrieval device , similarly, each layer includes a horizontal start point, a horizontal end point, a vertical start point and a vertical end point. As shown in Figure 5a, an embodiment of the layer extraction method includes the following steps:
步骤S50:依据该N个水平起点、该N个水平终点、该N个垂直起点以及该N个垂直终点将该画面区分为多个区域,其中该些区域分别对应该些图层的其中之一;以及Step S50: Dividing the screen into a plurality of regions according to the N horizontal starting points, the N horizontal ending points, the N vertical starting points and the N vertical ending points, wherein the regions respectively correspond to one of the layers ;as well as
步骤S52:于显示该画面时分别自该些区域所对应的图层撷取数据。更精确地说,步骤S52可包含下列步骤:判断一扫描线的一区段位于该些区域中的所在区域,并据以自该区域所对应的图层撷取数据。进一步地说,上述扫描线可为一水平扫描线,且判断一扫描线的一区段位于该些区域中的所在区域的步骤可包含:排序该N个水平起点与该N个水平终点,以得到M个水平区段,其中该M为不大于(2×N-1)的正整数,该扫描线的该区段对应该M个水平区段的其中之一,且每该水平区段对应该些区域的其中之一;以及判断该扫描线的该区段对应于该M个水平区段的何者,以判断该扫描线的该区段位于该些区域中的所在区域。Step S52: Retrieve data from layers corresponding to the areas when the screen is displayed. More precisely, step S52 may include the following steps: determining where a section of a scan line is located in the areas, and accordingly extracting data from a layer corresponding to the area. Furthermore, the aforementioned scan line may be a horizontal scan line, and the step of judging the area where a segment of a scan line is located in the areas may include: sorting the N horizontal start points and the N horizontal end points, so as to Obtain M horizontal segments, where M is a positive integer not greater than (2×N-1), the segment of the scan line corresponds to one of the M horizontal segments, and each horizontal segment pair one of the areas; and determine which of the M horizontal segments the segment of the scan line corresponds to, so as to determine where the segment of the scan line is located in the areas.
另外,当该扫描线为一水平扫描线,上述图层撷取方法可进一步包含:(a)于判断该扫描线的该区段位于该些区域中的所在区域并据以自该区域所对应的图层撷取数据的步骤前,依据该N个垂直起点与该N个垂直终点界定N个垂直图层区间,其中每该垂直图层区间对应该N个图层的其中之一;以及(b)判断该扫描线的垂直位置是否位于该N个垂直图层区间的其中之一,其中当该扫描线的垂直位置位于该N个垂直图层区间的其中之一时,判断该扫描线的该区段位于该些区域中的所在区域,并据以自该区域所对应的图层撷取数据。此外,上述步骤(b)还可包含:当该扫描线的垂直位置不位于该N个垂直图层区间的其中之一时,以下一水平扫描线作为该扫描线,并重复执行步骤(b)。In addition, when the scan line is a horizontal scan line, the above-mentioned layer extraction method may further include: (a) after judging that the segment of the scan line is located in the area of the areas and correspondingly from the area Before the step of retrieving data from the layer, N vertical layer intervals are defined according to the N vertical starting points and the N vertical end points, wherein each vertical layer interval corresponds to one of the N layers; and ( b) judging whether the vertical position of the scan line is in one of the N vertical layer intervals, wherein when the vertical position of the scan line is in one of the N vertical layer intervals, judging whether the scan line is in one of the N vertical layer intervals The segment is located in the area of these areas and is used to extract data from the layer corresponding to the area. In addition, the above step (b) may further include: when the vertical position of the scan line is not located in one of the N vertical layer intervals, taking the next horizontal scan line as the scan line, and repeatedly performing step (b).
请注意,本揭示书中,所称区域可以是一画面中的一点、一线段或一平面;所述一扫描线的区段可以是一画面中的一点或一线段。Please note that in this disclosure, the so-called area may be a point, a line segment or a plane in a frame; the section of a scanning line may be a point or a line segment in a frame.
前述N个图层的N个垂直起点与N个垂直终点可用来界定N个垂直图层区间,每该垂直图层区间对应该N个图层的其中之一;再者,该N个图层的N个水平起点与N个水平终点可用来界定N个水平图层区间以及前述M个水平区段,每该水平图层区间亦对应该N个图层的其中之一。根据上述,请参阅图5b,步骤S52的一实施范例可包含:The N vertical starting points and N vertical end points of the aforementioned N layers can be used to define N vertical layer intervals, and each vertical layer interval corresponds to one of the N layers; moreover, the N layers The N horizontal start points and N horizontal end points can be used to define the N horizontal layer intervals and the aforementioned M horizontal sections, and each horizontal layer interval also corresponds to one of the N layers. According to the above, please refer to FIG. 5b, an implementation example of step S52 may include:
步骤S510:判断一水平扫描线的垂直位置是否位于该N个垂直图层区间的其中之一,藉此判断该水平扫描线是否与该N个图层的至少其中之一重迭。举例来说,请参阅图6,假定于一背景画面600上欲显示第一图层610、第二图层620、第三图层630及第四图层640(亦即图层数N等于4),且第一图层610的垂直起点y_st_1与终点y_end_1界定出一第一垂直图层区间V01、第二图层620的垂直起点y_st_2与终点y_end_2界定出一第二垂直图层区间V02、第三图层630的垂直起点y_st_3与终点y_end_3界定出一第三垂直图层区间V03以及第四图层640的垂直起点y_st_4与终点y_end_4界定出一第四垂直图层区间V04,则步骤S510可经由比较来判断一水平扫描线h的垂直位置y是否落于任一垂直图层区间内,亦即进行以下比较的至少其中之一直到任一比较满足或所有比较均不满足:y_st_1≦y≦y_end_1(后称式Ⅰ);y_st_2≦y≦y_end_2(后称式Ⅱ);y_st_3≦y≦y_end_3(后称式Ⅲ);及y_st_4≦y≦y_end_4(后称式Ⅳ);Step S510: Determine whether the vertical position of a horizontal scan line is located in one of the N vertical layer intervals, so as to determine whether the horizontal scan line overlaps with at least one of the N layers. For example, referring to FIG. 6 , it is assumed that a first layer 610, a second layer 620, a third layer 630 and a fourth layer 640 are to be displayed on a background image 600 (that is, the number of layers N equals 4 ), and the vertical starting point y_st_1 and the ending point y_end_1 of the first layer 610 define a first vertical layer interval V01, the vertical starting point y_st_2 and the ending point y_end_2 of the second layer 620 define a second vertical layer interval V02, the The vertical starting point y_st_3 and the ending point y_end_3 of the third layer 630 define a third vertical layer interval V03 and the vertical starting point y_st_4 and the ending point y_end_4 of the fourth layer 640 define a fourth vertical layer interval V04, then step S510 can be performed by Compare to determine whether the vertical position y of a horizontal scan line h falls within any vertical layer interval, that is, at least one of the following comparisons is performed until any comparison is satisfied or all comparisons are not satisfied: y_st_1≦y≦y_end_1 (hereinafter referred to as formula I); y_st_2≦y≦y_end_2 (hereinafter referred to as formula II); y_st_3≦y≦y_end_3 (hereinafter referred to as formula III); and y_st_4≦y≦y_end_4 (hereinafter referred to as formula IV);
步骤S520:当判断该水平扫描线的垂直位置位于该N个垂直图层区间的其中之一时,依据该M个水平区段的顺序依序判断在每该水平区段中该水平扫描线的一水平位置位于该N个水平图层区间的何者以产生一判断结果。举例而言,请参阅图6,第一图层610的水平起点x_st_1与终点x_end_1界定出一第一水平图层区间H01、第二图层620的水平起点x_st_2与终点x_end_2界定出一第二水平图层区间H02、第三图层630的水平起点x_st_3与终点x_end_3界定出一第三水平图层区间H03以及第四图层640的水平起点x_st_4与终点x_end_4界定出一第四水平图层区间H04,且该M个水平区段分别为:Step S520: When it is determined that the vertical position of the horizontal scan line is located in one of the N vertical layer intervals, sequentially determine a horizontal scan line in each horizontal segment according to the sequence of the M horizontal segments Which one of the N horizontal layer intervals is the horizontal position located to generate a judgment result. For example, please refer to FIG. 6 , the horizontal start point x_st_1 and end point x_end_1 of the first layer 610 define a first horizontal layer interval H01, and the horizontal start point x_st_2 and end point x_end_2 of the second layer 620 define a second level The layer interval H02, the horizontal start point x_st_3 and the end point x_end_3 of the third layer 630 define a third horizontal layer interval H03, and the horizontal start point x_st_4 and end point x_end_4 of the fourth layer 640 define a fourth horizontal layer interval H04 , and the M horizontal segments are:
第一水平区段sec_1(从x_st_4至x_st_2);first horizontal section sec_1 (from x_st_4 to x_st_2);
第二水平区段sec_2(从x_st_2至x_st_3);second horizontal section sec_2 (from x_st_2 to x_st_3);
第三水平区段sec_3(从x_st_3至x_st_1);third horizontal section sec_3 (from x_st_3 to x_st_1);
第四水平区段sec_4(从x_st_1至x_end_1);Fourth horizontal section sec_4 (from x_st_1 to x_end_1);
第五水平区段sec_5(从x_end_1至x_end_3);Fifth horizontal section sec_5 (from x_end_1 to x_end_3);
第六水平区段sec_6(从x_end_3至x_end_2);以及sixth horizontal section sec_6 (from x_end_3 to x_end_2); and
第七水平区段sec_7(从x_end_2至x_end_4),seventh horizontal section sec_7 (from x_end_2 to x_end_4),
因此,步骤S520可经由比较依序判断在每个水平区段中该水平扫描线h的一像素的水平位置x位于那一个水平图层区间内以产生该判断结果,换言之,步骤S520在每个水平区段中分别依据一水平位置x(例如该水平区段的起点:x_st_4、x_st_2、x_st_3、x_st_1、x_end_1、x_end_3、x_end_2或x_end_4)进行以下比较的至少其中的一直到任一比较满足而产生该判断结果:x_st_1≦x≦x_end_1(后称式一);x_st_2≦x≦x_end_2(后称式二);x_st_3≦x≦x_end_3(后称式三);与x_st_4≦x≦x_end_4(后称式四);以及Therefore, step S520 can sequentially determine which horizontal layer interval the horizontal position x of a pixel of the horizontal scan line h in each horizontal segment is located in through comparison to generate the determination result, in other words, step S520 in each horizontal section In the horizontal section, at least one of the following comparisons is performed according to a horizontal position x (for example, the starting point of the horizontal section: x_st_4, x_st_2, x_st_3, x_st_1, x_end_1, x_end_3, x_end_2, or x_end_4) until any comparison is satisfied. The judgment result: x_st_1≦x≦x_end_1 (hereinafter referred to as Formula 1); x_st_2≦x≦x_end_2 (hereinafter referred to as Formula 2); x_st_3≦x≦x_end_3 (hereinafter referred to as Formula 3); and x_st_4≦x≦x_end_4 (hereinafter referred to as Formula 3) d); and
步骤S530:依据该判断结果由该N个图层的其中之一撷取数据。举例而言,请参阅图6,若判断结果指出该水平位置x于第一水平区段sec_1中对应第四图层640(亦即式四满足)、于第二水平区段sec_2中对应第二图层620(亦即式二满足)、于第三水平区段sec_3中对应第二图层620(亦即式二满足)、于第四水平区段sec_4中对应第一图层610(亦即式一满足)、于第五水平区段sec_5中对应第二图层620(亦即式二满足)、于第六水平区段sec_6中对应第二图层620(亦即式二满足)以及于第七水平区段sec_7中对应第四图层640(亦即式四满足),步骤S530即依序由第四图层640撷取对应第一水平区段sec_1的数据、由第二图层620撷取对应第二水平区段sec_2的数据、由第二图层620撷取对应第三水平区段sec_3的数据、由第一图层610撷取对应第四水平区段sec_4的数据、由第二图层620撷取对应第五水平区段sec_5的数据、由第二图层620撷取对应第六水平区段sec_6的数据并由第四图层640撷取对应第七水平区段sec_7的数据。类似地,更多的图层所衍生的数据撷取以及其它水平扫描线的数据撷取均可依上述方法进行。Step S530: Extract data from one of the N layers according to the judgment result. For example, please refer to FIG. 6, if the judgment result indicates that the horizontal position x corresponds to the fourth layer 640 in the first horizontal section sec_1 (that is, the formula 4 is satisfied), and corresponds to the second layer 640 in the second horizontal section sec_2. Layer 620 (that is, formula 2 is satisfied), corresponds to the second layer 620 in the third horizontal section sec_3 (that is, formula 2 is satisfied), and corresponds to the first layer 610 in the fourth horizontal section sec_4 (that is, Formula 1 is satisfied), corresponding to the second layer 620 in the fifth horizontal section sec_5 (that is, formula 2 is satisfied), corresponding to the second layer 620 in the sixth horizontal section sec_6 (that is, formula 2 is satisfied), and in The seventh horizontal section sec_7 corresponds to the fourth layer 640 (that is, the formula 4 is satisfied), step S530 is to sequentially extract the data corresponding to the first horizontal section sec_1 from the fourth layer 640, and extract the data corresponding to the first horizontal section sec_1 from the second layer 620 The data corresponding to the second horizontal section sec_2 is extracted, the data corresponding to the third horizontal section sec_3 is extracted by the second layer 620, the data corresponding to the fourth horizontal section sec_4 is extracted by the first layer 610, and the data corresponding to the fourth horizontal section sec_4 is extracted by the second layer 620. The second layer 620 captures the data corresponding to the fifth horizontal section sec_5, the second layer 620 extracts the data corresponding to the sixth horizontal section sec_6, and the fourth layer 640 extracts the data corresponding to the seventh horizontal section sec_7 data. Similarly, data acquisition derived from more layers and data acquisition of other horizontal scan lines can be performed according to the above method.
承上所述,由于水平扫描线的垂直位置亦可能落于所有垂直图层区间外,因此为避免冗余的运算,如图7所示,前述步骤S510可包含:Based on the above, since the vertical position of the horizontal scanning line may also fall outside all vertical layer intervals, in order to avoid redundant calculations, as shown in FIG. 7, the aforementioned step S510 may include:
步骤S710:判断该水平扫描线的垂直位置是否大于该N个垂直终点的最大者。举例而言,请一并参阅图6,步骤S710可经由比较判断该水平扫描线h的垂直位置y是否大于最大垂直终点y_end_1,以判断该水平扫描线h是否已落于所有垂直图层区间外;以及Step S710: Determine whether the vertical position of the horizontal scan line is greater than the maximum of the N vertical endpoints. For example, please refer to FIG. 6 , step S710 can determine whether the vertical position y of the horizontal scanning line h is greater than the maximum vertical end point y_end_1 by comparison in step S710, so as to determine whether the horizontal scanning line h has fallen outside all vertical layer intervals ;as well as
步骤S720:若判断该水平扫描线的垂直位置大于该N个垂直终点的最大者,进入一闲置状态。举例而言,请参阅图6,若判断该垂直位置y大于y_end_1,步骤S720即令数据撷取装置暂时进入一闲置状态。Step S720: Enter an idle state if it is determined that the vertical position of the horizontal scanning line is greater than the maximum of the N vertical endpoints. For example, please refer to FIG. 6 , if it is determined that the vertical position y is greater than y_end_1, step S720 is to make the data capture device temporarily enter an idle state.
另外,为完成所有水平扫描线(或垂直位置小于最大垂直终点的水平扫描线)的判断,如图8所示,图5b的实施例可进一步包含下列步骤:In addition, in order to complete the judgment of all horizontal scanning lines (or horizontal scanning lines whose vertical position is smaller than the maximum vertical end point), as shown in Figure 8, the embodiment of Figure 5b may further include the following steps:
步骤S810:当判断该水平扫描线的垂直位置非位于该N个垂直图层区间的其中之一时,进行下一水平扫描线的判断。本实施例中,步骤S810包含:Step S810: When it is determined that the vertical position of the horizontal scan line is not located in one of the N vertical layer intervals, determine the next horizontal scan line. In this embodiment, step S810 includes:
步骤S812:递增该水平扫描线的垂直位置,例如将该垂直位置加1;以及Step S812: Increment the vertical position of the horizontal scan line, for example, add 1 to the vertical position; and
步骤S814:依据递增后的该水平扫描线的垂直位置重新执行图5b的步骤S510、S520及S530。Step S814: Re-execute steps S510, S520 and S530 of FIG. 5b according to the incremented vertical position of the horizontal scan line.
再者,请参阅图9,为了依据该M个水平区段的顺序执行图5b的步骤S520及S530,该二步骤可包含:Furthermore, referring to FIG. 9, in order to execute steps S520 and S530 of FIG. 5b according to the sequence of the M horizontal segments, the two steps may include:
步骤S910:判断于该M个水平区段的一第K水平区段中该水平扫描线的当前水平位置位于该N个水平图层区间的何者以产生该判断结果,其中该K为不大于M的正整数。以图6为例,当K等于4时,步骤S910判断出于第四水平区段sec_4中该水平扫描线h的当前水平位置x(例如第四水平区段sec_4的起点x_st_1)满足前述式一,故判断第四水平区段sec_4对应第一图层610,进而产生该判断结果;Step S910: Determine which of the N horizontal layer intervals the current horizontal position of the horizontal scan line is located in in a K-th horizontal segment of the M horizontal segments to generate the judgment result, wherein the K is not greater than M positive integer of . Taking FIG. 6 as an example, when K is equal to 4, step S910 judges that the current horizontal position x of the horizontal scanning line h in the fourth horizontal section sec_4 (for example, the starting point x_st_1 of the fourth horizontal section sec_4) satisfies the aforementioned formula 1 , so it is judged that the fourth horizontal section sec_4 corresponds to the first layer 610, and then the judgment result is generated;
步骤S920:依据该判断结果撷取该N个图层的其中之一的数据;以及Step S920: Retrieve the data of one of the N layers according to the judgment result; and
步骤S930:递增该K,例如将该K加1,并依序重新执行步骤S910、S920及S930,直至该K等于该M。Step S930: Increment the K, for example, add 1 to the K, and re-execute steps S910, S920 and S930 in sequence until the K is equal to the M.
请注意,由于一图层可能迭加于另一图层上,故前述实施例中各图层会依据一图层显示优先顺序来决定重迭处的显示顺序,例如图6的图层显示优先顺序依序为第一图层610、第二图层620、第三图层630及第四图层640。而为增加运算效率,图5b的步骤S510及S520可依据该图层显示优先顺序来进行比较,例如步骤S510可依式Ⅰ、式Ⅱ、式Ⅲ、式Ⅳ的顺序来进行比较,而步骤S520可依式一、式二、式三、式四的顺序来进行比较,若排序较前的式子已满足,则后续比较就无需进行。Please note that since one layer may be superimposed on another layer, each layer in the foregoing embodiment will determine the display order of the overlapping part according to the display priority of a layer, for example, the display priority of the layer in Figure 6 The sequence is the first layer 610 , the second layer 620 , the third layer 630 and the fourth layer 640 . In order to increase the computing efficiency, steps S510 and S520 in Fig. 5b can be compared according to the layer display priority order, for example, step S510 can be compared according to the order of formula I, formula II, formula III and formula IV, and step S520 The comparison can be performed in the order of Formula 1, Formula 2, Formula 3, and Formula 4. If the formulas ranked earlier are satisfied, subsequent comparisons do not need to be performed.
另请注意,由于图5b所述的N个图层也可能包含一或多个非矩形图层,因此于执行图5b的步骤前,本发明的图层撷取方法可先执行下列步骤(未图示):Please also note that since the N layers described in Figure 5b may also include one or more non-rectangular layers, before performing the steps in Figure 5b, the layer extraction method of the present invention may first perform the following steps (not shown icon):
步骤S502:检测每该图层是否为一矩形,并产生一检测结果;Step S502: Detect whether each layer is a rectangle, and generate a detection result;
步骤S504:若该检测结果表示该N个图层包含Q个非矩形图层,利用多个不相重迭的矩形图层来界定每该非矩形图层,其中每该矩形图层同样地包含一水平起点与一水平终点以及一垂直起点与一垂直终点,且该Q为正整数;以及Step S504: If the detection result indicates that the N layers include Q non-rectangular layers, use a plurality of non-overlapping rectangular layers to define each non-rectangular layer, wherein each rectangular layer also includes a horizontal start point and a horizontal end point and a vertical start point and a vertical end point, and the Q is a positive integer; and
步骤S506:当该些矩形图层的总数目为Z个,将该N更新为[(N-Q)+Z],此时该些垂直图层区间的数目为[(N-Q)+Z],该些水平图层区间的数目为[(N-Q)+Z],该些水平区段的数目M不大于{2×[(N-Q)+Z]-1},然后再执行图5b的步骤,其中该Z为大于1的正整数。Step S506: When the total number of these rectangular layers is Z, update the N to [(N-Q)+Z], and now the number of these vertical layer intervals is [(N-Q)+Z], these The number of horizontal layer intervals is [(N-Q)+Z], the number M of these horizontal segments is not greater than {2×[(N-Q)+Z]-1}, and then the steps in Figure 5b are executed, wherein the Z is a positive integer greater than 1.
基于本技术领域人士可参阅图4b及其相关说明以充分了解及实现步骤S502、S504、S506,冗余或不必要的说明在此予以节略。Those skilled in the art can refer to FIG. 4 b and related descriptions to fully understand and implement steps S502 , S504 , and S506 , and redundant or unnecessary descriptions are omitted here.
于本发明另一实施例中,步骤S50暨S52可经由下列步骤(未图示)来实现:In another embodiment of the present invention, steps S50 and S52 can be realized through the following steps (not shown):
步骤S54:依据该N个垂直起点与该N个垂直终点界定多个垂直区段(例如α个垂直区段,其中该α为不大于(2×N-1)的正整数),并依据一图层显示优先顺序以及每该垂直区段的范围所包含的该一或多个图层来进行排序以得到每该垂直区段的一垂直排序结果,其中该N为正整数;以及Step S54: Define a plurality of vertical sections (for example, α vertical sections, wherein α is a positive integer not greater than (2×N-1)) according to the N vertical starting points and the N vertical end points, and according to a Layer display priority and the one or more layers included in the range of each vertical section are sorted to obtain a vertical sorting result of each vertical section, wherein the N is a positive integer; and
步骤S56:依据该N个水平起点与该N个水平终点界定多个水平区段(例如β个水平区段,其中该β为正整数且不大于(2×N-1)),并依据该图层显示优先顺序以及每该水平区段的范围所包含的该一或多个图层来进行排序以得到每该水平区段的一水平排序结果,另外,上述多个垂直区段供该数据撷取装置判断一水平扫描线的垂直位置是否位于该多个垂直区段的其中之一,且当该水平扫描线的垂直位置位于该多个垂直区段的其中之一时,该垂直区段所对应的该垂直排序结果及该N个水平排序结果即供该数据撷取装置判断于该垂直区段中该水平区段对应该N个图层的何者,并供该数据撷取装置据以由该N个图层的其中之一撷取数据。Step S56: Define a plurality of horizontal sections (for example, β horizontal sections, wherein β is a positive integer and not greater than (2×N-1)) according to the N horizontal starting points and the N horizontal end points, and according to the Layer display priority and the one or more layers included in the scope of each horizontal section are sorted to obtain a horizontal sorting result for each horizontal section. In addition, the above-mentioned multiple vertical sections are provided for the data The capturing device judges whether the vertical position of a horizontal scanning line is located in one of the plurality of vertical segments, and when the vertical position of the horizontal scanning line is located in one of the plurality of vertical segments, the vertical position of the vertical segment is The corresponding vertical sorting result and the N horizontal sorting results are for the data capture device to determine which of the N layers the horizontal segment corresponds to in the vertical segment, and for the data capture device to obtain One of the N layers retrieves data.
举例而言,请参阅图6,图中4个垂直起点与4个垂直终点共可界定出7个垂直区段,其中第1个垂直区段(y_st_1至y_st_3)仅对应第一图层610,则该垂直区段的垂直排序结果可以用1来表示(实作上可用一或数个二进位位元来表示),此时该7个水平区段所对应的图层依序分别为:第四图层640(可以用4来表示);第二图层620及第四图层640(可以用24来表示);第二图层620、第三图层630及第四图层640(可以用234来表示);第一图层610、第二图层620、第三图层630及第四图层640(可以用1234来表示);第二图层620、第三图层630及第四图层640(可以用234来表示);第二图层620及第四图层640(可以用24来表示);以及第四图层640(可以用4来表示),故藉由比对第1垂直区段的垂直排序结果与每个水平区段的水平排序结果,即可知仅有水平区段sec_4所对应的排序结果1234可与第1个垂直区段的排序结果1存在相符合的值(亦即二者均有对应第1图层610),因此可判断出第1个垂直区段中各水平区段所对应的图层依序分别为“无对应、无对应、无对应、第一图层610、无对应、无对应、无对应”。类似地,第3个垂直区段(y_st_2至y_st_4)对应第一图层610、第二图层620及第三图层630,则该垂直区段的垂直排序结果为123,而该7个水平区段所对应的排序结果仍为:4、24、234、1234、234、24、4,故同样藉由比对二排序结果,即可判断出第3个垂直区段中各水平区段所对应的图层依序分别为“无对应、2、2、1、2、2、无对应”,在此请注意,若排序结果的比对出现多个相符合的值,即取其中显示顺序最优先者(本实施例以数值大小代表顺序,数值最小者、最优先)。For example, please refer to FIG. 6 , 4 vertical start points and 4 vertical end points in the figure can define 7 vertical segments in total, and the first vertical segment (y_st_1 to y_st_3) only corresponds to the first layer 610, Then the vertical sorting result of the vertical section can be represented by 1 (in practice, it can be represented by one or several binary bits), and the layers corresponding to the 7 horizontal sections are in sequence respectively: Four layers 640 (can be represented by 4); the second layer 620 and the fourth layer 640 (can be represented by 24); the second layer 620, the third layer 630 and the fourth layer 640 (can be represented by represented by 234); the first layer 610, the second layer 620, the third layer 630 and the fourth layer 640 (may be represented by 1234); the second layer 620, the third layer 630 and the Four layers 640 (can be represented by 234); the second layer 620 and the fourth layer 640 (can be represented by 24); and the fourth layer 640 (can be represented by 4), so by comparing the first 1 The vertical sorting result of the vertical section and the horizontal sorting result of each horizontal section, that is, only the sorting result 1234 corresponding to the horizontal section sec_4 has a value that matches the sorting result 1 of the first vertical section (That is to say, both of them correspond to the first layer 610), so it can be judged that the layers corresponding to each horizontal segment in the first vertical segment are respectively "no corresponding, no corresponding, no corresponding, first One layer 610, no correspondence, no correspondence, no correspondence". Similarly, the third vertical section (y_st_2 to y_st_4) corresponds to the first layer 610, the second layer 620 and the third layer 630, then the vertical sorting result of this vertical section is 123, and the 7 horizontal The sorting results corresponding to the segments are still: 4, 24, 234, 1234, 234, 24, 4, so by comparing the second sorting results, you can determine the corresponding horizontal segments in the third vertical segment The order of the layers is "No Correspondence, 2, 2, 1, 2, 2, No Correspondence". Please note here that if there are multiple matching values in the comparison of the sorting results, the highest display order will be selected. Priority (in this embodiment, the order is represented by numerical value, and the smallest numerical value is the highest priority).
除前述图层撷取方法外,本发明亦相对应地揭示一种数据撷取装置,用来撷取N个图层的至少一部分数据,其中该N个图层包含图层1至图层N(该N为正整数),分别储存于一储存装置中,且该N个图层的起点、终点、垂直图层区间、水平图层区间及水平区段的定义如同前述,于此不再重复说明。请参阅图10,该数据撷取装置的一实施例包含:一处理器1010(例如一有限状态机的硬件电路),用来耦接该储存装置1020以执行至少一步骤,该至少一步骤包含:步骤S50以及步骤S52,于此不再重复说明。In addition to the above layer extraction method, the present invention also correspondingly discloses a data acquisition device for extracting at least part of the data of N layers, wherein the N layers include layer 1 to layer N (the N is a positive integer), respectively stored in a storage device, and the definition of the starting point, end point, vertical layer interval, horizontal layer interval and horizontal section of the N layers is as described above, and will not be repeated here illustrate. Please refer to FIG. 10 , an embodiment of the data acquisition device includes: a processor 1010 (such as a hardware circuit of a finite state machine), which is used to couple the storage device 1020 to perform at least one step, the at least one step includes : step S50 and step S52, the description will not be repeated here.
此外,由于图10的N个图层可能包含一或多个非矩形图层,因此处理器1010于执行上述至少一步骤前,可先执行步骤S502、S504以及步骤S506,于此不再重复说明。In addition, since the N layers in FIG. 10 may include one or more non-rectangular layers, the processor 1010 may execute steps S502, S504, and S506 before performing at least one of the above steps, and the description will not be repeated here. .
请注意,本技术领域具有通常知识者可参阅图3a至图9的方法发明的相关说明来充份了解图10的数据撷取装置的运作并加以实现,因此,冗余或不必要的说明在此予以节略。另请注意,本发明所述的水平、垂直、起点、终点等用语为相对性的描述,凡可对应该些相对性描述的其它用语当属本发明的揭示范围。Please note that those skilled in the art can refer to the relevant descriptions of the method inventions in FIGS. This is omitted. Please also note that terms such as horizontal, vertical, starting point, and end point in the present invention are relative descriptions, and any other terms that can correspond to these relative descriptions should fall within the disclosure scope of the present invention.
综上所述,本发明所揭示的图层撷取安排方法、图层撷取方法及数据撷取装置可以实现有效率地由多个图层中撷取所需要的数据,除可避免载入不必要的数据而造成频宽浪费,亦可提高运作效能,降低实作成本。简言之,本发明藉由分段进行数据撷取的方式改善了先前技术的频宽浪费及运作效率欠佳等问题。In summary, the layer retrieval arrangement method, layer retrieval method, and data retrieval device disclosed in the present invention can efficiently retrieve the required data from multiple layers, in addition to avoiding loading Bandwidth waste caused by unnecessary data can also improve operational efficiency and reduce implementation costs. In short, the present invention solves the problems of bandwidth waste and poor operating efficiency in the prior art by performing data retrieval in segments.
虽然本发明的实施例如上所述,然而该些实施例并非用来限定本发明,本技术领域具有通常知识者可依据本发明的明示或隐含的内容对本发明的技术特征施以变化,凡此种种变化均可能属于本发明所寻求的专利保护范畴,换言之,本发明的专利保护范围须视本说明书的申请专利范围所界定者为准。Although the embodiments of the present invention are as described above, these embodiments are not intended to limit the present invention, and those skilled in the art can make changes to the technical characteristics of the present invention according to the explicit or implicit content of the present invention. All these changes may belong to the scope of patent protection sought by the present invention. In other words, the scope of patent protection of the present invention must be defined by the scope of patent application in this specification.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310195459.7A CN104183228B (en) | 2013-05-23 | 2013-05-23 | Layer acquisition method, data acquisition device and layer acquisition arrangement method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310195459.7A CN104183228B (en) | 2013-05-23 | 2013-05-23 | Layer acquisition method, data acquisition device and layer acquisition arrangement method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104183228A CN104183228A (en) | 2014-12-03 |
CN104183228B true CN104183228B (en) | 2017-04-19 |
Family
ID=51964219
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310195459.7A Expired - Fee Related CN104183228B (en) | 2013-05-23 | 2013-05-23 | Layer acquisition method, data acquisition device and layer acquisition arrangement method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104183228B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI699670B (en) | 2018-11-07 | 2020-07-21 | 圓展科技股份有限公司 | Electronic system and method of freezing screen |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI285837B (en) * | 2005-09-21 | 2007-08-21 | Quanta Comp Inc | Display controller capable of reducing cache memory and frame adjusting method thereof |
TWI329825B (en) * | 2007-04-23 | 2010-09-01 | Network e-map graphic automatically generating system and method therefor | |
US20100066900A1 (en) * | 2008-09-12 | 2010-03-18 | Himax Technologies Limited | Image processing method |
TWI537754B (en) * | 2011-09-30 | 2016-06-11 | 天眼衛星科技股份有限公司 | Method for displaying and managing image file |
-
2013
- 2013-05-23 CN CN201310195459.7A patent/CN104183228B/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI699670B (en) | 2018-11-07 | 2020-07-21 | 圓展科技股份有限公司 | Electronic system and method of freezing screen |
Also Published As
Publication number | Publication date |
---|---|
CN104183228A (en) | 2014-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020140755A1 (en) | Voltage compensation circuit and method, display drive circuit, display device | |
CN103593120B (en) | The method and apparatus that when sectional drawing, screenshot box is adjacent to the border of area-of-interest | |
US20120162227A1 (en) | Method of Picture Display and Device Thereof | |
CN104349045A (en) | Image collecting method and electronic equipment | |
CN109121000A (en) | A kind of method for processing video frequency and client | |
EP4287633A1 (en) | Video frame interpolation method and apparatus, and electronic device | |
JP2019529992A (en) | Display device and control method thereof | |
CN113986076A (en) | Icon display control method, device, electronic device and storage medium | |
CN110619597A (en) | Semitransparent watermark removing method and device, electronic equipment and storage medium | |
TWI486947B (en) | Layer access method, data access device and layer access arrangement method | |
CN104183228B (en) | Layer acquisition method, data acquisition device and layer acquisition arrangement method | |
US11176634B2 (en) | Methods and devices of picture processing based on external storage device and user interface display | |
CN103517051B (en) | Control method and electronic equipment | |
CN105427235A (en) | Image browsing method and system | |
KR20160039091A (en) | Method of processing image data and display system for display power reduction | |
CN109643209A (en) | Large data sets are dynamically presented in client application | |
CN103780863A (en) | High-resolution image generation method and device | |
US9230309B2 (en) | Image processing apparatus and image processing method with image inpainting | |
US11782850B2 (en) | Information processing method, server, terminal, and computer storage medium | |
CN114399645A (en) | Multi-mode data expansion method, system, medium, computer equipment and terminal | |
CN104284251B (en) | Method for screening visual data executed by electronic device | |
CN102662612A (en) | A method and a system for displaying MRC-form picture files by using Qt bank | |
CN103474049B (en) | Image processing apparatus and image processing method | |
CN107305683A (en) | Image processing method, image processing equipment and image processing apparatus | |
US20150050008A1 (en) | Generating content data for a video file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170419 Termination date: 20190523 |