[討論] 四元樹S = qtdecomp(I,fun)用法

看板MATLAB作者 (Joey)時間8年前 (2016/09/28 16:10), 編輯推噓1(102)
留言3則, 1人參與, 最新討論串1/1
根據 Matlab的定義 S = qtdecomp(I, fun) uses the function fun to determine whether to split a block. qtdecomp calls fun with all the current blocks of size m-by-m stacked into an m-by-m-by-k array, where k is the number of m-by-m blocks. fun returns a logical k-element vector, whose values are 1 if the corresponding block should be split, and 0 otherwise. (For example, if k(3) is 0, the third m-by-m block should not be split.) fun must be a function handle. (1) 想請教大家,關於這個fun 我應該要怎麼去設定,才對得到我想要的結果 我fun的設定打算用: 假如周邊的值<2,那就Merge. (2) 假如我的I不局限於灰階影像 想用彩色影像當Input,要怎麼修正呢 抱歉打擾了 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.175.129 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1475050206.A.038.html

09/29 10:06, , 1F
印象中限定input為grayscale image.建議靠rgb2ycbcr取
09/29 10:06, 1F

09/29 10:07, , 2F
出luminance的部分,處理完之後,再加回cbcr,拿ycbcr2rgb
09/29 10:07, 2F

09/29 10:07, , 3F
轉回rgb影像.
09/29 10:07, 3F
文章代碼(AID): #1NwthU0u (MATLAB)
文章代碼(AID): #1NwthU0u (MATLAB)