2014年6月13日 星期五

Assignment 6 Visible watermarking

作業內容:
主題: 可見浮水印 

請撰寫一個程式,讀取一張 256 色 RGB 全彩人物全彩圖像(.bmp 或.jpg 圖像格式都可)。 
(a) 設計一個程式在圖像中加入一個可見浮水印。(輸入的浮水印為一張單色圖像)。 


實作是蓋上去的圖比原圖還小:

利用 opencv的函式 addWeighted addWeighted(imageROI,1.0,logo,1.0,0.,imageROI);  
Parameters:
  • src1 – first input array.
  • alpha – weight of the first array elements.
  • src2 – second input array of the same size and channel number as src1.
  • beta – weight of the second array elements.
  • dst – output array that has the same size and number of channels as the input arrays.
  • gamma – scalar added to each sum.
  • dtype – optional depth of the output array; when both input arrays have the same depth, dtype can be set to -1, which will be equivalent to src1.depth().

實作是蓋上去的圖比原圖還小

原圖:                                                                                            欲加上的圖:




輸出結果:


沒有留言:

張貼留言