Wednesday, March 30, 2016

Working-with-ROI-of-image-using-Matlab

Working with ROI of image using Matlab

M Saravana Mathan MCA
Project Associate
NIT Trichy

The part of the image, on which you have interest to work out, is called Region of Interest (ROI). In another words, selected subset of image is called ROI. In some contexts, you want to apply operations on ROI of image rather than the entire image. To achieve this, generally people extract the ROI from the image, store it in another variable and then apply operations on ROI. If you want to apply your operations on ROI without extracting from the image, it is bit difficult.

I am writing this article to explain the performing the operations on ROI without extracting from the image. In this context, the ROI part of image is affected rather than the entire image.

For example, you want to apply edge detection algorithm on the half of image (example: top of image), study the following example. Let consider the image as shown below.

Here ROI = "Half (Top) of the Image"

% read input image
img=imread('E:/images/input.jpg');

% convert color to gray image if input is color image
img=rgb2gray(img);
subplot(1,3,1);
imshow(img), title('Input image');

% calculating size of the image
[rows,cols]=size(img);
rows = rows/2;

% Apply Canny edge operation
edgeimg=edge(img(1:rows,1:cols),'Canny');
subplot(1,3,2);
imshow(edgeimg), title('Canny operation on Extracted ROI');

% calculating size of the ROI
[row,col]= size(edgeimg);

% edgeimg is in logical values (0,1). converting edgeimg into grayimage
edgeimg=uint8(edgeimg);
for i= 1:row 
     for j=1:col
         if(edgeimg(i,j)==1)
             edgeimg(i,j)=255;
         end
     end
end

% substituting Extracted ROI in Input image
img(1:rows,1:cols)=edgeimg;

subplot(1,3,3);
imshow(img), title('Input Image after substituing ROI');

output:




See also:

1. matlab-cropping-binary-image-algorithm

Objective of the Program: Program takes a black and white image as input. It removes the black portion and gives the white portion of the image.

Tuesday, February 23, 2016

Matlab-Cropping-binary-image-algorithm-and-program

Matlab

Program for Cropping Binary Image : Matlab Code

Objective of the Program:


Program takes a black and white image as input. It removes the black portion and gives the white portion of the image.

Input: Gray or binary image (for example consider the image below)

           

Output: Gray or binary image (as below)

                      

MATLAB Code:


% read the input binary image 

img = imread('path of image');

% calculating size of the image 

[row col] = size(img);

% removing black portion on top side of the image 
  for i = 1:row
    if sum(img(i,:)) > 0
        top = i;
        break
    end
  end

% removing black portion on bottom side of the image 
  for i = row:(-1):1
    if sum(img(i,:)) > 0
        bottom = i;
        break
    end
  end

% removing black portion on left side of the image 
  for i = 1:col
    if sum(img(:,i)) > 0
        left = i;
        break
    end
  end

% removing black portion on right side of the image 
  for i = col:(-1):1
    if sum(img(:,i)) > 0
        right = i;
        break
    end
  end

% output image  
 output = img(top:bottom, left:right);

 imshow(output);



Popular Articles:

1. matlab-cropping-binary-image-algorithm

Objective of the Program: Program takes a black and white image as input. It removes the black portion and gives the white portion of the image.

Tuesday, February 16, 2016

Article-on-Research-for-PhD-Scholars

Article on Research for PhD scholars

We are writing this article to motivate research scholars with our little research experience. We hope this article will be helpful to the students who want to join PhD and already joined PhD students.



What is PhD?

  • According to Prakash Iyer, PHD stands for Passion, Hunger and Discipline. He says that in order to be successful in life, one needs to be Passionate about what one wants, have a Hunger to work for it and the Discipline to keep up the work even in the face of adversity.
  • Every one needs PHD to get success in his/her life. (here PHd means Passion, Hunger and Discipline but not a qualification degree i.e Doctorate of Philosophy)
  • When we observe the great persons in the world, all have PHD(Passion, Hunger, Discipline) but not have PhD (Doctorate of Philosophy).
  • There are many evidences to show that winning and being successful in life has little to do with academic qualifications.
    Passion :
    • Do you enjoy what you do? Do you love your work?
    • Passion makes you get out of your bed early morning and get to work to achieve your goals. Not because you have to, but because you love to
    • Passion makes you enjoy the every moment even you are working a long hours for a day. Remember Great things are not achieved through better resources but with passion.
    • Martin Luther King once said: "If a man is called to be a street sweeper, he should sweep streets just as Michelangelo painted, or Beethoven composed music, or Shakespeare wrote poetry. He should sweep streets so well that all the hosts of heaven and earth will pause to say, here lived a great street sweeper who did his job well."
    • Conclusion : It is important to love what you are doing
    Hunger :
    • Are you really hungry for getting success?
    • we are explaining the need for hunger with a little story:
    • story : one day a young man went to Socrates and said he wanted to get wisdom. "Come with me," said Socrates and took him along to a river. Without any warning, Socrates pushed the man's head under water and held it there. The man did not know what was happening. He struggled for air. He moved his head, flailed his hands desperately seeking to get his head above water for some air. Socrates finally let go and asked him, "What did you want when your head was under water?" "I wanted air," said the man. "Right," said Socrates, "When you want wisdom as badly as you wanted the air -- you will get it!"
    • Conclusion : Passion with hunger is needed to get success in life. (only passion is not enough)
    Discipline :
    • Once you have the passion with hunger, you can achieve success in your life. But to keep on doing right things, time after time after time, one need discipline.
    • Success demands discipline. Commit yourself to become a PhD. A Passionate, Hungry, Disciplined person. Success always calls you.

Conclusion : We are Concluding the article by saying that "A person who want to get (degree) Ph.D (Doctorate of Philosophy) needs PHD (Passion,Hunger and Discipline)".


Follow us on Facebook :



Tuesday, August 11, 2015

top-ten-universities-in-the-world

Quote of the Day


Don't Wait for the perfect moment, take the moment and make it perfect





Articles By Great People

 

Top Universities in the world for the year 2014-15

According to the times higher education world, the top 10 universities in the world are as follows:

Rank University Country
1 Caltech USA
2 Harward USA
3 Oxford UK
4 Stanford USA
5 Cambridge UK
6 MIT USA
7 Princeton USA
8 California,berkely USA
9 Imperial College UK
9 Yale USA


According to the times higher education world, The top indian educational institutions (IISc,IITs) got the following ranks in the world.

Rank University Country
276-300 IISc Bangalore India
351-400 IIT ROORKEE India
351-400 IIT BOMBAY India

Tuesday, March 31, 2015

Career-at-after-Btech

Career @ after BTech

The students, who are studying BTech final year, don't know about what are the opportunities after completion of BTech. Many of the students are wasting their valuable time after completion of B.Tech due to lack of knowledge on career opportunities.

MTech

This is the Post Graduation Course. After completion of MTech in any national institution, more job opportunities are there. To join M.Tech in national level institution, one has to qualify GATE exam.

Sunday, December 14, 2014

Converting word file (.doc) to different formats using MS OFFICE 2010

Converting a word file to different formats using MS OFFICE 2010 ( in windows)

MS Office 2010 allows the user to convert a word file in to 16 different formats. Even though many of the people using MS Office , they don't know how many ways they can convert a word (.doc) format to different formats without using any online applications.

Even they are using MS Office 2010, many of the people use online converters for converting .doc to .pdf (due to lack of knowledge on MS Word 2010)

We can convert a .doc into 16 different formats as following

Friday, December 5, 2014

Project Work at Engineering

Project Work @Engineering

As the part of B.Tech (or M.Tech), It is necessary to do a project as a partial fulfillment for the award of engineering degree. Many of the B.Tech(M.Tech) Final year students are in confusion to choose interesting area for doing project work. In olden days, Engineering colleges encourages students to develop application projects like Library application, online reservation system etc.

Now, many engineering colleges encourages students to do IEEE Projects. As the part of IEEE Project, students have to choose their interesting area, search the IEEE papers in their area and simulate(or implement) the work in IEEE paper. By doing the project, students get to know their abilities and weaknesses so that they can improve further.The following are the list of topics for doing project work. 
  1. Wireless Sensor Networks
  2. Data Mining
  3. Cloud Computing
  4. Mobile Compuring
  5. Network Security
  6. Artificial Intelligence
  7. Software Engineering
  8. Software Testing
  9. Data Base Systems
  10. Computer Networks
  11. Grid Computing
  12. Computer Architecture
  13. Distributed Systems
  14. Operating Systems
  15. Theory of Computer Science
  16. Programming languages (Design, implementation)
  17. Graphics
  18. Image Processing
  19. Mobile Adhoc Networks (MANETs)
  20. Web Mining
  21. Machine Learning
  22. Bio Metrics
  23. Expert Systems

Related Posts:

Python-environment-for-deep-learning-in-windows

Python is increasingly becoming a popular programming language for machine learning and deep learning. If you want to use python for train...