TWI751571B - Video playback system and environment atmosphere adjusting method - Google Patents

Video playback system and environment atmosphere adjusting method Download PDF

Info

Publication number
TWI751571B
TWI751571B TW109118436A TW109118436A TWI751571B TW I751571 B TWI751571 B TW I751571B TW 109118436 A TW109118436 A TW 109118436A TW 109118436 A TW109118436 A TW 109118436A TW I751571 B TWI751571 B TW I751571B
Authority
TW
Taiwan
Prior art keywords
thumbnail
thumbnails
color
chroma
pixels
Prior art date
Application number
TW109118436A
Other languages
Chinese (zh)
Other versions
TW202147094A (en
Inventor
廖翌涵
呂昱辰
曾俞豪
陳凱逸
林岫沆
Original Assignee
仁寶電腦工業股份有限公司
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 仁寶電腦工業股份有限公司 filed Critical 仁寶電腦工業股份有限公司
Priority to TW109118436A priority Critical patent/TWI751571B/en
Publication of TW202147094A publication Critical patent/TW202147094A/en
Application granted granted Critical
Publication of TWI751571B publication Critical patent/TWI751571B/en

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

A video playback system and an environment atmosphere adjusting method are provided. In the method, a shrinking process is performed on an image frame, to obtained a shrank image frame. A foreground division process is performed on the shrank image, to obtain shrank foreground of interest. The foreground division process includes distinguishing a corresponding shrank foreground of interest according to brightness of multiple pixels of each shrank image frame. A representative color of the foreground of interest is determined. Then, the representative color is provided to the light, so that the light emits with the representative color, and the display plays the image frame. Accordingly, the visual experience of the viewer can be improved.

Description

環境氛圍調整系統及環境氛圍調整方法Environment atmosphere adjustment system and environment atmosphere adjustment method

本發明是有關於一種影像及環境分析結合光源控制技術,且特別是有關於一種環境氛圍調整系統及環境氛圍調整方法。The present invention relates to an image and environment analysis combined with light source control technology, and in particular, to an environment atmosphere adjustment system and an environment atmosphere adjustment method.

近年來,民眾可自行申辦諸如Netflix、Disney+、或MOD等多種隨選視訊(Video On Demand,VOD)服務,即可在家觀賞想看的電影或影集。另一方面,各類型顯示器(例如,液晶顯示器 (Liquid-Crystal Display,LCD)、發光二極體(Light-Emitting Diode,LED)顯示器、投影機等)所支援的解析度也逐漸提升,甚至大尺寸(例如是超過50吋)規格也逐漸平價化。若欲進一步提升觀賞體驗,有些民眾還會購買環繞音響,即可輕鬆地讓客廳形成一個小型電影院。此外,有些民眾會將所處環境的光源關閉以營造出電影院的氛圍。然而,環境的氛圍與影像內容之間沒有關聯性,使得這樣的氛圍事實上是相當無趣的。In recent years, people can apply for a variety of video on demand (Video On Demand, VOD) services such as Netflix, Disney+, or MOD, and then they can watch the movies or albums they want to watch at home. On the other hand, the resolutions supported by various types of displays (eg, Liquid-Crystal Display (LCD), Light-Emitting Diode (LED) display, projector, etc.) Size (for example, more than 50 inches) specifications are gradually becoming more affordable. If they want to further enhance the viewing experience, some people will also buy surround sound, which can easily turn the living room into a small movie theater. In addition, some people will turn off the light sources in their environment to create a movie theater atmosphere. However, there is no correlation between the atmosphere of the environment and the content of the video, making such an atmosphere rather uninteresting.

有鑑於此,本發明實施例提供一種環境氛圍調整系統及環境氛圍調整方法,基於所欲播放視訊透過光源的變化來動態地改變氛圍。In view of this, embodiments of the present invention provide an ambient atmosphere adjustment system and an ambient atmosphere adjustment method, which dynamically change the atmosphere based on changes in the light source of the video to be played.

本發明實施例的環境氛圍調整方法,其包括下列步驟:對影像畫面進行縮圖處理,以取得縮圖的影像畫面。對該縮圖的影像畫面,進行前景分割處理,以取得縮圖的興趣前景。此前景分割處理包括:依據縮圖的影像畫面中的多個畫素的明度,區分出縮圖的興趣前景。依據縮圖的興趣前景,決定縮圖的代表色。提供縮圖的代表色至光源。令光源,發出縮圖的代表色的光。令顯示器,播放影像畫面。The environment atmosphere adjustment method according to the embodiment of the present invention includes the following steps: performing thumbnail processing on an image frame to obtain a thumbnail image frame. A foreground segmentation process is performed on the image frame of the thumbnail to obtain an interesting foreground of the thumbnail. The foreground segmentation process includes: distinguishing the foreground of interest of the thumbnail according to the brightness of a plurality of pixels in the image frame of the thumbnail. According to the interest foreground of the thumbnail, the representative color of the thumbnail is determined. Provides the thumbnail's representative color to the light source. Let the light source emit light of the representative color of the thumbnail. Instruct the monitor to play the video screen.

本發明實施例的環境氛圍調整系統包括(但不僅限於)顯示器、光源及處理器。顯示器用以播放影像畫面。光源用以多種顏色的發光。處理器連接顯示器及光源。處理器對影像畫面進行縮圖處理,以取得縮圖的影像畫面,並依據縮圖的影像畫面進中的多個縮圖的畫素的明度,區分出縮圖的興趣前景。處理器決定縮圖的興趣前景的縮圖的代表色,提供縮圖的代表色至光源,令光源發出縮圖的代表色的光,並令顯示器播放此影像畫面。The ambient atmosphere adjustment system of the embodiment of the present invention includes (but is not limited to) a display, a light source, and a processor. The display is used to play video images. The light source is used to emit light of various colors. The processor is connected to the display and the light source. The processor performs thumbnail processing on the image frame to obtain a thumbnail image frame, and distinguishes the interest foreground of the thumbnail according to the brightness of the pixels of the multiple thumbnails in the thumbnail image frame. The processor determines the representative color of the thumbnail in the foreground of interest of the thumbnail, provides the representative color of the thumbnail to the light source, makes the light source emit light of the representative color of the thumbnail, and causes the display to display the image.

基於上述,本發明實施例的環境氛圍調整系統及環境氛圍調整方法,依據縮圖的影像畫面中所分割出的興趣前景決定代表色,並隨播放影像畫面的過程中控制光源以對應的代表色發光,使影像畫面與環境氛圍產生關聯。藉此,可提供新穎的氛圍渲染體驗,進而增進觀賞者的視覺體驗。Based on the above, the environmental atmosphere adjustment system and the environmental atmosphere adjustment method according to the embodiments of the present invention determine the representative color according to the interest foreground segmented in the thumbnail image, and control the light source to use the corresponding representative color in the process of playing the image. It emits light, so that the image screen can be related to the ambient atmosphere. Thereby, a novel atmosphere rendering experience can be provided, thereby enhancing the visual experience of the viewer.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more obvious and easy to understand, the following embodiments are given and described in detail with the accompanying drawings as follows.

圖1是依據本發明的一實施例的環境氛圍調整系統100的元件方塊圖。請參照圖1,環境氛圍調整系統100(或稱視訊播放系統)包括(但不僅限於)影像提供裝置110、環境感測器130、顯示器150、光源170及處理器190。FIG. 1 is a block diagram of components of an ambient atmosphere adjusting system 100 according to an embodiment of the present invention. Referring to FIG. 1 , an ambient atmosphere adjustment system 100 (or a video playback system) includes (but is not limited to) an image providing device 110 , an ambient sensor 130 , a display 150 , a light source 170 and a processor 190 .

影像提供裝置110可能是機上盒、電視盒、智慧型手機、平板電腦、桌上型/筆記型電腦、或伺服器等裝置。在一實施例中,影像提供裝置110用以提供影像串流或單一影像畫面。此影像串流或影像畫面可能是經網路下載、外部裝置(例如,隨身碟、硬碟或智慧型手機等)傳送或影像提供裝置110自行產生。在一些實施例中,影像畫面係影像串流中的多張影像畫面中的一張影像畫面。The image providing device 110 may be a set-top box, a TV box, a smart phone, a tablet computer, a desktop/notebook computer, or a server. In one embodiment, the image providing device 110 is used to provide an image stream or a single image frame. The video stream or video frame may be downloaded from the network, transmitted by an external device (eg, a USB flash drive, a hard disk or a smart phone, etc.), or generated by the video providing device 110 by itself. In some embodiments, the image frame is one image frame of a plurality of image frames in the image stream.

環境感測器130包括(但不僅限於)影像擷取裝置131及麥克風133。影像擷取裝置131可以是相機、攝影機或影像感光元件,並用以拍攝所處環境中的環境影像。麥克風133可能是動圈式(dynamic)、電容式(Condenser)、駐極體電容(Electret Condenser)、微機電(Micro Electrical-Mechanical System,MEMS)等類型,並用以錄製所處環境中的環境聲音。The environment sensor 130 includes (but is not limited to) an image capturing device 131 and a microphone 133 . The image capturing device 131 can be a camera, a video camera or an image sensing element, and is used to capture an image of the environment in the environment. The microphone 133 may be of a dynamic type, a condenser type, an electret condenser (Electret Condenser), a Micro Electrical-Mechanical System (MEMS), etc., and is used to record ambient sounds in the environment. .

在一些實施例中,環境感測器130可以是用以感測溫度、亮度、濕度等其他環境因素的感測器。In some embodiments, the environmental sensor 130 may be a sensor for sensing temperature, brightness, humidity, and other environmental factors.

顯示器150可以是液晶顯示器(Liquid-Crystal Display,LCD)、或發光二極體(Light-Emitting Diode,LED)顯示器,也可以是液晶顯示、數位光源處理技術(Digital Light Processing,DLP)等任何類型投影機。在一實施例中,顯示器150用以播放來自影像提供裝置110所提供的影像串流或影像畫面。The display 150 can be a liquid crystal display (Liquid-Crystal Display, LCD), or a light-emitting diode (Light-Emitting Diode, LED) display, or can be any type of liquid crystal display, digital light processing technology (Digital Light Processing, DLP), etc. Projector. In one embodiment, the display 150 is used to play the video stream or the video frame provided by the video providing device 110 .

光源170可以是由一顆或更多顆LED所形成的多色LED。例如,控制紅色LED、綠色LED及藍色LED分別的亮度即可形成多種不同顏色的光線組合。在一實施例中,光源170用以發出多種顏色的光,並在同一時間僅發出一種顏色的光,但在另一時間可發出另一種顏色的光(例如,三原色(即,RGB)光的強度不同的另一種顏色)。此外,光源170可接收特定RGB值及/或明度的設定命令,並依據此特定RGB值及/或明度發光。即,發出此RGB值的顏色且此明度的亮度的光。The light source 170 may be a multi-color LED formed by one or more LEDs. For example, by controlling the respective brightness of the red LED, the green LED and the blue LED, various light combinations of different colors can be formed. In one embodiment, the light source 170 is configured to emit light of multiple colors, and only emit light of one color at the same time, but may emit light of another color at another time (eg, three primary colors (ie, RGB) of light. another color with a different intensity). In addition, the light source 170 can receive a setting command of a specific RGB value and/or brightness, and emit light according to the specific RGB value and/or brightness. That is, it emits light of the color of this RGB value and the brightness of this lightness.

在一實施例中,光源170是由環狀排列的LED所形成,使其發射的光線可到達所處環境中更多範圍。In one embodiment, the light source 170 is formed by LEDs arranged in a ring shape, so that the light emitted by the light source 170 can reach more areas in the environment.

需說明的是,本發明實施例不限制光源170中LED的數量、顏色、排列及擺放方式。此外,光源170的數量也可能超過一個。It should be noted that the embodiments of the present invention do not limit the quantity, color, arrangement and arrangement of the LEDs in the light source 170 . In addition, the number of light sources 170 may also exceed one.

處理器190可以是CPU、微控制器、晶片、特殊應用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式化邏輯閘陣列(Field Programmable Gate Array,FPGA)等處理單元。處理器190有線或無線地連接影像提供裝置110、環境感測器130、顯示器150及光源170。在一些實施例中,環境感測器130、顯示器150、光源170及處理器190中的至少兩者可能整合成單一裝置。The processor 190 may be a processing unit such as a CPU, a microcontroller, a chip, an Application Specific Integrated Circuit (ASIC), or a Field Programmable Gate Array (FPGA). The processor 190 is wired or wirelessly connected to the image providing device 110 , the environment sensor 130 , the display 150 and the light source 170 . In some embodiments, at least two of the environmental sensor 130, the display 150, the light source 170, and the processor 190 may be integrated into a single device.

在本實施例中,處理器190可接收影像提供裝置110所提供的影像串流或影像畫面及環境感測器130的感測結果(例如,環境聲音、環境影像等),控制顯示器150播放影像,並控制光源170以特定顏色及亮度發光,且其詳細運作待後續實施例詳述。In this embodiment, the processor 190 may receive the image stream or image frame provided by the image providing device 110 and the sensing result (eg, ambient sound, ambient image, etc.) of the environment sensor 130, and control the display 150 to play the image , and control the light source 170 to emit light with a specific color and brightness, and its detailed operation will be described in detail in subsequent embodiments.

值得注意的是,光源170所發射的光線可讓觀賞者看到。當觀賞者在觀看影像串流或影像畫面時,也會受到光源170發出光線的影響。特定顏色及/或亮度的光會營造出不同的環境氛圍。若能將光源170的發光運作連動影像串流或影像畫面的內容,將有助於提升觀看者的視覺體驗。It is worth noting that the light emitted by the light source 170 can be seen by the viewer. When the viewer is watching the video stream or the video frame, it is also affected by the light emitted by the light source 170 . Lights of a specific color and/or brightness create different ambient ambiences. If the light-emitting operation of the light source 170 can be linked to the content of the video stream or the video frame, it will help to improve the viewing experience of the viewer.

為了幫助理解實施例的操作流程,以下將搭配圖1中環境氛圍調整系統100的裝置及機構部件來說明。圖2是依據本發明的一實施例的環境氛圍調整方法的流程圖。請參照圖2,處理器190接收影像提供裝置110所提供的影像串流或影像畫面。需說明的是,前述影像串流中多張影像畫面的影格間距可能是10、30或60張等或取樣頻率為每秒1、2、或6張影像畫面等。即,僅自影像串流中取得部分影像畫面。此外,影格間距或取樣頻率可能固定或可被變動。藉此,可運算效率,並可提供較為舒適的光源變化速度。In order to help understand the operation flow of the embodiment, the following description will be combined with the devices and mechanism components of the environment adjustment system 100 in FIG. 1 . FIG. 2 is a flow chart of a method for adjusting environmental atmosphere according to an embodiment of the present invention. Referring to FIG. 2 , the processor 190 receives an image stream or an image frame provided by the image providing device 110 . It should be noted that, the frame spacing of the plurality of image frames in the aforementioned video stream may be 10, 30, or 60 frames, etc., or the sampling frequency may be 1, 2, or 6 image frames per second. That is, only part of the video frame is obtained from the video stream. Additionally, the frame spacing or sampling frequency may be fixed or may be varied. Thereby, calculation efficiency can be achieved, and a more comfortable light source change speed can be provided.

為了提升後續處理速度,處理器190會對影像畫面進行影像前處理。處理器190可對原始的影像畫面(例如,R(紅色)G(綠色)B(藍色)影像)進行縮圖處理(例如,降低解析度),以產生縮圖的影像畫面(步驟S210)。例如,處理器190將解析度1280*768的原始影像畫面經縮圖至十六分之一之後,產生解析度320*192的縮圖的影像畫面。In order to improve the subsequent processing speed, the processor 190 performs image pre-processing on the image frame. The processor 190 may perform thumbnail processing (eg, reducing the resolution) on the original image frame (eg, the R (red) G (green) B (blue) image) to generate a thumbnail image frame (step S210 ). . For example, the processor 190 generates a thumbnail image with a resolution of 320*192 after the original image with a resolution of 1280*768 is thumbnailed to one-sixteenth.

在一些實施例中,處理器190還對縮圖的影像畫面,進行灰階處理,以取得縮圖的灰階影像。例如,處理器190計算影像畫面中各畫素的明度為其0.299的紅色強度值、0.857的綠色強度值及0.114的藍色強度值的總和。處理器190即可自灰階影像中得出各畫素對應的明度。In some embodiments, the processor 190 further performs gray-scale processing on the image frame of the thumbnail to obtain a gray-scale image of the thumbnail. For example, the processor 190 calculates the brightness of each pixel in the image frame as the sum of the red intensity value of 0.299, the green intensity value of 0.857, and the blue intensity value of 0.114. The processor 190 can obtain the brightness corresponding to each pixel from the grayscale image.

圖3是一範例說明縮圖的影像畫面。請參照圖3,圖中所示為縮圖的影像畫面。圖4是一範例說明縮圖的灰階影像。請參照圖4,圖中所示為基於圖3縮圖的影像畫面的灰階影像。FIG. 3 is an example of an image screen illustrating a thumbnail image. Please refer to FIG. 3 , which shows a thumbnail image screen. FIG. 4 is a grayscale image illustrating an example of a thumbnail. Please refer to FIG. 4 , which shows a grayscale image of the image frame based on the thumbnail of FIG. 3 .

接著,處理器190對縮圖的影像畫面,進行前景分割處理,以取得縮圖的興趣前景(步驟S220)。值得注意的是,大部分的影像畫面是由前景(例如,人、動物、或物品等)及背景(例如,天空、山、或海等)所構成。而觀賞者通常會較注意前景內容,因此本發明實施例將先分割出觀賞者較有興趣的前景(下文以興趣前景統稱)。前景分割處理的方法有很多種。在本發明實施例中,處理器190可依據縮圖的影像畫面中多個畫素的明度區分出縮圖的興趣前景。具體而言,明度可以稱為灰階度或灰度值。一般而言,影像畫面中的前景與背景之間的明度有明顯的差異。而本發明實施例即是基於這樣的差異來分割前景。Next, the processor 190 performs foreground segmentation processing on the image frame of the thumbnail, so as to obtain the interesting foreground of the thumbnail (step S220 ). It should be noted that most of the image frames are composed of foreground (eg, people, animals, or objects, etc.) and background (eg, sky, mountain, or sea, etc.). The viewer usually pays more attention to the foreground content, so the embodiment of the present invention will first segment the foreground that the viewer is more interested in (hereinafter collectively referred to as the interesting foreground). There are many methods for foreground segmentation processing. In the embodiment of the present invention, the processor 190 can distinguish the foreground of interest of the thumbnail according to the brightness of a plurality of pixels in the image frame of the thumbnail. Specifically, lightness can be referred to as gray scale or gray value. Generally speaking, there is a significant difference in brightness between the foreground and background in an image. The embodiment of the present invention divides the foreground based on such a difference.

取得灰階影像之後,處理器190可對灰階影像進行前景分割處理。圖5A是依據本發明的一實施例的前景分割處理的流程圖。請參照圖5A,處理器190可將縮圖的影像畫面中明度過低(例如,低於75、60、或50等)及/或明度過高(例如,高於225、230、或250等)等極端值的畫素過濾掉(步驟S226)。After obtaining the grayscale image, the processor 190 may perform foreground segmentation processing on the grayscale image. 5A is a flowchart of a foreground segmentation process according to an embodiment of the present invention. Referring to FIG. 5A , the processor 190 can make the brightness of the thumbnail image too low (eg, lower than 75, 60, or 50, etc.) and/or too high (eg, higher than 225, 230, or 250, etc.) ) and other extreme values are filtered out (step S226).

在一實施例中,處理器190可設定高明度門檻值(例如,75、60、或50等),過濾縮圖的影像畫面中明度高於高明度門檻值的一個或更多個畫素,並保留縮圖的影像畫面中明度低於高明度門檻值的剩餘畫素(即,未被過濾的其餘畫素作為保留畫素)。In one embodiment, the processor 190 may set a high brightness threshold (eg, 75, 60, or 50, etc.) to filter one or more pixels in the thumbnail image whose brightness is higher than the high brightness threshold, And keep the remaining pixels in the thumbnail image whose brightness is lower than the high brightness threshold (ie, the remaining pixels that are not filtered are reserved pixels).

在另一實施例中,處理器190可設定低明度門檻值(例如,225、230、或250等),過濾縮圖的影像畫面中明度低於低明度門檻值的一個或更多個畫素,並保留縮圖的影像畫面中明度高於低明度門檻值的剩餘該畫素。例如,灰階影像包括61440個畫素,經濾波後保留43008個畫素。In another embodiment, the processor 190 may set a low brightness threshold (eg, 225, 230, or 250, etc.) to filter one or more pixels whose brightness is lower than the low brightness threshold in the thumbnail image. , and keep the remaining pixels in the thumbnail image whose brightness is higher than the low brightness threshold. For example, a grayscale image includes 61,440 pixels, with 43,008 remaining after filtering.

再一實施例中,處理器190可統計單一影像畫面中各明度的畫素數量。若明度高於高明度門檻值的畫素數量大於過濾門檻值,則處理器190對這些畫素進行高通濾波處理。例如,過濾掉明度高於225的畫素。若明度低於高明度門檻值的畫素數量大於過濾門檻值,則處理器190對這些畫素進行低通濾波處理。例如,過濾掉明度低於75的畫素。在另一實施例中,處理器190可進行低通濾波與高通濾波兩階段處理。例如,先濾掉明度小於100的畫素,再濾掉明度大於200的畫素。又一實施例中,處理器190可進行中通(帶通)濾波處理。即,保留明度介於低明度門檻值與高明度門檻值之間的畫素。例如,保留明度介於50到220的畫素。In yet another embodiment, the processor 190 may count the number of pixels of each brightness in a single image frame. If the number of pixels whose brightness is higher than the high brightness threshold is greater than the filtering threshold, the processor 190 performs high-pass filtering on these pixels. For example, filter out pixels with lightness higher than 225. If the number of pixels whose brightness is lower than the high brightness threshold is greater than the filtering threshold, the processor 190 performs low-pass filtering on these pixels. For example, filter out pixels with lightness below 75. In another embodiment, the processor 190 may perform two-stage processing of low-pass filtering and high-pass filtering. For example, first filter out pixels with lightness less than 100, and then filter out pixels with lightness greater than 200. In yet another embodiment, the processor 190 may perform mid-pass (band-pass) filtering processing. That is, pixels whose lightness is between the low lightness threshold and the high lightness threshold are reserved. For example, keep pixels with lightness between 50 and 220.

圖5B是一範例說明極端值過濾。請參照圖5B,灰階影像經低通濾波後,黑色背景將被過濾,且受保留的灰階影像明顯僅剩草莓的影像。FIG. 5B is an example illustrating extreme value filtering. Referring to FIG. 5B , after the gray-scale image is low-pass filtered, the black background will be filtered, and the retained gray-scale image is obviously only the strawberry image.

需說明的是,高明度門檻值高於低明度門檻值,但高明度門檻值與低明度門檻值的數值仍可依據實際需求而決定並可能依據對應畫素數量而改變。It should be noted that the high-brightness threshold is higher than the low-brightness threshold, but the values of the high-brightness threshold and the low-brightness threshold can still be determined according to actual needs and may be changed according to the number of corresponding pixels.

接著,處理器190依據縮圖的影像畫面中的一個或更多個保留的剩餘畫素的明度,決定用於轉換二值化影像的臨界明度值。這些保留的剩餘畫素是步驟S226中未被過濾的畫素。由於不同縮圖的影像畫面中的明度分佈可能不同,單一臨界明度值可能不適用所有的影像畫面,因此本發明實施例會基於當前影像畫面的亮度分佈來動態改變臨界明度值(步驟S227)。自適應(adaptive)臨界明度值的演算法有很多種,例如,大津(OTSU)演算法(可精準區分兩個差異最大的灰階畫素群)、畫素灰度值平均(即,單一影像中所有畫素的明度加總除以所有畫素數量,且運算快)演算法、或高斯演算法等。Next, the processor 190 determines a critical brightness value for converting the binarized image according to the brightness of one or more remaining remaining pixels in the thumbnail image frame. These remaining remaining pixels are the unfiltered pixels in step S226. Since the brightness distribution in the image frames of different thumbnails may be different, a single critical brightness value may not be applicable to all the image frames. Therefore, the embodiment of the present invention dynamically changes the critical brightness value based on the brightness distribution of the current image frame (step S227 ). There are many algorithms for adaptive critical lightness value, such as Otsu (OTSU) algorithm (which can accurately distinguish two gray-scale pixel groups with the greatest difference), pixel gray value averaging (that is, a single image The sum of the brightness of all the pixels in the pixel is divided by the number of all the pixels, and the calculation is fast) algorithm, or Gaussian algorithm, etc.

接著,處理器190可將縮圖的灰階影像轉換成縮圖的二值化影像(步驟S228)。具體而言,處理器190可依據設定的臨界明度值,對縮圖的灰階影像,進二值化處理,以取得縮圖的二值化影像。影像二值化處理是將明度高於臨界明度值的畫素改變成亮度最大值(例如,255),並將明度低於臨界明度值的畫素改變成亮度最小值(例如,0),從而實現二值化。即,僅有最大及最小值。例如,若臨界明度值為154,則明度小於154的畫素設為黑色,且明度大於154的畫素設為白色。Next, the processor 190 may convert the grayscale image of the thumbnail into a binarized image of the thumbnail (step S228 ). Specifically, the processor 190 may perform a binarization process on the grayscale image of the thumbnail according to the set threshold brightness value, so as to obtain the binarized image of the thumbnail. The image binarization process is to change the pixels whose brightness is higher than the critical brightness value to the maximum brightness value (for example, 255), and change the pixels whose brightness is lower than the critical brightness value to the minimum brightness value (for example, 0), so as to implement binarization. That is, there are only maximum and minimum values. For example, if the critical lightness value is 154, pixels with lightness less than 154 are set to black, and pixels with lightness greater than 154 are set to white.

圖5C是一範例說明影像二值化。請參照圖5C,經二值化處理,二值化影像中的草莓影像將更為凸顯。FIG. 5C is an example illustrating image binarization. Referring to FIG. 5C , after the binarization process, the strawberry image in the binarized image will be more prominent.

接著,處理器190可對縮圖的影像畫面與縮圖的二值化影像,進行交集處理,以取得縮圖的興趣前景。這些明度低於臨界明度值的畫素將被視為興趣前景中的畫素。即,二值化影像中具有較小亮度值的畫素形成興趣前景。處理器190可依據二值化影像中視為興趣前景的那些畫素(即,具有較小亮度值的畫素)的位置對照原始縮圖的影像畫面(具有顏色)的相同位置(即,位置交集處),從而自原始縮圖的影像畫面中分割出具有顏色的興趣前景的影像。Next, the processor 190 may perform intersection processing on the image frame of the thumbnail and the binarized image of the thumbnail, so as to obtain an interesting foreground of the thumbnail. Those pixels with a lightness below the critical lightness value will be considered as pixels in the foreground of interest. That is, pixels with smaller luminance values in the binarized image form the foreground of interest. The processor 190 can compare the same position (ie, the intersection of positions) of the image frame (with color) of the original thumbnail according to the positions of those pixels in the binarized image that are regarded as the foreground of interest (ie, pixels with smaller luminance values) ), thereby segmenting an image with a color foreground of interest from the original thumbnail image.

需說明的是,在一些實施例中,步驟S226及/或步驟S227可忽略。即,不過濾極端值或使用固定臨界明度值。It should be noted that, in some embodiments, step S226 and/or step S227 may be ignored. That is, do not filter extreme values or use a fixed critical lightness value.

請參照圖2,決定興趣前景之後,處理器190可依據縮圖的興趣前景,決定縮圖的代表色(步驟S230)。具體而言,縮圖的興趣前景仍可能包括非常多種顏色,處理器190將進一步這些顏色中挑選出代表整張縮圖的影像畫面的單一代表色。Referring to FIG. 2 , after determining the interest foreground, the processor 190 may determine the representative color of the thumbnail according to the interest foreground of the thumbnail (step S230 ). Specifically, the interest foreground of the thumbnail may still include many colors, and the processor 190 will further select a single representative color representing the image frame of the entire thumbnail from these colors.

在一實施例中,處理器190可對縮圖的興趣前景的數個興趣畫素區分成數個色彩群組,且依據這些色彩群組中的畫素數量決定代表色的顏色。具體而言,興趣畫素是指興趣前景對應的那些樣素。而本發明實施例是基於統計的集群分析來挑選代表色。In one embodiment, the processor 190 may divide several interest pixels in the foreground of interest in the thumbnail into several color groups, and determine the color of the representative color according to the number of pixels in these color groups. Specifically, the interest pixels refer to those pixels corresponding to the interest foreground. In the embodiment of the present invention, the representative color is selected based on statistical cluster analysis.

代表色決定的實施例有很多種。圖6是依據本發明的一實施例的代表色決定的流程圖。請參照圖6,分群聚類的演算法有很多種。處理器190可使用諸如K-Mean、K-Medoid等分群(clustering)聚類演算法(收斂速度快,調校參數較少)來將那些興趣畫素區分到特定數量的色彩群組(步驟S610)。同一色彩群組中的那些興趣畫素的顏色可能較為接近或僅有單一顏色,且各色彩群組對應一種代表色。若色彩群組包括不同顏色的興趣畫素,則同一色彩群組中的那些興趣畫素的RGB值的平均值、中位數、或眾數等數值可作為此色彩群組的代表色的RGB值。處理器190可計算縮圖的色彩群組的畫素數量(即,那些縮圖的色彩群組所包括的畫素的數量)(步驟S630),並依據數量多寡排序那些縮圖的色彩群組,且挑選畫素數量最多的縮圖的色彩群組的代表色作為最終的縮圖的代表色(步驟S650)。例如,畫素數量最多的代表色的RGB值為紅色128、綠色170及藍色50。There are many examples of representative color determination. FIG. 6 is a flowchart of representative color determination according to an embodiment of the present invention. Please refer to FIG. 6 , there are many kinds of clustering algorithms. The processor 190 can use a clustering algorithm such as K-Mean, K-Medoid, etc. (fast convergence speed and less tuning parameters) to distinguish those pixels of interest into a specific number of color groups (step S610 ). ). The colors of the pixels of interest in the same color group may be relatively close or only have a single color, and each color group corresponds to one representative color. If a color group includes interest pixels of different colors, the average, median, or mode of the RGB values of those interest pixels in the same color group can be used as the RGB of the representative color of this color group value. The processor 190 may calculate the number of pixels in the color groups of the thumbnails (ie, the number of pixels included in the color groups of those thumbnails) (step S630 ), and sort the color groups of the thumbnails according to the number , and the representative color of the color group of the thumbnail with the largest number of pixels is selected as the final representative color of the thumbnail (step S650 ). For example, the RGB values of the representative color with the largest number of pixels are 128 for red, 170 for green, and 50 for blue.

圖7是一範例說明代表色的決定。請參照圖7,對彩色的縮圖的影像畫面及縮圖的二值化影像進行交集處理可得出縮圖的興趣前景(即,草莓的影像)。而草莓影像中紅色所占數量最多,因此紅色可做為最終的代表色。FIG. 7 is an example illustrating the determination of the representative color. Referring to FIG. 7 , the interest foreground of the thumbnail (ie, the image of strawberry) can be obtained by performing intersection processing on the image frame of the colored thumbnail and the binarized image of the thumbnail. The strawberry image has the largest amount of red, so red can be used as the final representative color.

需說明的是,步驟S650中是挑選畫素數量最多者,然在其他實施例中,也可能是挑選畫素數量次多、第三多或其他排序的色彩群組。It should be noted that, in step S650, the color group with the largest number of pixels is selected, but in other embodiments, the color group with the second largest number of pixels, the third largest number of pixels, or other sorted color groups may also be selected.

圖8是依據本發明的另一實施例的代表色決定的流程圖(其優勢在於運算量較少, 可增加運算速度,並可降低環境光線的影響)。請參照圖8,處理器190將縮圖的興趣前景的那些縮圖的興趣畫素自三原色光(即,RGB)色彩空間轉換至色度彩度明度(Hue Saturation Lightness,HSV)色彩空間(步驟S810)。例如,處理器190可統計興趣畫素中各RGB值的畫素數量,以形成RGB色彩空間資料。接著,處理器190將RGB色彩空間中的座標轉換到HSV色彩空間的座標,並基於先前統計的畫素數量決定各HSV值的畫素數量,以形成HSV色彩空間資料。FIG. 8 is a flowchart of representative color determination according to another embodiment of the present invention (the advantage is that the amount of computation is less, the computation speed can be increased, and the influence of ambient light can be reduced). Referring to FIG. 8 , the processor 190 converts the interest pixels of those thumbnails in the foreground of interest from the three primary color light (ie, RGB) color space to the Hue Saturation Lightness (HSV) color space (step S810). For example, the processor 190 may count the number of pixels of each RGB value in the pixel of interest to form RGB color space data. Next, the processor 190 converts the coordinates in the RGB color space to the coordinates in the HSV color space, and determines the number of pixels of each HSV value based on the previously counted number of pixels to form HSV color space data.

處理器190可對HSV色彩空間,根據多個預定色度,定義出多個縮圖的色度區塊,且這些色度區塊將作為前述縮圖的色彩群組。即,對HSV色彩空間劃分縮圖的色彩群組。The processor 190 may define a plurality of chromaticity blocks of thumbnails according to a plurality of predetermined chromaticities for the HSV color space, and these chromaticity blocks will be used as color groups of the aforementioned thumbnails. That is, the color groups of the thumbnails are divided into the HSV color space.

圖9是依據本發明的一實施例的色度區塊決定的流程圖,且圖10A是一範例說明色度區塊1011。請參照圖9及圖10A,處理器190提供色度統計容器(步驟S910)(如圖10A所示色度統計容器1010,即HSV色彩空間的頂部視角),並將色度統計容器依據預定色度單位由頂部(最亮)至底部(最暗)劃分成複數個色度區塊(步驟S930)。FIG. 9 is a flowchart of chroma block determination according to an embodiment of the present invention, and FIG. 10A is an example illustrating a chroma block 1011 . Referring to FIG. 9 and FIG. 10A , the processor 190 provides a chromaticity statistics container (step S910 ) (the chromaticity statistics container 1010 shown in FIG. 10A , that is, the top viewing angle of the HSV color space), and sets the chromaticity statistics container according to the predetermined color. The degree unit is divided into a plurality of chroma blocks from the top (brightest) to the bottom (darkest) (step S930 ).

預定色度單位將決定色度區塊的大小。預定色度單位可能是其他等角度(例如,45度、15度等),亦可能是不等角度劃分(例如,某一個色度區塊是337.5度至22.5度,另一個色度區塊是22.5至37.5度,且再一個色度區塊是37.5至82.5度等)。如圖10A所示八個相同大小的色度區塊1011是色度統計容器1010經八等分且等角度劃分所形成。圖10B是另一範例說明色度區塊1013。請參照圖10B,不同色度區塊1013是色度統計容器1010不等角度劃分所形成。The predetermined chrominance unit will determine the size of the chrominance block. The predetermined chromaticity unit may be other equal angles (for example, 45 degrees, 15 degrees, etc.), or may be unequal angle divisions (for example, a certain chromaticity block is 337.5 degrees to 22.5 degrees, and another chromaticity block is 22.5 to 37.5 degrees, and another chroma block is 37.5 to 82.5 degrees, etc.). As shown in FIG. 10A , eight chrominance blocks 1011 of the same size are formed by dividing the chrominance statistics container 1010 into eight equal parts and equal angles. FIG. 10B is another example illustrating the chroma block 1013 . Referring to FIG. 10B , the different chromaticity blocks 1013 are formed by unequal angle division of the chromaticity statistics container 1010 .

此外,處理器190可進一步對HSV色彩空間,根據多個預定彩度與多個預定明度,定義出多個縮圖的彩度暨明度區塊。圖11是依據本發明的一實施例的彩度暨明度區塊決定的流程圖,且圖12A是一範例說明第二色度區塊1211。請參照圖11及圖12A,處理器190提供彩度暨明度統計容器(步驟S1110)(如圖12所示彩度暨明度統計容器1210,以HSV色彩空間的立體圖觀點而言),並將彩度暨明度統計容器1210依據另一預定色度單位由頂部(最亮)至底部(最暗)劃分成複數個第二色度區塊(作為縮圖的色彩群組)(步驟S1130)。此第二色度區塊是對各色度區塊再進一步劃分所形成,且各色度區塊的預定色度單位將大於其中的第二色度區塊的預定色度單位。例如,色度區塊的預定色度單位是等角度的45度,而第二色度區塊的預定色度單位包括不等角度的10度、15度及20度。如圖12A所示第二色度區塊1211的色度範圍相較於圖10A的色度區塊1011的色度範圍更小。In addition, the processor 190 can further define a plurality of chroma and lightness blocks of the thumbnails according to a plurality of predetermined chroma and a plurality of predetermined lightness for the HSV color space. FIG. 11 is a flowchart of determination of chrominance and luminance blocks according to an embodiment of the present invention, and FIG. 12A is an example illustrating the second chrominance block 1211 . 11 and FIG. 12A , the processor 190 provides a chroma and lightness statistics container (step S1110 ) (the chroma and lightness statistics container 1210 shown in FIG. 12 , in terms of the perspective of the HSV color space), and converts the color The luminance and lightness statistics container 1210 is divided into a plurality of second chromaticity blocks (color groups as thumbnails) from the top (brightest) to the bottom (darkest) according to another predetermined chromaticity unit (step S1130 ). The second chrominance block is formed by further dividing each chrominance block, and the predetermined chrominance unit of each chrominance block is larger than the predetermined chrominance unit of the second chrominance block therein. For example, the predetermined chromaticity unit of the chrominance block is 45 degrees of equal angle, and the predetermined chromaticity unit of the second chromaticity block includes 10 degrees, 15 degrees and 20 degrees of unequal angles. As shown in FIG. 12A , the chromaticity range of the second chrominance block 1211 is smaller than that of the chrominance block 1011 of FIG. 10A .

接著,處理器190對各第二色度區塊再分別依據預定彩度單位及預定明度單位,劃分成複數個彩度暨明度區塊(步驟S1150)。各第二色度區塊的彩度暨明度區塊對應的色度受限於對應(或所屬)色度區塊的色度範圍。預定彩度單位及預定明度單位將決定彩度暨明度區塊的大小。假設彩度及明度(即,亮度)是0%至100%的數值。預定彩度單位及預定明度單位可能是相同範圍(例如,每10%、20%或30%等間距劃分)。如圖12B所示為一範例說明彩度暨明度區塊1213,各彩度暨明度區塊1213的明度S的範圍或彩度V的範圍一致。或者,預定彩度單位及預定明度單位也可能包括多種不同範圍(例如,包括10%、25%或45%等間距)。Next, the processor 190 divides each second chrominance block into a plurality of chrominance and luminance blocks according to the predetermined chrominance unit and the predetermined luminance unit respectively (step S1150 ). The chrominance corresponding to the chrominance and luminance blocks of each second chrominance block is limited by the chrominance range of the corresponding (or belonging) chrominance block. The predetermined chroma unit and the predetermined brightness unit will determine the size of the chroma and brightness block. It is assumed that chroma and lightness (ie, brightness) are values from 0% to 100%. The predetermined chroma unit and the predetermined lightness unit may be the same range (eg, equally spaced every 10%, 20%, or 30%). As shown in FIG. 12B , an example is illustrated for the chroma and lightness blocks 1213 , and the range of lightness S or the range of chroma V of each chroma and lightness block 1213 is the same. Alternatively, the predetermined chroma unit and the predetermined lightness unit may also include a variety of different ranges (eg, including 10%, 25%, or 45% equal spacing).

請返回圖8,這些區塊經定義後,處理器190可依據HSV色彩空間資料,統計那些縮圖的色度區塊、以及縮圖的彩度暨明度區塊的畫素數量(步驟S830)。即,統計各縮圖的色度區塊中的畫素的總數量及各縮圖的彩度暨明度區塊中的畫素的總數量。值得注意的是,縮圖的色度區塊的畫素數量即是,其下的所有第二色度區塊的所有縮圖的彩度暨明度區塊的畫素數量的總和。Returning to FIG. 8 , after these blocks are defined, the processor 190 can count the chrominance blocks of the thumbnails and the number of pixels of the chroma and luminance blocks of the thumbnails according to the HSV color space data (step S830 ). . That is, the total number of pixels in the chrominance blocks of each thumbnail and the total number of pixels in the chrominance and lightness blocks of each thumbnail are counted. It is worth noting that the number of pixels of the chroma block of the thumbnail is the sum of the number of pixels of the chroma and luminance blocks of all the thumbnails of all the second chroma blocks below it.

在本實施例中,處理器190依據那些縮圖的色度區塊的畫素數量決定縮圖的代表色(即,顏色)。處理器190可將依據畫素數量多寡排序那些縮圖的色度區塊(步驟S850),並判斷那些縮圖的色度區塊的畫素數量是否達到預定佔比數量(例如,百分之三十、四十或五十等佔比的對應數量)(步驟S870)。例如,處理器190可依序讀取預定數目的縮圖的色度區塊與其畫素數量,並判斷這些畫素數量的總和、平均值或其中任一數值是否大於預定佔比數量。In this embodiment, the processor 190 determines the representative color (ie, color) of the thumbnails according to the number of pixels in the chroma blocks of those thumbnails. The processor 190 may sort the chroma blocks of the thumbnails according to the number of pixels (step S850 ), and determine whether the number of pixels of the chroma blocks of the thumbnails reaches a predetermined proportion (for example, a percentage of 30, 40 or 50 and the corresponding number) (step S870). For example, the processor 190 may sequentially read a predetermined number of chroma blocks and the number of pixels of the thumbnails, and determine whether the sum, average or any value of the number of pixels is greater than the predetermined proportion.

若一個或更多個縮圖的色度區塊的畫素數量達到預定佔比數量,則處理器190可依據一個或更多個縮圖的色度區塊中的第二色彩區塊對應的縮圖的彩度暨明度區塊的畫素數量決定代表色(步驟S871)。例如,處理器190可對一個或更多個縮圖的色度區塊,根據那些預定彩度與多個預定明度,定義出那些縮圖的彩度暨明度區塊。處理器190根據那些縮圖的彩度暨明度區塊,劃分出那些縮圖的色彩群組。處理器190依據縮圖的色彩群組,對應的縮圖的彩度暨明度區塊的畫素數量,選定具有最大或最多畫素數量的縮圖的彩度暨明度區塊,並判斷其所屬色度區塊(作為受選色度區塊,並為縮圖的色彩群組對應的縮圖的色度區塊)對應的色度範圍。又例如,處理器190直接取得具有最多畫素數量的色度區塊(作為受選色度區塊),並判斷其對應的色度範圍。再例如,處理器190可自那些預定數目的色度區塊中挑選一個或更多個色度區塊作為受選色度區塊。If the number of pixels in the chroma blocks of the one or more thumbnails reaches a predetermined proportion, the processor 190 may determine the pixel count corresponding to the second color block in the chroma blocks of the one or more thumbnails according to the The number of pixels in the chroma and lightness blocks of the thumbnail determines the representative color (step S871 ). For example, the processor 190 may define the chroma and lightness blocks of one or more thumbnails according to those predetermined chroma and a plurality of predetermined lightness. The processor 190 divides the color groups of the thumbnails according to the chroma and lightness blocks of the thumbnails. The processor 190 selects the chroma and lightness block of the thumbnail with the largest or the largest number of pixels according to the color group of the thumbnail and the number of pixels of the corresponding chroma and lightness block of the thumbnail, and determines the chroma and lightness block of the thumbnail to which it belongs The chroma range corresponding to the chroma block (as the selected chroma block and the chroma block of the thumbnail corresponding to the color group of the thumbnail). For another example, the processor 190 directly obtains the chroma block with the largest number of pixels (as the selected chroma block), and determines the corresponding chroma range. As another example, the processor 190 may select one or more chroma blocks from those predetermined number of chroma blocks as selected chroma blocks.

處理器190即可依據選定的縮圖的色彩群組,決定縮圖的代表色。圖13是依據本發明的一實施例的代表色決定的流程圖。請參照圖13,處理器190可自那些色度區塊中的受選色度區塊(即,縮圖的色彩群組對應的縮圖的色度區塊)中取得縮圖的色度值,且依據此受選色度區塊對應的縮圖的彩度暨明度區塊中,取得縮圖的彩度暨明度值(包括縮圖的彩度與縮圖的明度值)(步驟S1310)。例如,色度值可以是受選色度區塊中的色度範圍中的色度平均值、色度中位數、色度最小值、色度最大值或其中任一色度數值。又例如,彩度暨明度值可以是具有最多畫素數量的縮圖的彩度暨明度區塊的彩度暨明度平均值、彩度暨明度中位數、彩度暨明度最小值、彩度暨明度最大值或其中任一數值。再例如,彩度暨明度值可以是受選色度區塊中那些縮圖的彩度暨明度區塊中的彩度暨明度平均值、彩度暨明度中位數、彩度暨明度最小值、彩度暨明度最大值或其中任一數值。The processor 190 can determine the representative color of the thumbnail according to the selected color group of the thumbnail. FIG. 13 is a flowchart of representative color determination according to an embodiment of the present invention. Referring to FIG. 13 , the processor 190 can obtain the chroma values of the thumbnails from the selected chroma blocks (ie, the chroma blocks of the thumbnails corresponding to the color groups of the thumbnails) among those chroma blocks. , and according to the chroma and brightness block of the thumbnail corresponding to the selected chroma block, obtain the chroma and brightness value of the thumbnail (including the chroma of the thumbnail and the brightness value of the thumbnail) (step S1310) . For example, the chrominance value may be the chrominance mean, chrominance median, chrominance minimum, chrominance maximum, or any chrominance value in the chrominance range in the selected chrominance block. For another example, the chroma and lightness value may be the average value of chroma and lightness, the median value of chroma and lightness, the minimum value of chroma and lightness, the minimum value of chroma and lightness, the Cum brightness maximum or any value. For another example, the chroma and lightness values may be the average value of chroma and lightness, the median value of chroma and lightness, and the minimum value of chroma and lightness in the chroma and lightness blocks of the thumbnails in the selected chroma block. , the maximum value of chroma and lightness or any of them.

接著,處理器190可依據此色度值及此彩度暨明度值批次決定影像畫面在RGB色彩空間中的縮圖的代表色(步驟S1330)。即,將色度值及彩度暨明度值轉換成RGB值,並將此RGB值作為縮圖的代表色。Next, the processor 190 may determine the representative color of the thumbnail of the image frame in the RGB color space according to the chrominance value and the chrominance and lightness value batches (step S1330 ). That is, the chromaticity value and the chrominance and lightness value are converted into RGB values, and the RGB values are used as the representative colors of the thumbnails.

請返回圖8,若未有任一個縮圖的色度區塊的畫素數量達到預定佔比數量,則處理器190可自那些縮圖的色度區塊中的畫素數量最大或最多者中亂數決定此縮圖的代表色(步驟S873)。圖14是依據本發明的另一實施例的代表色決定的流程圖。請參照圖14,處理器190可自那些色度區塊中取得具有最大畫素數量的縮圖的受選色度區塊(步驟S1410),自此受選色度區塊(例如,前述畫素數量最多者)中取得第二色度值,且依據此受選色度區塊對應的彩度暨明度區塊取得第二彩度暨明度值(步驟S1430)。例如,第二色度值可以是受選色度區塊中的色度範圍中的色度平均值、色度中位數、色度最小值、色度最大值或其中任一色度數值。又例如,第二彩度暨明度值可以是具有最多畫素數量的縮圖的彩度暨明度區塊的彩度暨明度平均值、彩度暨明度中位數、彩度暨明度最小值、彩度暨明度最大值或其中任一數值。再例如,第二彩度暨明度值可以是受選色度區塊中那些縮圖的彩度暨明度區塊中的彩度暨明度平均值、彩度暨明度中位數、彩度暨明度最小值、彩度暨明度最大值或其中任一數值。Returning to FIG. 8 , if the number of pixels in the chroma blocks of none of the thumbnails reaches the predetermined proportion, the processor 190 may select the largest or the largest number of pixels from the chroma blocks of those thumbnails. The random number determines the representative color of the thumbnail (step S873). FIG. 14 is a flowchart of representative color determination according to another embodiment of the present invention. Referring to FIG. 14 , the processor 190 can obtain the selected chroma block of the thumbnail with the largest number of pixels from those chroma blocks (step S1410 ), and then the selected chroma block (eg, the above-mentioned picture) The second chrominance value is obtained from the one with the largest number of pixels), and the second chrominance and lightness value is obtained according to the chrominance and lightness block corresponding to the selected chrominance block (step S1430). For example, the second chrominance value may be the chrominance mean, chrominance median, chrominance minimum, chrominance maximum, or any chrominance value in the chromaticity range in the selected chrominance block. For another example, the second chroma and lightness value may be the average value of chroma and lightness, the median value of chroma and lightness, the minimum value of chroma and lightness, the average value of chroma and lightness of the thumbnail with the largest number of pixels, the The maximum value of chroma and lightness or any of them. For another example, the second chroma and lightness value may be the average value of chroma and lightness, the median value of chroma and lightness, the average value of chroma and lightness, the median value of chroma and lightness, the chroma and lightness of those thumbnails in the selected chroma block. Minimum value, maximum chroma and lightness value, or any of them.

接著,處理器190可依據此第二色度值及此第二彩度暨明度值亂數決定第三色度值及第三彩度暨明度值(作為縮圖的色彩群組)(步驟S1450)。具體而言,第三色度值及第三彩度暨明度值是在受選色度區塊的色度、彩度暨明度範圍內亂數決定的色度值及彩度暨明度值。例如,受選色度區塊的色度範圍是180至225,則第二色度值為202.5,且第三色度值是202.5加上亂數決定的-2.5的結果(200)。又例如,受選色度區塊中具有最有畫素數量的彩度暨明度區塊對應的第二彩度暨明度值為20%的彩度及50%的明度,且第三彩度暨明度值是20%及50%分別加上亂數決定的2%及-10%的結果(22%的彩度及40%的明度)。Next, the processor 190 can determine the third chrominance value and the third chrominance and lightness value (as the color group of the thumbnail) according to the second chrominance value and the second chrominance and lightness value random numbers (step S1450 ). ). Specifically, the third chroma value and the third chroma-cum-lightness value are the chroma value and the chroma-cum-lightness value determined by random numbers in the chroma, chroma-cum-lightness range of the selected chroma block. For example, if the chrominance range of the selected chrominance block is 180 to 225, the second chrominance value is 202.5, and the third chrominance value is 202.5 plus a random number determined by -2.5 (200). For another example, the second chroma and lightness value corresponding to the chroma and lightness block with the largest number of pixels in the selected chroma block has a chroma value of 20% and a lightness of 50%, and the third chroma and lightness value is 20%. The lightness value is the result of 20% and 50% plus 2% and -10% determined by random numbers (22% chroma and 40% lightness).

接著,處理器190可依據此第三色度值及此第三彩度暨明度值批次決定各影像畫面在RGB色彩空間中的代表色 (步驟S1470)。即,將第三色度值及第三彩度暨明度值轉換成RGB值,並將此RGB值作為代表色。Next, the processor 190 may determine the representative color of each image frame in the RGB color space according to the third chrominance value and the third batch of chrominance and lightness values (step S1470). That is, the third chromaticity value and the third chromaticity and lightness value are converted into RGB values, and the RGB values are used as the representative color.

需說明的是,圖8及圖14的實施例可能有多種不同的變化。例如,圖8是直接自具有最大畫素數量的色度區塊中決定縮圖的代表色的色度值及彩度暨明度值,而不判斷是否達到預定佔比數量。又例如,圖14是直接自受選色度區塊中挑選具有畫素數量最多的縮圖的彩度暨明度區塊,並自此縮圖的彩度暨明度區塊中決定縮圖的代表色的色度值及彩度暨明度值。再例如,亂數值可能變更為固定值。It should be noted that, the embodiments of FIG. 8 and FIG. 14 may have various variations. For example, FIG. 8 directly determines the chrominance value, chroma and lightness value of the representative color of the thumbnail from the chrominance block with the largest number of pixels, without judging whether the predetermined proportion is reached. For another example, FIG. 14 directly selects the chroma and lightness block of the thumbnail with the largest number of pixels from the selected chroma blocks, and determines the representative of the thumbnail from the chroma and lightness block of the thumbnail. The chromaticity value and the chroma and lightness value of the color. For another example, the random value may be changed to a fixed value.

除了決定代表色,在一實施例中,可進一步決定光源170的亮度。圖15是依據本發明的一實施例的光源170的亮度決定的流程圖。請參照圖15,處理器190可在預定播放影像畫面的環境中,透過麥克風133錄製並取得所處環境的環境聲音(步驟S1510),並將此環境聲音的音訊資料進行量化處理(例如,類比轉數位處理,以得出環境聲音的音量)(步驟S1530),再決定其量化後的分貝值線性對應的亮度(步驟S1550)。此亮度即可作為光源170的亮度。In addition to determining the representative color, in one embodiment, the brightness of the light source 170 can be further determined. FIG. 15 is a flowchart of determining the brightness of the light source 170 according to an embodiment of the present invention. Referring to FIG. 15 , the processor 190 can record and obtain the ambient sound of the environment through the microphone 133 in the environment where the video screen is scheduled to be played (step S1510 ), and quantify the audio data of the ambient sound (for example, by analogy The digital processing is performed to obtain the volume of the ambient sound) (step S1530 ), and then the brightness corresponding to the quantized decibel value linearly is determined (step S1550 ). This brightness can be used as the brightness of the light source 170 .

例如,表(1)是一範例分貝值與亮度的線性對應關係: 表(1) 分貝值 亮度 0 0 60 128 大於120 255 當環境聲音的音量愈大時,光源170的亮度愈亮,而當環境聲音的音量愈小時,光源170的亮度愈暗。 For example, Table (1) is an example of the linear correspondence between decibel values and brightness: Table (1) Decibel value brightness 0 0 60 128 greater than 120 255 When the volume of the ambient sound is larger, the brightness of the light source 170 is brighter, and when the volume of the ambient sound is smaller, the brightness of the light source 170 is darker.

需說明的是,表(1)中的數值及其對應關係僅是作為範例說明,且並非用以侷限本發明實施例。此外,圖15的實施例是依據環境聲音的振幅大小來得出對應亮度。然而,在其他實施例中,處理器190也可能是依據環境聲音的音調高低或特定旋律來得出對應亮度。It should be noted that the numerical values in Table (1) and their corresponding relationships are only used as examples, and are not intended to limit the embodiments of the present invention. In addition, in the embodiment of FIG. 15 , the corresponding brightness is obtained according to the amplitude of the ambient sound. However, in other embodiments, the processor 190 may also obtain the corresponding brightness according to the pitch of the ambient sound or a specific melody.

在另一實施例中,處理器190亦可透過影像擷取裝置131取得所處環境的環境影像(即,顯示器150播放影像串流的環境中所拍攝的環境聲音),並依據此環境影像決定光源170的亮度。例如,基於環境影像的平均亮度、或最大畫素數量的顏色決定光源170的亮度(呈線性關係或特定數學關係式)。In another embodiment, the processor 190 can also obtain the ambient image of the environment (ie, the ambient sound captured in the environment where the display 150 plays the video stream) through the image capturing device 131, and determine the environment image according to the ambient image The brightness of the light source 170. For example, the brightness of the light source 170 is determined based on the average brightness of the ambient image, or the color of the maximum number of pixels (in a linear relationship or a specific mathematical relationship).

在其他實施例中,依據環境感測器130的類型,處理器190可基於不同類型的感測結果決定對應的代表色亮度。或者,處理器190可直接依據前述第一或第三彩度暨明度值決定光源170的亮度。In other embodiments, according to the type of the environmental sensor 130 , the processor 190 may determine the corresponding representative color luminance based on different types of sensing results. Alternatively, the processor 190 may directly determine the brightness of the light source 170 according to the aforementioned first or third chroma and lightness values.

請返回圖2,縮圖的代表色決定之後,處理器190可提供縮圖的代表色至光源170(步驟S240),並令光源170發出縮圖的代表色的光(步驟S250),且並同步令顯示器150播放影像畫面(步驟S260)。具體而言,為了將影像畫面的內容與環境氛圍產生關聯,本發明實施例是透過改變光源170的顏色及/或亮度來營造環境氛圍,且光源170的顏色及/或亮度是基於縮圖的影像畫面的代表色所決定。在時間軸上,光源170將隨著對應縮圖的影像畫面的變化而改變。例如,顯示器150播放第三十張至第幾九十張影格的影像畫面時,光源170是基於第三十張影格的縮圖的影像畫面的代表色發光。處理器190可判斷顯示器150當前播放的影格,並決定此影格對應的縮圖的代表色,即可透過光源170以此縮圖的代表色發光。Returning to FIG. 2 , after the representative color of the thumbnail is determined, the processor 190 may provide the representative color of the thumbnail to the light source 170 (step S240 ), and make the light source 170 emit light of the representative color of the thumbnail (step S250 ), and The display 150 is synchronously instructed to play the video image (step S260). Specifically, in order to associate the content of the image screen with the ambient atmosphere, the embodiment of the present invention creates an ambient atmosphere by changing the color and/or brightness of the light source 170, and the color and/or brightness of the light source 170 is based on thumbnails It is determined by the representative color of the image screen. On the time axis, the light source 170 will change as the image frame corresponding to the thumbnail changes. For example, when the display 150 displays the image frames of the thirtieth to ninetieth frames, the light source 170 emits light in the representative color of the image frame based on the thumbnail of the thirtieth frame. The processor 190 can determine the frame currently being played on the display 150 and determine the representative color of the thumbnail corresponding to the frame, so that the light source 170 can emit light in the representative color of the thumbnail.

而若額外決定光源170的亮度,則處理器190可同時決定當前播放的影格對應的縮圖的代表色及當前光源170的亮度,即可透過光源170以此縮圖的代表色及亮度發光。在時間軸上,光源170可隨著對應影像畫面及環境聲音/影像的變化而改變。If the brightness of the light source 170 is additionally determined, the processor 190 can simultaneously determine the representative color of the thumbnail corresponding to the currently playing frame and the brightness of the current light source 170, so that the light source 170 can emit light with the representative color and brightness of the thumbnail. On the time axis, the light source 170 can be changed with the corresponding video frame and ambient sound/image.

圖16是依據本發明的一實施例的光源控制的流程圖。請參照圖16,在同一時間距間內,處理器190分別依據環境聲音/影像取得亮度(步驟S1610),並依據縮圖的代表色的RGB值(步驟S1620),且將縮圖的代表色與亮度整合(即,在時間軸上同步)(步驟S1630),即可基於此縮圖的代表色及亮度控制光源170發光(步驟S1650)。FIG. 16 is a flow chart of light source control according to an embodiment of the present invention. Referring to FIG. 16 , within the same time interval, the processor 190 obtains the brightness according to the ambient sound/image (step S1610 ), and according to the RGB value of the representative color of the thumbnail (step S1620 ), and converts the representative color of the thumbnail After integrating with the brightness (ie, synchronizing on the time axis) (step S1630 ), the light source 170 can be controlled to emit light based on the representative color and brightness of the thumbnail (step S1650 ).

值得注意的是,部分連續影像畫面中的前景顏色可能變換過快,導致光源170的色彩變化過快而閃爍。為了避免光源170閃爍,本發明實施例另提出了改進方案。It should be noted that the foreground color in some continuous image frames may change too fast, causing the color of the light source 170 to change too fast and flicker. In order to avoid flickering of the light source 170, the embodiment of the present invention further proposes an improved solution.

圖17是依據本發明的一實施例的光源更新的流程圖。請參照圖17,處理器190可判斷當前影格的影像畫面對應的縮圖的代表色的第一明度(或是灰階值、光源170的亮度)是否大於明度門檻值(例如,8、10、或50等)(步驟S1710)。若第一明度大於明度門檻值,則處理器190進一步判斷縮圖的代表色與先前的縮圖的代表色之間在RGB色彩空間或HSV色彩空間中的色彩差異、或是判斷縮圖的代表色與先前的縮圖的代表色的明度差異,是否大於異色門檻值(例如,30、50、或80等)(步驟S1730)。先前影格影像畫面例如是與當前影格影像畫面相距10、20或60張等的影像畫面。若此差異大於異色門檻值,則處理器190依據縮圖的代表色改變光源170(即,更新光源170的色彩)(步驟S1750),或者。另一方面,若差異未大於異色門檻值或第一明度未大於明度門檻值,則處理器190控制光源170維持在先前影格對應的縮圖的代表色(步驟S1770) (即,維持光源170的顏色)。藉此,可減少光源170的色彩改變頻率,從而提升觀看者的眼睛舒適度。FIG. 17 is a flowchart of light source update according to an embodiment of the present invention. Referring to FIG. 17 , the processor 190 can determine whether the first brightness (or the gray scale value, the brightness of the light source 170 ) of the representative color of the thumbnail corresponding to the image frame of the current frame is greater than the brightness threshold value (for example, 8, 10, or 50, etc.) (step S1710). If the first brightness is greater than the brightness threshold, the processor 190 further determines the color difference between the representative color of the thumbnail and the representative color of the previous thumbnail in the RGB color space or the HSV color space, or determines the representative color of the thumbnail Whether the lightness difference between the color and the representative color of the previous thumbnail is greater than a different color threshold (for example, 30, 50, or 80, etc.) (step S1730). The previous frame image frame is, for example, an image frame that is 10, 20, or 60 frames away from the current frame image frame. If the difference is greater than the different-color threshold, the processor 190 changes the light source 170 (ie, updates the color of the light source 170 ) according to the representative color of the thumbnail (step S1750 ), or. On the other hand, if the difference is not greater than the different color threshold or the first brightness is not greater than the brightness threshold, the processor 190 controls the light source 170 to maintain the representative color of the thumbnail corresponding to the previous frame (step S1770 ) (ie, maintain the light source 170 color). In this way, the frequency of color change of the light source 170 can be reduced, thereby improving the eye comfort of the viewer.

在另一實施例中,處理器190可直接增加當前影像畫面與先前的影像畫面之間,取樣的間距。即,降低前述取樣頻率或增加前述影格間距。例如,由每秒分析6張縮圖的影像畫面的代表色降低至每秒分析1張縮圖的影像畫面的代表色。In another embodiment, the processor 190 may directly increase the sampling interval between the current image frame and the previous image frame. That is, the sampling frequency is decreased or the frame spacing is increased. For example, the representative color of the image frame that analyzes 6 thumbnails per second is reduced to the representative color of the image frame that analyzes 1 thumbnail per second.

綜上所述,本發明實施例環境氛圍調整系統及環境氛圍調整方法,對所欲播放的影像串流或影像畫面分析,以決定縮圖的興趣前景及其代表色。此外,本發明實施例還分析現場環境因素,以決定光源的亮度。接著,在播放影像串流或影像畫面的過程中,即可同步透過光源發出對應的顏色(即,代表色)及亮度。藉此,可提升觀看者的觀賞體驗。To sum up, the environment adjustment system and the environment adjustment method according to the embodiments of the present invention analyze the video stream or image screen to be played to determine the interest foreground and the representative color of the thumbnail. In addition, the embodiment of the present invention also analyzes on-site environmental factors to determine the brightness of the light source. Then, in the process of playing the video stream or the video frame, the corresponding color (ie, the representative color) and brightness can be synchronously emitted through the light source. Thereby, the viewing experience of the viewer can be improved.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the scope of the appended patent application.

100:環境氛圍調整系統 110:影像提供裝置 130:環境感測器 131:影像擷取裝置 133:麥克風 150:顯示器 170:光源 190:處理器 S210~S260、S212~S214、S216~S218、S610~S650、S810~S873、S910~S930、S1110~S1150、S1310~S1330、S1410~S1470、S1510~S1550、S1610~S1650、S1710~S1770:步驟 1010:色度統計容器 1011、1013:色度區塊 1210:彩度暨明度統計容器 1211:第二色度區塊 1213:彩度暨明度區塊 S:彩度 V:明度 100: Ambient atmosphere adjustment system 110: Video providing device 130: Environment Sensor 131: Image capture device 133: Microphone 150: Monitor 170: light source 190: Processor S210~S260, S212~S214, S216~S218, S610~S650, S810~S873, S910~S930, S1110~S1150, S1310~S1330, S1410~S1470, S1510~S1550, S1610~S1650, S1710~S 1010: Chroma Statistics Container 1011, 1013: Chroma blocks 1210: Chroma and Brightness Statistics Container 1211: Second Chroma Block 1213: Chroma and Brightness Block S: chroma V: lightness

圖1是依據本發明的一實施例的環境氛圍調整系統的元件方塊圖。 圖2是依據本發明的一實施例的環境氛圍調整方法的流程圖。 圖3是一範例說明縮圖的影像畫面。 圖4是一範例說明縮圖的灰階影像。 圖5A是依據本發明的一實施例的前景分割處理的流程圖。 圖5B是一範例說明極端值過濾。 圖5C是一範例說明影像二值化。 圖6是依據本發明的一實施例的代表色決定的流程圖。 圖7是一範例說明代表色的決定。 圖8是依據本發明的另一實施例的代表色決定的流程圖。 圖9是依據本發明的一實施例的色度區塊決定的流程圖。 圖10A是一範例說明色度區塊。 圖10B是另一範例說明色度區塊。 圖11是依據本發明的一實施例的彩度暨明度區塊決定的流程圖。 圖12A是一範例說明第二色度區塊。 圖12B是一範例說明彩度暨明度區塊。 圖13是依據本發明的一實施例的代表色決定的流程圖。 圖14是依據本發明的另一實施例的代表色決定的流程圖。 圖15是依據本發明的一實施例的光源的亮度決定的流程圖。 圖16是依據本發明的一實施例的光源控制的流程圖。 圖17是依據本發明的一實施例的光源更新的流程圖。 FIG. 1 is a block diagram of components of an ambient atmosphere adjusting system according to an embodiment of the present invention. FIG. 2 is a flow chart of a method for adjusting environmental atmosphere according to an embodiment of the present invention. FIG. 3 is an example of an image screen illustrating a thumbnail image. FIG. 4 is a grayscale image illustrating an example of a thumbnail. 5A is a flowchart of a foreground segmentation process according to an embodiment of the present invention. FIG. 5B is an example illustrating extreme value filtering. FIG. 5C is an example illustrating image binarization. FIG. 6 is a flowchart of representative color determination according to an embodiment of the present invention. FIG. 7 is an example illustrating the determination of the representative color. FIG. 8 is a flowchart of representative color determination according to another embodiment of the present invention. FIG. 9 is a flowchart of chroma block determination according to an embodiment of the present invention. Figure 10A is an example illustrating chroma blocks. FIG. 10B is another example illustrating chroma blocks. FIG. 11 is a flowchart of determination of chroma and lightness blocks according to an embodiment of the present invention. FIG. 12A is an example illustrating the second chroma block. FIG. 12B is an example illustrating chroma and lightness blocks. FIG. 13 is a flowchart of representative color determination according to an embodiment of the present invention. FIG. 14 is a flowchart of representative color determination according to another embodiment of the present invention. FIG. 15 is a flowchart of brightness determination of a light source according to an embodiment of the present invention. FIG. 16 is a flow chart of light source control according to an embodiment of the present invention. FIG. 17 is a flowchart of light source update according to an embodiment of the present invention.

S210~S260:步驟S210~S260: Steps

Claims (25)

一種環境氛圍調整方法,包括: 對一影像畫面進行一縮圖處理,以取得一縮圖的影像畫面; 對該縮圖的影像畫面,進行一前景分割處理,以取得一縮圖的興趣前景,其中該前景分割處理包括: 依據該縮圖的影像畫面中的多個縮圖的畫素的明度,區分出該縮圖的興趣前景; 依據該縮圖的興趣前景,決定一縮圖的代表色; 提供該縮圖的代表色至一光源; 令該光源,發出該縮圖的代表色的光;以及 令一顯示器,播放該影像畫面。 An environmental atmosphere adjustment method, comprising: Perform a thumbnail processing on an image frame to obtain a thumbnail image frame; Perform a foreground segmentation process on the image frame of the thumbnail to obtain a foreground of interest of the thumbnail, wherein the foreground segmentation process includes: Distinguish the interesting foreground of the thumbnail according to the brightness of the pixels of the thumbnails in the image frame of the thumbnail; Determine the representative color of a thumbnail according to the interest foreground of the thumbnail; providing the representative color of the thumbnail to a light source; causing the light source to emit light in the color representative of the thumbnail; and Make a display to play the video frame. 如請求項1所述的環境氛圍調整方法,其中該影像畫面,係為一影像串流中的多張影像畫面中的一張影像畫面。The environment atmosphere adjustment method according to claim 1, wherein the image frame is an image frame among a plurality of image frames in an image stream. 如請求項1所述的環境氛圍調整方法,其中依據該縮圖的影像畫面中的該些縮圖的畫素的明度,區分出該縮圖的興趣前景的步驟包括: 對該縮圖的影像畫面,進行一灰階處理,以取得一縮圖的灰階影像; 自該縮圖的灰階影像中,得出該些縮圖的畫素的該明度; 將該縮圖的灰階影像,轉換成一縮圖的二值化影像;以及 對該縮圖的影像畫面與該縮圖的二值化影像,進行一交集處理,以取得該縮圖的興趣前景。 The environmental atmosphere adjustment method according to claim 1, wherein the step of distinguishing the interest foreground of the thumbnail according to the brightness of the pixels of the thumbnails in the image frame of the thumbnail includes: performing a grayscale process on the image frame of the thumbnail to obtain a grayscale image of the thumbnail; deriving the lightness of the pixels of the thumbnails from the grayscale image of the thumbnails; converting the grayscale image of the thumbnail into a binarized image of the thumbnail; and An intersection process is performed on the image frame of the thumbnail and the binarized image of the thumbnail to obtain an interesting foreground of the thumbnail. 如請求項3所述的環境氛圍調整方法,其中將該縮圖的灰階影像,轉換成該縮圖的二值化影像的步驟之前,更包括: 設定一高明度門檻值; 過濾該縮圖的影像畫面中,該明度高於該高明度門檻值的至少一該畫素;以及 保留該縮圖的影像畫面中,該明度低於該高明度門檻值的剩餘該畫素。 The ambient atmosphere adjustment method according to claim 3, before the step of converting the grayscale image of the thumbnail into the binarized image of the thumbnail, further comprising: Set a high brightness threshold; Filtering the image frame of the thumbnail, at least one of the pixels whose brightness is higher than the high brightness threshold; and The remaining pixels whose brightness is lower than the high brightness threshold in the image frame of the thumbnail image are retained. 如請求項3所述的環境氛圍調整方法,其中將該灰階影像,轉換成該二值化影像的步驟之前,更包括: 設定一低明度門檻值;以及 過濾該縮圖的影像畫面中,該明度低於該低明度門檻值的至少一該畫素;以及 保留該縮圖的影像畫面中,該明度高於該低明度門檻值的剩餘該畫素。 The environmental atmosphere adjustment method according to claim 3, wherein before the step of converting the grayscale image into the binarized image, the method further comprises: setting a low luminance threshold; and Filtering the image frame of the thumbnail, at least one of the pixels whose brightness is lower than the low brightness threshold; and The remaining pixels whose brightness is higher than the low brightness threshold in the image frame of the thumbnail image are retained. 如請求項4或5所述的環境氛圍調整方法,更包括: 依據保留的剩餘畫素的明度,決定用於轉換該二值化影像的一臨界明度值;以及 依據該臨界明度值,對該縮圖的灰階影像,進行一二值化處理,以取得該縮圖的二值化影像。 The environmental atmosphere adjustment method according to claim 4 or 5, further comprising: determining a critical luminance value for converting the binarized image according to the luminance of the remaining remaining pixels; and According to the critical brightness value, a binarization process is performed on the grayscale image of the thumbnail to obtain the binarized image of the thumbnail. 如請求項6所述的環境氛圍調整方法,其中該二值化處理包含一大津演算法、一平均演算法、或一高斯演算法。The environmental atmosphere adjustment method according to claim 6, wherein the binarization process comprises an Otsu algorithm, an averaging algorithm, or a Gaussian algorithm. 如請求項1所述的環境氛圍調整方法,其中決定該縮圖的興趣前景的該縮圖的代表色的步驟包括: 對該縮圖的興趣前景的多個縮圖的興趣畫素,區分成多個縮圖的色彩群組;以及 依據該些縮圖的色彩群組中的畫素數量,決定該縮圖的代表色。 The environment atmosphere adjustment method according to claim 1, wherein the step of determining the representative color of the thumbnail in the foreground of interest of the thumbnail includes: The interest pixels of the plurality of thumbnails in the foreground of interest for the thumbnail are divided into color groups of the plurality of thumbnails; and The representative color of the thumbnail is determined according to the number of pixels in the color group of the thumbnails. 如請求項8所述的環境氛圍調整方法,其中對該縮圖的興趣前景的該些縮圖的興趣畫素,區分成該些縮圖的色彩群組的步驟包括: 將該縮圖的興趣前景的該些縮圖的興趣畫素,自一RGB色彩空間,轉換至一HSV色彩空間;以及 對該HSV色彩空間,根據多個預定色度,定義出多個縮圖的色度區塊; 對該HSV色彩空間,根據多個預定彩度與多個預定明度,定義出多個縮圖的彩度暨明度區塊;以及 根據該些縮圖的色度區塊與該些縮圖的彩度暨明度區塊,交集定義出該些縮圖的色彩群組。 The environment atmosphere adjustment method according to claim 8, wherein the step of distinguishing interest pixels of the thumbnails in the foreground of interest in the thumbnail into color groups of the thumbnails includes: converting the interest pixels of the thumbnails of the foreground interest of the thumbnail from an RGB color space to an HSV color space; and For the HSV color space, define chromaticity blocks of a plurality of thumbnails according to a plurality of predetermined chromaticities; For the HSV color space, according to a plurality of predetermined chroma and a plurality of predetermined lightness, define the chroma and lightness blocks of a plurality of thumbnails; and According to the intersection of the chrominance blocks of the thumbnails and the chrominance and lightness blocks of the thumbnails, the color groups of the thumbnails are defined. 如請求項9所述的環境氛圍調整方法,其中依據該些縮圖的色彩群組中的畫素數量,決定該縮圖的代表色的步驟包括: 統計該些縮圖的色度區塊的畫素數量;以及 依據該些縮圖的色度區塊的畫素數量,決定該縮圖的代表色。 The ambient atmosphere adjustment method according to claim 9, wherein the step of determining the representative color of the thumbnails according to the number of pixels in the color groups of the thumbnails includes: count the number of pixels in the chroma blocks of the thumbnails; and The representative color of the thumbnail is determined according to the number of pixels in the chroma blocks of the thumbnails. 如請求項10所述的環境氛圍調整方法,其中依據該些縮圖的色度區塊的畫素數量,決定該縮圖的代表色的步驟包括: 判斷該些縮圖的色度區塊的畫素數量,是否達到一預定佔比數量。 The environmental atmosphere adjustment method according to claim 10, wherein the step of determining the representative color of the thumbnails according to the number of pixels of the chroma blocks of the thumbnails includes: It is judged whether the number of pixels of the chroma blocks of the thumbnails reaches a predetermined proportion. 如請求項11所述的環境氛圍調整方法,其中: 若是,則對至少一該些縮圖的色度區塊,根據該些預定彩度與多個預定明度,定義出該些縮圖的彩度暨明度區塊; 根據該些縮圖的彩度暨明度區塊,劃分出該些縮圖的色彩群組; 依據該些縮圖的色彩群組,對應的縮圖的彩度暨明度區塊的畫素數量,選定具有最大畫素數量的一縮圖的色彩群組;以及 依據選定的該縮圖的色彩群組,決定該縮圖的代表色。 The environmental atmosphere adjustment method according to claim 11, wherein: If so, defining the chroma and brightness blocks of the thumbnails according to the predetermined chroma and a plurality of predetermined brightnesses for the chroma blocks of at least one of the thumbnails; dividing the color groups of the thumbnails according to the chroma and brightness blocks of the thumbnails; According to the color groups of the thumbnails, and the pixel numbers of the corresponding chroma and brightness blocks of the thumbnails, select a thumbnail color group with the largest number of pixels; and According to the selected color group of the thumbnail, the representative color of the thumbnail is determined. 如請求項11所述的環境氛圍調整方法,其中: 若否,則在該些縮圖的色度區塊中,選定具有最大畫素數量的一縮圖的色度區塊; 對該縮圖的色度區塊,根據該些預定彩度與多個預定明度,定義出該些縮圖的彩度暨明度區塊; 根據該些縮圖的彩度暨明度區塊,劃分出該些縮圖的色彩群組; 在該些縮圖的色彩群組中,亂數決定一縮圖的色彩群組;以及 依據亂數決定的該縮圖的色彩群組,決定該縮圖的代表色。 The environmental atmosphere adjustment method according to claim 11, wherein: If not, selecting the chroma block of a thumbnail with the largest number of pixels among the chroma blocks of the thumbnails; defining the chroma and luminance blocks of the thumbnails according to the predetermined chroma and a plurality of predetermined luminances; dividing the color groups of the thumbnails according to the chroma and brightness blocks of the thumbnails; In the color groups of the thumbnails, the random number determines the color group of a thumbnail; and The representative color of the thumbnail is determined according to the color group of the thumbnail determined by random numbers. 如請求項12或13所述的環境氛圍調整方法,其中依據該些縮圖的色度區塊的畫素數量,決定該代表色的步驟包括: 自該縮圖的色彩群組對應的縮圖的色度區塊中,取得一縮圖的色度值; 自該縮圖的色彩群組對應的縮圖的彩度暨明度區塊中,取得一縮圖的彩度與一縮圖的明度值;以及 依據該縮圖的色度值、該縮圖的彩度值與該縮圖的明度值,決定在該RGB色彩空間中的該縮圖的代表色。 The ambient atmosphere adjustment method according to claim 12 or 13, wherein the step of determining the representative color according to the number of pixels in the chroma blocks of the thumbnails includes: obtaining a chromaticity value of a thumbnail from the chromaticity block of the thumbnail corresponding to the color group of the thumbnail; Obtaining a thumbnail's chroma and a thumbnail's lightness value from the chroma-cum-lightness block of the thumbnail corresponding to the color group of the thumbnail; and The representative color of the thumbnail in the RGB color space is determined according to the chroma value of the thumbnail, the chroma value of the thumbnail and the lightness value of the thumbnail. 如請求項1所述的環境氛圍調整方法,其中決定該縮圖的興趣前景的該縮圖的代表色的步驟包括: 對該縮圖的興趣前景的多個縮圖的興趣畫素,進行一分群聚類處理,以得到多個分群聚類; 計算該些分群聚類中的該些縮圖的興趣畫素的數量; 根據具有最多該些畫素的數量的一分群聚類,決定該縮圖的代表色。 The environment atmosphere adjustment method according to claim 1, wherein the step of determining the representative color of the thumbnail in the foreground of interest of the thumbnail includes: Perform a clustering process on the interest pixels of multiple thumbnails in the interest foreground of the thumbnail to obtain multiple clusters; calculating the number of interesting pixels of the thumbnails in the clustering; The representative color of the thumbnail is determined according to a group cluster having the largest number of the pixels. 如請求項15所述的環境氛圍調整方法,其中該分群聚類處理包含一K-Mean演算法或一K-Medoid演算法。The environmental atmosphere adjustment method as claimed in claim 15, wherein the grouping and clustering process comprises a K-Mean algorithm or a K-Medoid algorithm. 如請求項2所述的環境氛圍調整方法,其中令該顯示器,播放該影像畫面的步驟之前,更包括: 在預定播放該影像畫面的環境中,錄製一環境聲音;以及 依據該環境聲音的音量,決定該光源的亮度。 The method for adjusting environmental atmosphere according to claim 2, wherein before the step of making the display play the video frame, further comprising: Recording an ambient sound in the environment in which the video frame is scheduled to be played; and The brightness of the light source is determined according to the volume of the ambient sound. 如請求項17所述的環境氛圍調整方法,其中當該環境聲音的音量愈大時,該光源的亮度愈亮,而當該環境聲音的音量愈小時,該光源的亮度愈暗。The ambient atmosphere adjustment method according to claim 17, wherein when the volume of the ambient sound is larger, the brightness of the light source is brighter, and when the volume of the ambient sound is smaller, the brightness of the light source is darker. 如請求項1所述的環境氛圍調整方法,包括: 判斷該縮圖的代表色的第一明度,是否大於一明度門檻值。 The environmental atmosphere adjustment method according to claim 1, comprising: Determine whether the first lightness of the representative color of the thumbnail is greater than a lightness threshold. 如請求項19所述的環境氛圍調整方法,包括: 若是,則判斷該縮圖的代表色與一先前的縮圖的代表色之間,在一RGB色彩空間或一HSV色彩空間中的一色彩差異,是否大於一異色門檻值。 The environmental atmosphere adjustment method according to claim 19, comprising: If so, it is determined whether a color difference between the representative color of the thumbnail and the representative color of a previous thumbnail in an RGB color space or an HSV color space is greater than a different color threshold. 如請求項19所述的環境氛圍調整方法,包括: 若是,則判斷該縮圖的代表色與一先前的縮圖的代表色的明度差異,是否大於一異色門檻值。 The environmental atmosphere adjustment method according to claim 19, comprising: If so, it is determined whether the difference in brightness between the representative color of the thumbnail and the representative color of a previous thumbnail is greater than a different color threshold. 如請求項20或21所述的環境氛圍調整方法,包括: 若是,則依據該縮圖的代表色,改變該光源的顏色。 The environmental atmosphere adjustment method according to claim 20 or 21, comprising: If so, change the color of the light source according to the representative color of the thumbnail. 如請求項19、20或21所述的環境氛圍調整方法,包括: 若否,則維持該光源的顏色。 The environmental atmosphere adjustment method according to claim 19, 20 or 21, comprising: If not, the color of the light source is maintained. 如請求項19所述的環境氛圍調整方法,更包括: 增加該影像畫面與一先前的影像畫面之間,取樣的間距。 The environmental atmosphere adjustment method according to claim 19, further comprising: Increase the sampling distance between the image frame and a previous image frame. 一種環境氛圍調整系統,包括: 一顯示器,用以播放一影像畫面; 一光源,用以發出多種顏色的光;以及 一處理器,連接該顯示器及該光源,並經配置用以: 對該影像畫面進行一縮圖處理,以取得一縮圖的影像畫面; 依據該縮圖的影像畫面中的多個縮圖的畫素的明度,區分出一縮圖的興趣前景; 決定該縮圖的興趣前景的一縮圖的代表色; 提供該縮圖的代表色至該光源; 令該光源,發出該縮圖的代表色的光;以及 令該顯示器,播放該影像畫面。 An ambient atmosphere adjustment system, comprising: a display for playing an image; a light source for emitting light of multiple colors; and a processor, connected to the display and the light source, and configured to: performing a thumbnail processing on the image frame to obtain a thumbnail image frame; Distinguish the interest foreground of a thumbnail according to the brightness of the pixels of the thumbnails in the image frame of the thumbnail; a representative color of a thumbnail that determines the foreground interest of the thumbnail; provide the representative color of the thumbnail to the light source; causing the light source to emit light in the color representative of the thumbnail; and Instruct the display to play the video frame.
TW109118436A 2020-06-02 2020-06-02 Video playback system and environment atmosphere adjusting method TWI751571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109118436A TWI751571B (en) 2020-06-02 2020-06-02 Video playback system and environment atmosphere adjusting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109118436A TWI751571B (en) 2020-06-02 2020-06-02 Video playback system and environment atmosphere adjusting method

Publications (2)

Publication Number Publication Date
TW202147094A TW202147094A (en) 2021-12-16
TWI751571B true TWI751571B (en) 2022-01-01

Family

ID=80784007

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109118436A TWI751571B (en) 2020-06-02 2020-06-02 Video playback system and environment atmosphere adjusting method

Country Status (1)

Country Link
TW (1) TWI751571B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200734930A (en) * 2006-03-02 2007-09-16 Keh-Tsong Li Methods and apparatus for color saturation and sharpness adjsutment besed on image content
TW200805195A (en) * 2006-07-03 2008-01-16 Univ Chung Yuan Christian Luminaries design platform and the method of processing the same
TW200942309A (en) * 2007-12-20 2009-10-16 Koninkl Philips Electronics Nv System and method for automatically creating a sound related to a lighting atmosphere
TW201120816A (en) * 2009-07-30 2011-06-16 Sony Corp Apparatus and method for image processing, and program
TWI385595B (en) * 2008-08-22 2013-02-11 Univ Ishou Image segmentation method using image region merging algorithm
TW201327416A (en) * 2011-12-16 2013-07-01 Nat Univ Tsing Hua Method for foreground detection in dynamic background
TWI450212B (en) * 2011-10-20 2014-08-21 Hsien Lung Hsu Situational Experience System and Method
TWI457553B (en) * 2009-04-21 2014-10-21 Young Lighting Technology Inc Clibration system and method thereof for calibrating display
TWI526112B (en) * 2013-12-27 2016-03-11 鄭建勳 Dynamic changes with an outdoor environment image in an illumination system
TWI526982B (en) * 2013-03-29 2016-03-21 Omron Tateisi Electronics Co Area segmentation method, computer program product and inspection device
TWI536847B (en) * 2013-12-19 2016-06-01 敦泰科技有限公司 Method and apparatus for adjusting the color gamut of a color image
TW201637447A (en) * 2015-01-16 2016-10-16 微軟技術授權有限責任公司 Dynamically updating quality to higher chroma sampling rate
TWI606728B (en) * 2010-09-30 2017-11-21 蘋果公司 System and method for processing an image signal
TWM560162U (en) * 2018-01-08 2018-05-11 華碩電腦股份有限公司 Controller for light strip
TWI637347B (en) * 2014-07-31 2018-10-01 三星電子股份有限公司 Method and device for providing image
TWI662355B (en) * 2018-03-12 2019-06-11 緯創資通股份有限公司 Image background removing system, image background changing apparatus, image background removing method, and computer program product thereof
TWM580657U (en) * 2019-04-02 2019-07-11 謝秉翰 Lamp capable of automatically adjusting color temperature and brightness according to ambient temperature and illuminance
TWI693576B (en) * 2019-02-26 2020-05-11 緯創資通股份有限公司 Method and system for image blurring processing

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200734930A (en) * 2006-03-02 2007-09-16 Keh-Tsong Li Methods and apparatus for color saturation and sharpness adjsutment besed on image content
TW200805195A (en) * 2006-07-03 2008-01-16 Univ Chung Yuan Christian Luminaries design platform and the method of processing the same
TW200942309A (en) * 2007-12-20 2009-10-16 Koninkl Philips Electronics Nv System and method for automatically creating a sound related to a lighting atmosphere
TWI385595B (en) * 2008-08-22 2013-02-11 Univ Ishou Image segmentation method using image region merging algorithm
TWI457553B (en) * 2009-04-21 2014-10-21 Young Lighting Technology Inc Clibration system and method thereof for calibrating display
TW201120816A (en) * 2009-07-30 2011-06-16 Sony Corp Apparatus and method for image processing, and program
TWI606728B (en) * 2010-09-30 2017-11-21 蘋果公司 System and method for processing an image signal
TWI450212B (en) * 2011-10-20 2014-08-21 Hsien Lung Hsu Situational Experience System and Method
TW201327416A (en) * 2011-12-16 2013-07-01 Nat Univ Tsing Hua Method for foreground detection in dynamic background
TWI526982B (en) * 2013-03-29 2016-03-21 Omron Tateisi Electronics Co Area segmentation method, computer program product and inspection device
TWI536847B (en) * 2013-12-19 2016-06-01 敦泰科技有限公司 Method and apparatus for adjusting the color gamut of a color image
TWI526112B (en) * 2013-12-27 2016-03-11 鄭建勳 Dynamic changes with an outdoor environment image in an illumination system
TWI637347B (en) * 2014-07-31 2018-10-01 三星電子股份有限公司 Method and device for providing image
TW201637447A (en) * 2015-01-16 2016-10-16 微軟技術授權有限責任公司 Dynamically updating quality to higher chroma sampling rate
TWM560162U (en) * 2018-01-08 2018-05-11 華碩電腦股份有限公司 Controller for light strip
TWI662355B (en) * 2018-03-12 2019-06-11 緯創資通股份有限公司 Image background removing system, image background changing apparatus, image background removing method, and computer program product thereof
TWI693576B (en) * 2019-02-26 2020-05-11 緯創資通股份有限公司 Method and system for image blurring processing
TWM580657U (en) * 2019-04-02 2019-07-11 謝秉翰 Lamp capable of automatically adjusting color temperature and brightness according to ambient temperature and illuminance

Also Published As

Publication number Publication date
TW202147094A (en) 2021-12-16

Similar Documents

Publication Publication Date Title
JP7422832B2 (en) A scalable system for controlling color management including various levels of metadata
US10462407B2 (en) Display method and display device
US10402953B2 (en) Display method and display device
RU2609760C2 (en) Improved image encoding apparatus and methods
KR101931733B1 (en) System and method for environmental adaptation of display characteristics
KR101170408B1 (en) Dominant color extraction for ambient light derived from video content mapped through unrendered color space
CN109076231B (en) Method and device for encoding HDR pictures, corresponding decoding method and decoding device
US10410567B2 (en) Display signal processing system, display signal generation device, display device, processing method, display signal generation method, and display method
CN103353982A (en) Method for tone mapping based on histogram equalization
AU2016212243A1 (en) A method and apparatus of encoding and decoding a color picture
BR112014006977B1 (en) IMAGE PROCESSING APPARATUS, IMAGE SIGNAL ENCODERING APPARATUS READY TO ENCODE AN IMAGE, IMAGE PROCESSING METHOD AND METHOD FOR TRANSMITTING AN PICTURE SIGNAL READY TO ENCODE AN IMAGE
JP2008505384A (en) Ambient light generation from broadcasts derived from video content and influenced by perception rules and user preferences
CN1834739A (en) Image display device, image display method, and program
TW201511613A (en) Light compensating system and method thereof
CN104581103A (en) Image processing method and device
CN1871848A (en) Automatic display adaptation to lighting
TWI751571B (en) Video playback system and environment atmosphere adjusting method
CN114375083A (en) Light rhythm method, device, terminal equipment and storage medium
JP2003123072A (en) Image kind identification method and device, and image processing program
Shang et al. A study of subjective and objective quality assessment of HDR videos
TWI510092B (en) Electronic device and method for enhancing readability of an image thereof
KR20060087588A (en) Universal color decoder and method for decoding input signal for a multiple primary color display system
CN116156140A (en) Video display processing method, device, computer equipment and storage medium
CN108765502B (en) Color appearance obtaining method in complex environment
WO2020125049A1 (en) Image processing method employing backlight adjustment, smart television, and storage medium