CS301-Lec37 handout - CS301 Data Structures Lecture No. 37...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS301 – Data Structures Lecture No. 37 _____________________________________________________________________ Data Structures Lecture No. 37 Reading Material Data Structures and Algorithm Analysis in C++ Chapter. 8 Summary Review Image Segmentation Maze Example Pseudo Code of the Maze Generation Review In the last lecture, we talked about union and find methods with special reference to the process of optimization in union . These methods were demonstrated by reducing size of tree with the help of the techniques-union by size or union by weight. Similarly the tree size was reduced through path optimization in the find method. This was due to the fact that we want to reduce the tree traversal for the find method. The time required by the find/union algorithm is proportional to m . If we have m union and n find, the time required by find is proportional to m+n . Union is a constant time operation. It just links two trees whereas in the find method tree traversal is involved. The disjoint sets are increased and forest keeps on decreasing. The find operation takes more time as unions are increased. But on the average, the time required by find is proportional to m+n . Now we will see some more examples of disjoint sets and union/find methods to understand their benefits. In the start, it was told that disjoint sets are used in image segmentation. We have seen the picture of a boat in this regard. We have also talked about the medical scanning to find the human organs with the help of image segmentation. Let’s see the usage of union/find in image segmentation. Image segmentation is a major part of image processing. An image is a collection of pixels. A value associated with a pixel can be its intensity. We can take images by cameras or digital cameras and transfer it into the computer. In computer, images are represented as numbers. These numbers may represent the gray level of the image. The zero gray level may represent the black and 255 gray level as white. The numbers between 0 and 255 will represent the gray level between black and white. In the color images, we store three colors i.e. RGB (Red, Green, Blue). By combining these three colors, new ones can be obtained.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS301 – Data Structures Lecture No. 37 _____________________________________________________________________ Image Segmentation In image segmentation, we will divide the image into different parts. An image may be segmented with regard to the intensity of the pixels. We may have groups of pixels having high intensity and those with pixels of low intensity. These pixels are divided on the basis of their threshold value. The pixels of gray level less than 50 can be combined in one group, followed by the pixels of gray level less between 50 and 100 in another group and so on. The pixels can be grouped on the basis of threshold for difference in intensity of neighbors. There are eight neighbors of the pixel i.e. top, bottom, left, right, top-left, top-right, bottom-left and bottom-right. Now we will see
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

CS301-Lec37 handout - CS301 Data Structures Lecture No. 37...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online