YayBlogger.com
BLOGGER TEMPLATES

Huwebes, Enero 29, 2015

DWT Based Watermarking Algorithm using Haar Wavelet



DWT Based Watermarking Algorithm using
Haar Wavelet

This article is about the implementation of the DWT based watermarking algorithm using haar wavelet based on the study of “DWT Based Watermarking Algorithm using Haar Wavelet” by Anuradha , Rudresh Pratap Singh.  In this paper, a wavelet-based watermarking approach is proposed in which a visually recognizable watermark is added to the wavelet coefficients of an image. This watermark can be a binary, gray-scale. The extracted watermark is visually recognizable to claim ownership. The embedded watermark is hard to detect by human visual perceptivity. In the proposed method pixels of watermark are embedded in wavelet Coefficients corresponding to the points located in a neighborhood with maximum entropy. Embedding the watermark in such pixels makes it possible to use maximum amount of watermark due to human eye insensitivity to areas with high entropy.

Methodology:

Watermarking

In case of two-dimensional image, after a DWT transform, the image is divided into four corners, upper left corner of the original image, lower left corner of the vertical details, upper right corner of the horizontal details, lower right corner of the component of the original image detail (high frequency). You can then continue to the low frequency components of the same upper left corner of the 2nd, 3rd inferior wavelet transform.  After wavelet decomposition process, the low frequency component is equivalent or similar to the original image, so the band has added to the watermark robustness. So that the low frequency components of the human eye to adding a watermark are much higher than the sensitivity of high frequency components by adding information. On the other hand, by the knowledge of image compression, we know that the adding of watermark in the high frequency image can be easier to lose with lossy compression in the operation. On the basis of such considerations, the algorithm uses a different color image multiplied by the weighting coefficients of different ways to solve the visual distortion, and by embedding the watermark, wavelet coefficients of many ways, enhance the robustness of the watermark .

Here is the code in watermarking the image:

clc
close all

%host

rgbimage=imread('host.jpg');
figure;imshow(rgbimage);title('original color image');
[h_LL,h_LH,h_HL,h_HH]=dwt2(rgbimage,'haar');
dec2d = [...
        h_LL,     h_LH;     ...
        h_HL,     h_HH      ...
        ];
figure,imshow(uint8(dec2d));title('DWT2 of original color image');

%watermark

rgbimage=imread('watermark.jpg');
figure;imshow(rgbimage);title('Watermark image');
[w_LL,w_LH,w_HL,w_HH]=dwt2(rgbimage,'haar');
dec2d = [...
        w_LL,     w_LH;     ...
        w_HL,     w_HH      ...
        ];
figure,imshow(uint8(dec2d));title('DWT2 of Watermark image');

%watermarking

newhost_LL = h_LL + (0.01*w_LL);

%output

rgb2=idwt2(newhost_LL,h_LH,h_HL,h_HH,'haar');
figure;imshow(uint8(rgb2));title('Watermarked image');
imwrite(uint8(rgb2),'watermarked.jpg');

The method discussed above  was applied in various test images.  An example of embedding result is shown in figure 1, in which a colored bell pepper image is used as test image and the colored group of fruits as the watermark.
 (a)
 
(b)
Figure 1. (a) Original Image (b) Watermark Image

The resulting image of the method discussed above was shown in figure 2.



Figure 2. Watermarked Image

Watermark Extraction

The extraction algorithm process is the inverse of the embedding process. It is assumed that the watermark as well as the see value is available at the receiver end to the authorized users.
The operation of channel separation is applied on the watermarked color image to generate its sub images, and then 2-level discrete wavelet transform is applied on the sub images to generate the approximate coefficients and detail coefficients. After that the similar operation is applied on the original image, and generate it’s both coefficients, first approximate coefficients and second detail coefficients. With the both coefficient approximate coefficients and the detail coefficients of watermarked image and original image, we could extract watermark data through watermark extracting algorithm, respectively. For this purpose the following formulae is use- W(i) = (yw(i) + yo(i)) / α.
After this execution the Inverse 2-level discrete wavelet transform is applied on the watermark data to generate watermark images extracted.

Here is the code in extracting the image:

clc
close all

%host

rgbimage=imread('watermarked.jpg');
figure;imshow(rgbimage);title('original color image');
[h_LL,h_LH,h_HL,h_HH]=dwt2(rgbimage,'haar');
dec2d = [...
        h_LL,     h_LH;     ...
        h_HL,     h_HH      ...
        ];
figure,imshow(uint8(dec2d));title('DWT2 of original color image');


%watermark

rgbimage=imread('watermark.jpg');
figure;imshow(rgbimage);title('Watermark image');
[w_LL,w_LH,w_HL,w_HH]=dwt2(rgbimage,'haar');
dec2d = [...
        w_LL,     w_LH;     ...
        w_HL,     w_HH      ...
        ];
figure,imshow(uint8(dec2d));title('DWT2 of Watermark image');

%watermarked

rgbimage=imread('watermarked.jpg');
figure;imshow(rgbimage);title('Watermarked image');
[wm_LL,wm_LH,wm_HL,wm_HH]=dwt2(rgbimage,'haar');
dec2d = [...
        wm_LL,     wm_LH;     ...
        wm_HL,     wm_HH      ...
        ];
figure,imshow(uint8(dec2d));title('DWT2 of Watermarked image');

%watermarking

newwatermark_LL= (wm_LL-h_LL)/0.01;

%output

rgb2=idwt2(newwatermark_LL,w_LH,w_HL,w_HH,'haar');
figure;imshow(uint8(rgb2));title('Extracted watermark');
imwrite(uint8(rgb2),'EWatermark.jpg');


% M=512;
% N=512;
% X=imresize(uint8('Watermark.jpg'), [M N]);
% Y=imresize(uint8('EWatermark.jpg'), [M N]);
% cc = corr2(X,Y);
% disp(cc);

The generated watermarked image by the embedding code was used in order to extract the watermark image. The method discussed above was applied in various test images. An example of extracting result was shown in figure 3.


 






(c)                                                                           











(d)


Figure 3. (c) Watermarked Image (d) Extracted Image









Below is the complete file for the source code and article:
https://www.dropbox.com/home/Watermarking

Huwebes, Oktubre 16, 2014

Major Field Trip Travel Report

Image
University of Southeastern Philippines
Bo. Obrero Campus, Davao City

TRAVEL REPORT
September 8-12, 2014

Seminar Overview
Field trip is one of the most awaited moments of our lives. It’s such a wonderful, memorable, fun yet a nice learning experience. We all have the chance to attend seminars and lectures on current topics and issues on Information and Information and Communication Technology as well as site visits and fieldtrips to different ICT enabled companies. It is not just ICT enabled companies but some of the largest IT companies such as Accenture, PLDT, IBM, Toshiba and Ideaspace. Not just that, we also have the chance to visit other universities like Ateneo de Manila University and University of the Philippines Diliman Campus. It is also a pleasure for us to hear different talks from different speakers in every company visit we had. It made me realize that all of us had different stories, talents, skills, gifts and abilities for us to excel. It made me realize that we are really awesome when it comes to technology innovation. PLDT Innolab, IBM and Toshiba are the companies that showed their abilities in technology innovation. Among the companies we visited, I really like IBM, they manufactures and markets computer hardware and software, and offers infrastructure, hosting and consulting services in areas ranging from mainframe computers to nanotechnology. Mr. Alexis Pantola or Sir Pong thought us about the new trend in the industry which is cloud computing. He tutors us about the Bluemix which is one of the cloud computing in the Philippines. Because of our trip I’ve experienced many first times. It’s my first time riding a plane, went to Metro Manila, and had shopping at MOA and other Malls like Tutuban, Divisoria and Trinoma.  I had seen the beauty of Tagaytay and the very nice view of BulkangTaal. And of course I had extreme and wonderful rides in Enchanted Kingdom.  I will never ever forget all of these experiences. I will treasurer these for the rest of my life. This is such a wonderful learning experience.

Day 1

September 8, first day of the trip, first day of the company visits. I am quite excited and I cannot wait to hear new stuffs and new learning’s. Learning is a never ending process; it is our main purpose why we spent thousands just to go to a far place like Manila. Accenture is the first company we visited; it is one of the world’s leading management consulting, technology services and outsourcing companies. I can say that Accenture is a good choice. We had a great speaker named Christian Sigenes; he’s an analytic manager. The talk was good; we had a lot of questions since his demo was a very familiar topic to us which is data visualization. One sad thing for this visit is we cannot take pictures with their company logo but still it’s a happy trip since we had a free snacks and freebies! Haha. After Accenture, we had our lunch at the Kenny Rogers Katipunan, Quezon City. It’s such a great lunch. After having our lunch, at 2pm we headed straight to IBM Ayala Technohub, Quezon City for our second company visit of the day. Since the office is not that big to accommodate all of us we had the trip by batch. Since I belong to the first batch, we had the chance to take pictures before the lecture proper. Mr. Alexis Pantola was our speaker and he’s the only person who accommodated us since he’s the only person in their office at that time. I was quite amazed because it is unusual for me. Sir Alexis tutors us how to use the Bluemix created by IBM. It was an amazing experience. After our batch, we wait for the second batch to finished their tour and while waiting we had our videoke in our bus. After IBM, we had our shopping in Trinoma. And after shopping, we checked in to our hotel which was Kabayan Hotel.

What I learned?
I learned the importance of priority, interest and developing your skills. Mr. Christian and Alexis taught us to know our interest, to discover our hidden talents and abilities, to develop our skills and to use them in the right way and in the right time. I am able to realize how important to be an Accenture member because of the benefits it offers to its members. Accenture partners with its employees in building their careers—investing their time and resources to help their employees grow professionally.
What I liked?
I liked how they welcomed us in their company with big smiles on their faces and enthusiasm on delivering their lectures to us. I liked the place because it is well organized and clean also. I liked the speakers because they know what they are talking about and was able to answer all the questions thrown to them.
What I didn’t like?
I just don’t like the idea that we can’t take pictures in Accenture with their company logo.
Day 2

September 9, second day of the trip. Today, we went to another great company which was PLDT Innolab and Ideaspace Foundation. I was excited since these two companies are two of the biggest IT companies we had chance to visit. We arrived early and registered ourselves at the front desk of the building. Cell phones and cameras were not allowed inside PLDT for security purposes to protect them from their rival companies. But it’s alright because we had our class picture courtesy of PLDT Innolab. INNOLAB stands for Innovation Laboratory and Telecommunications, Education Center of PLDT. We had our tour inside their company, and we were able to see the evolution of PLDT from its birth up to the age of transformation.  The one who welcomed us in PLDT is Ma’am Annie she is so accommodating and she shared to us the birth of PLDT, from where it started up to the day that they become one of the largest  Telecommunications Company in the Philippines. Sir Gino and the three interns from different universities tour us upstairs. They introduced us their residence solutions and enterprise solutions. Home solutions are DSL and the Fiber- Triple Play which you can communicate, get data; and you’ll be entertained since it has an IPTV. And for the enterprise solutions they introduced to us different PLDT products such as Sweet Spots for advertisement, Ecofax, SWUP stands for Shops Work Unplugged, Cosmo call which is a cloudbased, SIP Trunk, PolyCom for video conferencing and F.A.S.Track. Engineer Mel lectures us about Basics of Telecommunications. I was quite bored at that time since he has a mellow voice.  And I am really hungry at that time that’s why I don’t want to listen to his talks anymore. After the PLDT Innolab visit, we had our lunch at the bus since we’re running out of time for our next company and it was quite far and the heavy traffic awaits us. Ideaspace is such a wonderful and awesome company. It was one of my favorite. I never had notes when Ms. Goldy was speaking since I was really focused on listening to her. She encouraged all of us by sharing what they had and the experiences of people she know and they helped. We had our picture taking and tour around the office and one happier thing is we have a free t-shirts. The talked was cool. It was an eye-opener for me.

What I learned?
Among the speakers, Ms. Goldy is my favorite because she touched me and able to inspire me that if I want to become successful, I will be!  Just believe in yourself because if you don’t believe in yourself no one will. She opened my eyes that there’s no hard in accomplishing your goal. Don’t get left in the dark, start the light and shine!
What I liked?
I really like theIdeaspace and also the speaker. I also liked the products of PLDT Innolab since it was cool and awesome.
What I didn’t like?
I didn’t like the tour in the PLDT Innolab especially the latter part—the lecture part since it was boring and I was sleepy.



Day 3

September 10, third day of the trip. Today we had our Y4IT Conference for the whole day at the SMX Convention, Pasay City. It wasn’t hassle for us since we don’t need to travel anymore. I was quite excited since we will meet new faces, new students or even new friends from different schools and universities here in the Philippines. It is also our first time to attend a prestigious and the largest IT event of the year. We choose to attend the first day of the conference since it is a three-day event. As expected, there are a lot of IT professors and enthusiasts and most especially students attended the said event. Before entering the convention, we waited for how many minutes and fall into our line for us to enter the building. When we enter the venue, we grab our Y4IT bags since we paid for it. The room was so big and it was dark but still it was comfortable for us. Actually, most of my classmates were just sleeping after the talks of many speakers.  We take pictures and during the talks of some speakers we listen. After the morning session, we had our lunch at the Taste Asia, Sm Moa. Then we go back to the venue. During the afternoon session of the conference, we just take the exhibit outside the room while some of my classmates are still listening to some speakers. We also join Ate Iana for her interview about her paper presented.  After that, we went back to the room and wait till the event finished.


What I learned?
Here are some of my learning’s and realizations from some of the speakers I choose to listen:
v  Stop doing copy paste. Change it. Do things that are difficult.
v  Real programmers don’t use things they develop things.
v  Working hard is fun if you’re having fun.
v  Anyone can form a solution.
v  Dream high, play around and have fun!
v  Take the risk and never be afraid to fail.
v  The future belongs to those who dream.
v  Individuals don’t build companies…. Teams do!
v  Success is composed of good character, capability, commitment and credibility.
What I liked?
I like the venue it was so big and comfortable. I also like some of the speakers, they motivates and encourages me. They open my eyes and helped me realized things.
What I didn’t like?
I don’t like our spot since we are in the back we can’t concentrate. Also we can’t hear some of the speakers due to loud noise from our seatmates. I also don’t like the emcees, I found them boring.
Day 4

September 9, fourth day of the trip. This day is one of the most awaited days of the trip. I was so excited and I even pray to God that if possible there would be no rain. I’m pretty sure I am not just the one who was excited but also all of my classmates since we will have our pleasure trip and one company to visit. We went on a company to visit Toshiba in Canlubang, Laguna, one of the largest Storage Company in the world.  Surprisingly, we met some of our schoolmates from USEP who already worked in the company. The employees are very courteous that whenever we passed by they always greet us with a smile. Ms. Christine was the one who welcomed us and gave us an orientation about their company. It is on our company visit that I knew that the name “Toshiba” was derived from “Tokyo Shibaura” that’s why it’s now called Toshiba.
On our plant tour, the company is really strict when it comes to rules because before our visit they gave us ahead their plant tour rules that we must follow accordingly. They even provide us caps, shirts and shoecover that we must use inside the plant premises. When we had our plant, we were grouped by two so that we could have our tour in different ways in order to accommodate us all. It is very clean inside the plant and peaceful inside the plant that’s why I like it because it is a healthy environment.  We were able to see what machines do to process the production of the devices. All processes were done by machines and the employees are the ones who supervise it.
After our plant tour, we returned to the orientation room and our tour guides gave us some messages. Toshiba is the only company we visited today because we will have our Tagaytay trip after. We had our lunch in Max’s Restaurant and from there we can already see the view of Taal Volcano and of course, we had our picture taking with the Taal Volcano as our background. After lunch, is our trip to Tagaytay’s People’s Park in the Sky, but we have to walk to reach the top for us to see the beautiful view that only our nature could offer. We did not missed the chance to take some pictures as our souvenirs that we went to this place and able to see the beauty of nature. We only have 30 minutes in Tagaytay because we will be heading to Enchanted Kingdom. We are very excited because most of us would be the first time experience. We headed straight to the extreme rides because weonly have 2 hours for our EK experience since we arrived at 5pm and EK closes at 7pm. Our first ride was the Extreme Tower or we called it drop zero, without any doubt I tried that ride because I really want to experience it. I am so excited for the ride and I was not disappointed because it is awesome. We are excited and when will it stop and drop us without us knowing and so as we are being dropped, I can feel that my soul parted from my body and I can’t really explain the feeling. The drop is only 3 seconds but it was the best 3 seconds of my life so far. Our 2ndride is Anchors Away, at first I thought it was boring and not that extreme but as it was starting to swing higher, I feel that my stomach goes up. Whooh! We were all shouting and I can see the funny faces of other students on the other side of the ship and how they reacted for the ride. 3rd ride is the Space Shuttle and for me looking at it makes me want to back out but at the back of my mind, why should I? It would be an awesome experience for me and I would not do it alone. This ride gave me the nervous feeling I never had for the first two rides. As the ride is starting to go up, we were all nervous I even shout.  That was the best riding experience whooh! 4th ride was Jungle Log jam and it was like a roller coaster ride but the difference is it is in the water. That was not so extreme for me since I already ride the space shuttle; I just enjoyed how I get wet with my friends. 5th ride was Rio Grande, since we are already wet from the previous ride; we’d just continue the wet feeling with this ride. This ride is like riding on a boat. 6th ride was the Disc Oh Magic, this ride was really awesome it keeps spinning for 3 minutes. I really enjoyed this ride. It was so cool. The last ride was the Flying Fiesta, this ride make me feel relaxed though it makes me feel dizzy. We would also like to ride the carousel but unfortunately we are running out of time sin it was already 6:30 pm and we should fix ourselves and get dry since we are wet. Unfortunately, my friend lost her phone when we are at the EK’s comfort room. So, when we get back to the bus, she almost cried and I accompanied her to go the EK’s information desk. We asked if there would be chances of someone surrendering her phone. But sad to hear, it was impossible to get her phone back. After our EK experience, we went to Tutuban for our dinner and for us to shop also.

What I learned?
I learned that manufacturing products is not that easy. It requires disciplined people to supervise and of course patience.  In manufacturing products, the manufacturing company should provide quality products to its consumers to gain trust and one way of assuring the durability of their products is to have the best people to supervise the processes of the products and to have high end materials such as machines for the processing and also to the parts they will use for the products.
What I liked?
In our plant tour visit in Toshiba, I actually like the discipline of everybody to abide the rules of the company because discipline is one of the values we need in order to meet our goals in life. I also like the strictness of the company to its employees.
What I didn’t like?
I just don’t like the thought that they don’t stop working except the New Year’s Day. I was quite sad for the employees since they don’t have time for their family they just keep working.
Day 5

September 10, fifth day of the trip. We checked out early at our hotel and departed early since we want to pass by Big Brother’s House and take pictures with it. We also passed by Ninoy Aquino’s house. After that, we headed straight to Ateneo de Manila University.  I was amazed because the university was so big and the facilities are great. We had the chance to see their gadgets and it was so cool. We had a chance to use their computers and I was amazed because it was so fast. And I was insecure because they can use facebook freely; it was not blocked not like ours. After the talks, we had the chance to tour their building and visit their souvenir shop. I was sad because I don’t have enough money to buy souvenirs since it was so expensive. After ADMU, we headed straight to University of the Philippines, Diliman Campus. We headed straight to the UP’s famous statue—oblation (I don’t know if this is the right term) then we take pictures and then had our lunch at UP’s canteen. We also buy souvenirs at their shops and I was happy because I buy one UP Diliman shirt. After lunch and buying souvenirs, we headed straight to the Computer Studies Building and had our tour. I was amazed because of the laboratories they had. It was seven laboratories and their laboratories were used for specific major or subject. I was also amazed for the students who presented their thesis even if they are unprepared. After UP, we had our visit at Resorts World Manila. I was amazed because it’s a wonderful place to visit. We’d take pictures and enjoy ourselves touring the place. After Resorts World Manila, we headed straight to Ninoy Aquino’s International Airport and ready to go home. Bye Manila! Hello again Davao! J

What I learned?
I learned that you should know what’s trendy nowadays for this kind of industry. I realized that in doing your research you should know you interest and the interest of other people. I noticed that Affective Computing is quite booming nowadays. I also learned that you should focus on just one thing. Stay focused what you want and what you need.
What I liked?
I really like the ADMU’s gadgets it was so cool. I also like the idea of UP that their laboratories were categorized according to major subjects.
What I didn’t like?
I enjoyed the tour so there’s nothing like I didn’t like.

APPENDIX

What can I recommend for the improvement of the advance seminar program of USEP?
I recommend that students should also choose Model A because there are a lot of things to learn and experience when it comes to technology in Manila since most of the largest IT Companies are located in Luzon. I would also recommend that they should visit companies in which they wish to visit when it comes to IT related issues. I suggest they should also visit Ideaspace because of how they motivate us and opened our eyes to discover and create new ideas. I would also recommend Maynilad as their travel agency because of the service they could offer. They arranged our itineraries best to suit our needs and the people in Maynilad were all nice and approachable. I recommend not to eat at tramway buffet since the food was not good.
My advice to those who will take their advance seminar program in the near future.
My advices to those who will take their advance seminar program in the near future is when they will decide on what Model they will choose especially if they will choose Model A which is in Luzon. They should also prepare a large amount of money to avoid problems on the preparation of the trip. They should also choose their set of officers which they know would be responsible in handling the class and would facilitate and work on the preparations for the trip and all of them should also cooperate for the success of their trip. They should also bear in their mind that this is for their learning and not just for fun.
Pictures:
Day 1
Day1.jpg
 Day 2
day2.jpg





Day 3
Day 4








Day 5