SlideShare a Scribd company logo
DIP Homework: 3
Q- 5 You are preparing a report and have to install in it an image of size 2048 * 2048 pixels?
a- Assuming on limitations on the printer, what would the resolution in line pairs mm
have to be for the image to fit in a space of size 5*5cm?
Answer: the resolution of the fitting in the space size of 5*5 can be calculated
2048 𝐿𝑖𝑛𝑒𝑠
50 𝑚𝑚
≅ 41 lines / min
≅ 20 lines / min
b- What would the resolution have to be in dpi for the image to fit in 2*2 inches?
Answer: the image resolution for fitting 2*2 inch will be calculated as
2048 𝑑𝑜𝑡𝑠
2 𝑖𝑛𝑐ℎ
= 1024 dots per inch
Q- 11 When discussing linear indexing in section 2.4, we arrived at the linear index in Eq.
(2.14) by inspection. The same argument used there can be extended to a 3-D array with
coordinates x,y and z, and corresponding dimensions M, N and P. The linear index for any
(x,y,z) is S = x + M (y + Nz) = x + Mg + Myz
Start with expression and
a- *Drive Eq. (2.15)
b- Drive Eq. (2.16)
Answer:
For 2D array to 1D array (leaner)
∝ = 𝑀𝑦 + 𝑥
𝑥 = ∝ +𝑥
⟹ 𝑦 =
𝑎−𝑥
𝑀
For 3D case we have
( 𝑥, 𝑦, 𝑧) ⟶ 𝑠
M
N
y
x
m-1
0
𝑠 = 𝑥 + 𝑚 ( 𝑦 + 𝑁𝑧) ⟹ 𝑥 = 𝑠 𝑚𝑜𝑑 𝑚
𝑠 − 𝑥 = 𝑚 (𝑦 + 𝑁𝑧)
𝑦 + 𝑁𝑧 =
𝑠−𝑥
𝑀
⟹ 𝑦 = (
𝑠−𝑥
𝑀
) 𝑚𝑜𝑑 𝑀
Since the (
𝑠−𝑥
𝑀
) < 𝑀 , (
𝑠−𝑥
𝑀
) 𝑚𝑜𝑑 𝑁 =
𝑠−𝑥
𝑀
. The maximum value of S is MN - 1 and, the
maximum of x is 0.
Q- 16 Develop an algorithm for converting a one-pixel-thick m-path to a 4-paths?
Answer: Any pixel p (x, y) has two vertical and two horizontal neighbors, given by (x+1,
y), (x-1, y), (x, y+1), (x, y-1) and This set of pixels are called the 4-neighbors of P, and is
denoted by N4 (P) and each of them are at a unit distance from P. We assume that (x,y) is
spatial location of the starting of 4-path. and in image path is represented by 1's and
remaining values are 0's.
1- we assign (p,q) is the m-connected neighborhood of (x,y) which is not processed yet
2- For each pixel is unit distance from (x,y)
3- Check whether the common 4-neighborhood pixel position of (x,y) and (p,q) is part of
existing path, if not make any one of the common 4-neighborhood to be 1, else no need
to do anything(because it is already 4-connected).
4- We assign (x,y )= (p,q)
5- 4-neighbors of p, denoted by N4(p): (x-1, y), (x+1, y), (x, y-1), and (x, y+1).
The solution to this problem consists of defining all possible neighborhood shapes to go from a
diagonal segment to a corresponding 4-connected segment, as shown in fig bellow. The algorithm
then simply looks for the appropriate match every time a diagonal segment is encountered in the
boundary for converting from an m-connected path to a 4-connected path simply involves
detecting diagonal segments and converting them to the appropriate 4-connected segment.
Q- 14 Consider the two image subsets, S1 and S2, shown in the following figure. For V = {1},
determine whether these two subsets are (a) 4-adjacent, (b) 8-adjacent, or (c) m-adjacent.
A- Let p and q be as shown in Fig. Then:
(a) S1 and S2 are not 4-connected because q is not in the set N4(p);
(b) S1 and S2 are 8-connected because q is in the set N8(p);
(c) S1 and S2 are m-connected because
(i) q is in ND(p), and
(ii) the set N4(p) ∩ N4(q) is empty
B- Paths
A (digital) path (or curve) from pixel p with coordinates (x, y) to pixel q with coordinates
(s, t) is a sequence of distinct pixels with coordinates
(x0, y0), (x1,y1), ……., (xn, yn)
 where (x0, y0) = (x, y), (xn, yn) = (s, t),
 and pixels (xi, yi) and (xi-1, yi-1) are adjacent for 1≤ i ≤ n.
 In this case, n is the length of the path.
 If (x0, y0) = (xn, yn) the path is a closed path.
 The path can be defined 4-,8-m-paths depending on adjacency type.
 Let S be a subset of pixels in an image. Two pixels’ p and q are said to be
connected in S if there exists a path between them consisting entirely of pixels
in S
 For any pixel p in S, the set of pixels that are connected to it in S is called
a connected component of S.
 If it only has one connected component, then set S is called a connected
set.
Q- 18 Consider the image segment show in the figure that follows
a- As in section 2.5, let V= {0,1} be the set of intensity values to defined adjacency.
Compute the lengths of the shortest 4-, 8- and m-path between p and q in the following
image. If a particular path does not exist between these points, explain why?
Answer- (a) When V = {0,1}, 4-path does not exist between p and q because it is impossible to get
from p to q by traveling along points that are both 4-adjacent and also have values from V. Figure
P2.15(a) shows this condition; it is not possible to get to q. The shortest 8-path is shown in Fig.
P2.15(b); its length is 4. The length of the shortest m- path (shown dashed) is 5. Both of these
shortest paths are unique in this case.
b- Repeat (a) by using V= {1,2}
Answer- (b) One possibility for the shortest 4-path when V = {1, 2}is shown in Fig.
P2.15(c); its length is 6. It is easily verified that another 4-path of the same length exists
between p and q. One possibility for the shortest 8-path (it is not unique) is shown in Fig.
P2.15(d); its length is 4. The length of a shortest m-path (shown dashed) is 6. This path is
not unique.
Q- 30 Give Venn diagram for the following expression?
a- *(𝑨 ∩ 𝑪) - (A ∩ B ∩ 𝑪 )
b- (𝑨 ∩ 𝑪) ∪ (𝑩 ∩ 𝑪)
c- B - [(𝑨 ∩ 𝑩)- (A ∩ B ∩ 𝑪 )]
d- B-B ∩ ( A ∪ C); Give that ( 𝑨 ∩ 𝑪)= ∅
Q- 37 We know from the E.q (2-45) that an offline transformation of coordinators given by
Where (x’,y’) are the transformed coordinators (x,y) are the original coordinator, and the
element of A are given in the table 2.3. for the various type of transformation. The inverse
transformation, A-1, to go from transformed back to the original coordinators in just as
important for performing inverse mappings.
a- Find the inverse scaling transformation?
b- Find the inverse translation transformation?
c- Find the inverse vertical and horizontal shearing transformation?
d- Find the inverse rotation transformation?
e- Show a composite inverse translate/rotation transformation?
Answer for the former of matrix
1 0 0
0 1 0
0 0 1
x = v and y = w
𝑐 𝑥 0 0
0 𝑐 𝑦 0
0 0 1
x’ = cx v and y’ = cy w
For the inverse translation transformation
1 0 𝑡 𝑥
0 1 𝑡 𝑦
𝑡 𝑥 𝑡 𝑦 1
x’ = v + tx and y’ = w + ty
For the inverse vertical and horizontal shearing transformation
1 𝑠 𝑥 0
0 1 0
0 0 1
x’ = v +sx w and y’ = w
1 0 0
𝑠 𝑘 1 0
0 0 1
x’ = v and y’ = sk x + w
For the inverse rotation transformation
−
𝑐𝑜𝑠 𝜃 𝑠𝑖𝑛 𝜃 0
𝑠𝑖𝑛 𝜃 𝑐𝑜𝑠 𝜃 0
0 0 1
x’ = v cos 𝜃 - w sin 𝜃 and y’ = v sin 𝜃 + w cos 𝜃
Note:
The above diagram used of OpenCV3 operates on images. Image operations are mainly based on
various coordinate transformations of images, such as scale transformation, rotation
transformation, translation transformation and offset transformation (horizontal or vertical). These
transformations are all directed at the coordinates of images, not the pixels of images. They can be
collectively called affine transformation. The above description is for several transformations in
Gonzalez's Digital Image Processing.

More Related Content

What's hot

Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)
VARUN KUMAR
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
Suhaila Afzana
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.
raheel rajput
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformationsJohn Williams
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & Descriptors
PundrikPatel
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
Kalyan Acharjya
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
Pallavi Agarwal
 
IT6005 digital image processing question bank
IT6005   digital image processing question bankIT6005   digital image processing question bank
IT6005 digital image processing question bank
Gayathri Krishnamoorthy
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
Akshat Ratanpal
 
Noise Models
Noise ModelsNoise Models
Noise Models
Sardar Alam
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domainAshish Kumar
 
Point processing
Point processingPoint processing
Point processing
panupriyaa7
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
Mathankumar S
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color Images
Cristina Pérez Benito
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
muthu181188
 
Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.
SomitSamanto1
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & Resoration
Sanjay Saha
 

What's hot (20)

Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & Descriptors
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
IT6005 digital image processing question bank
IT6005   digital image processing question bankIT6005   digital image processing question bank
IT6005 digital image processing question bank
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
 
Noise Models
Noise ModelsNoise Models
Noise Models
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Point processing
Point processingPoint processing
Point processing
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color Images
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & Resoration
 

Similar to The Digital Image Processing Q@A

pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
JayanthHN1
 
DIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptDIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.ppt
akshaya870130
 
3.ppt
3.ppt3.ppt
3.ppt
anshharjai
 
student-problem-solutions.pdf
student-problem-solutions.pdfstudent-problem-solutions.pdf
student-problem-solutions.pdf
ssuser4d4e5a
 
student-problem-solutions.PDF
student-problem-solutions.PDFstudent-problem-solutions.PDF
student-problem-solutions.PDF
KarminderSingh7
 
3D-PPt MODULE 1.pptx
3D-PPt MODULE 1.pptx3D-PPt MODULE 1.pptx
3D-PPt MODULE 1.pptx
AnujChoudhary61
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
Dr. Radhey Shyam
 
Gmat quant topic 6 co ordinate geometry solutions
Gmat quant topic 6 co ordinate geometry solutionsGmat quant topic 6 co ordinate geometry solutions
Gmat quant topic 6 co ordinate geometry solutions
Rushabh Vora
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
Matlab Assignment Experts
 
1525 equations of lines in space
1525 equations of lines in space1525 equations of lines in space
1525 equations of lines in space
Dr Fereidoun Dejahang
 
Representation
RepresentationRepresentation
Representation
Syed Zaid Irshad
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
PreethiPreethi28
 
GMAT Coordinate Geometry.pptx
GMAT Coordinate Geometry.pptxGMAT Coordinate Geometry.pptx
GMAT Coordinate Geometry.pptx
Ravindra gudapati
 
7.5 lines and_planes_in_space
7.5 lines and_planes_in_space7.5 lines and_planes_in_space
7.5 lines and_planes_in_spaceMahbub Alwathoni
 
E field dipole
E field dipoleE field dipole
E field dipole
FFMdeMul
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
Amnaakhaan
 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivatives
Yong Heui Cho
 
UNIT III Geometric curves unit 3 geometric modeling
UNIT III Geometric curves unit 3 geometric modelingUNIT III Geometric curves unit 3 geometric modeling
UNIT III Geometric curves unit 3 geometric modeling
GunjanKolhe5
 

Similar to The Digital Image Processing Q@A (20)

pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
 
Pixel relationships
Pixel relationshipsPixel relationships
Pixel relationships
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
DIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptDIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.ppt
 
3.ppt
3.ppt3.ppt
3.ppt
 
student-problem-solutions.pdf
student-problem-solutions.pdfstudent-problem-solutions.pdf
student-problem-solutions.pdf
 
student-problem-solutions.PDF
student-problem-solutions.PDFstudent-problem-solutions.PDF
student-problem-solutions.PDF
 
3D-PPt MODULE 1.pptx
3D-PPt MODULE 1.pptx3D-PPt MODULE 1.pptx
3D-PPt MODULE 1.pptx
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
 
Gmat quant topic 6 co ordinate geometry solutions
Gmat quant topic 6 co ordinate geometry solutionsGmat quant topic 6 co ordinate geometry solutions
Gmat quant topic 6 co ordinate geometry solutions
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
1525 equations of lines in space
1525 equations of lines in space1525 equations of lines in space
1525 equations of lines in space
 
Representation
RepresentationRepresentation
Representation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
GMAT Coordinate Geometry.pptx
GMAT Coordinate Geometry.pptxGMAT Coordinate Geometry.pptx
GMAT Coordinate Geometry.pptx
 
7.5 lines and_planes_in_space
7.5 lines and_planes_in_space7.5 lines and_planes_in_space
7.5 lines and_planes_in_space
 
E field dipole
E field dipoleE field dipole
E field dipole
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivatives
 
UNIT III Geometric curves unit 3 geometric modeling
UNIT III Geometric curves unit 3 geometric modelingUNIT III Geometric curves unit 3 geometric modeling
UNIT III Geometric curves unit 3 geometric modeling
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

The Digital Image Processing Q@A

  • 1. DIP Homework: 3 Q- 5 You are preparing a report and have to install in it an image of size 2048 * 2048 pixels? a- Assuming on limitations on the printer, what would the resolution in line pairs mm have to be for the image to fit in a space of size 5*5cm? Answer: the resolution of the fitting in the space size of 5*5 can be calculated 2048 𝐿𝑖𝑛𝑒𝑠 50 𝑚𝑚 ≅ 41 lines / min ≅ 20 lines / min b- What would the resolution have to be in dpi for the image to fit in 2*2 inches? Answer: the image resolution for fitting 2*2 inch will be calculated as 2048 𝑑𝑜𝑡𝑠 2 𝑖𝑛𝑐ℎ = 1024 dots per inch Q- 11 When discussing linear indexing in section 2.4, we arrived at the linear index in Eq. (2.14) by inspection. The same argument used there can be extended to a 3-D array with coordinates x,y and z, and corresponding dimensions M, N and P. The linear index for any (x,y,z) is S = x + M (y + Nz) = x + Mg + Myz Start with expression and a- *Drive Eq. (2.15) b- Drive Eq. (2.16) Answer: For 2D array to 1D array (leaner) ∝ = 𝑀𝑦 + 𝑥 𝑥 = ∝ +𝑥 ⟹ 𝑦 = 𝑎−𝑥 𝑀 For 3D case we have ( 𝑥, 𝑦, 𝑧) ⟶ 𝑠 M N y x m-1 0
  • 2. 𝑠 = 𝑥 + 𝑚 ( 𝑦 + 𝑁𝑧) ⟹ 𝑥 = 𝑠 𝑚𝑜𝑑 𝑚 𝑠 − 𝑥 = 𝑚 (𝑦 + 𝑁𝑧) 𝑦 + 𝑁𝑧 = 𝑠−𝑥 𝑀 ⟹ 𝑦 = ( 𝑠−𝑥 𝑀 ) 𝑚𝑜𝑑 𝑀 Since the ( 𝑠−𝑥 𝑀 ) < 𝑀 , ( 𝑠−𝑥 𝑀 ) 𝑚𝑜𝑑 𝑁 = 𝑠−𝑥 𝑀 . The maximum value of S is MN - 1 and, the maximum of x is 0. Q- 16 Develop an algorithm for converting a one-pixel-thick m-path to a 4-paths? Answer: Any pixel p (x, y) has two vertical and two horizontal neighbors, given by (x+1, y), (x-1, y), (x, y+1), (x, y-1) and This set of pixels are called the 4-neighbors of P, and is denoted by N4 (P) and each of them are at a unit distance from P. We assume that (x,y) is spatial location of the starting of 4-path. and in image path is represented by 1's and remaining values are 0's. 1- we assign (p,q) is the m-connected neighborhood of (x,y) which is not processed yet 2- For each pixel is unit distance from (x,y) 3- Check whether the common 4-neighborhood pixel position of (x,y) and (p,q) is part of existing path, if not make any one of the common 4-neighborhood to be 1, else no need to do anything(because it is already 4-connected). 4- We assign (x,y )= (p,q) 5- 4-neighbors of p, denoted by N4(p): (x-1, y), (x+1, y), (x, y-1), and (x, y+1). The solution to this problem consists of defining all possible neighborhood shapes to go from a diagonal segment to a corresponding 4-connected segment, as shown in fig bellow. The algorithm then simply looks for the appropriate match every time a diagonal segment is encountered in the
  • 3. boundary for converting from an m-connected path to a 4-connected path simply involves detecting diagonal segments and converting them to the appropriate 4-connected segment. Q- 14 Consider the two image subsets, S1 and S2, shown in the following figure. For V = {1}, determine whether these two subsets are (a) 4-adjacent, (b) 8-adjacent, or (c) m-adjacent. A- Let p and q be as shown in Fig. Then: (a) S1 and S2 are not 4-connected because q is not in the set N4(p); (b) S1 and S2 are 8-connected because q is in the set N8(p); (c) S1 and S2 are m-connected because (i) q is in ND(p), and (ii) the set N4(p) ∩ N4(q) is empty B- Paths A (digital) path (or curve) from pixel p with coordinates (x, y) to pixel q with coordinates (s, t) is a sequence of distinct pixels with coordinates
  • 4. (x0, y0), (x1,y1), ……., (xn, yn)  where (x0, y0) = (x, y), (xn, yn) = (s, t),  and pixels (xi, yi) and (xi-1, yi-1) are adjacent for 1≤ i ≤ n.  In this case, n is the length of the path.  If (x0, y0) = (xn, yn) the path is a closed path.  The path can be defined 4-,8-m-paths depending on adjacency type.  Let S be a subset of pixels in an image. Two pixels’ p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S  For any pixel p in S, the set of pixels that are connected to it in S is called a connected component of S.  If it only has one connected component, then set S is called a connected set. Q- 18 Consider the image segment show in the figure that follows a- As in section 2.5, let V= {0,1} be the set of intensity values to defined adjacency. Compute the lengths of the shortest 4-, 8- and m-path between p and q in the following image. If a particular path does not exist between these points, explain why? Answer- (a) When V = {0,1}, 4-path does not exist between p and q because it is impossible to get from p to q by traveling along points that are both 4-adjacent and also have values from V. Figure P2.15(a) shows this condition; it is not possible to get to q. The shortest 8-path is shown in Fig. P2.15(b); its length is 4. The length of the shortest m- path (shown dashed) is 5. Both of these shortest paths are unique in this case. b- Repeat (a) by using V= {1,2} Answer- (b) One possibility for the shortest 4-path when V = {1, 2}is shown in Fig. P2.15(c); its length is 6. It is easily verified that another 4-path of the same length exists
  • 5. between p and q. One possibility for the shortest 8-path (it is not unique) is shown in Fig. P2.15(d); its length is 4. The length of a shortest m-path (shown dashed) is 6. This path is not unique. Q- 30 Give Venn diagram for the following expression? a- *(𝑨 ∩ 𝑪) - (A ∩ B ∩ 𝑪 ) b- (𝑨 ∩ 𝑪) ∪ (𝑩 ∩ 𝑪) c- B - [(𝑨 ∩ 𝑩)- (A ∩ B ∩ 𝑪 )] d- B-B ∩ ( A ∪ C); Give that ( 𝑨 ∩ 𝑪)= ∅ Q- 37 We know from the E.q (2-45) that an offline transformation of coordinators given by
  • 6. Where (x’,y’) are the transformed coordinators (x,y) are the original coordinator, and the element of A are given in the table 2.3. for the various type of transformation. The inverse transformation, A-1, to go from transformed back to the original coordinators in just as important for performing inverse mappings. a- Find the inverse scaling transformation? b- Find the inverse translation transformation? c- Find the inverse vertical and horizontal shearing transformation? d- Find the inverse rotation transformation? e- Show a composite inverse translate/rotation transformation? Answer for the former of matrix 1 0 0 0 1 0 0 0 1 x = v and y = w 𝑐 𝑥 0 0 0 𝑐 𝑦 0 0 0 1 x’ = cx v and y’ = cy w For the inverse translation transformation 1 0 𝑡 𝑥 0 1 𝑡 𝑦 𝑡 𝑥 𝑡 𝑦 1 x’ = v + tx and y’ = w + ty For the inverse vertical and horizontal shearing transformation 1 𝑠 𝑥 0 0 1 0 0 0 1 x’ = v +sx w and y’ = w 1 0 0 𝑠 𝑘 1 0 0 0 1 x’ = v and y’ = sk x + w
  • 7. For the inverse rotation transformation − 𝑐𝑜𝑠 𝜃 𝑠𝑖𝑛 𝜃 0 𝑠𝑖𝑛 𝜃 𝑐𝑜𝑠 𝜃 0 0 0 1 x’ = v cos 𝜃 - w sin 𝜃 and y’ = v sin 𝜃 + w cos 𝜃 Note: The above diagram used of OpenCV3 operates on images. Image operations are mainly based on various coordinate transformations of images, such as scale transformation, rotation transformation, translation transformation and offset transformation (horizontal or vertical). These transformations are all directed at the coordinates of images, not the pixels of images. They can be collectively called affine transformation. The above description is for several transformations in Gonzalez's Digital Image Processing.