Edit: The matrix at the bottom is the figure.
a)To find area of an image which is represented in binary format ,we need to consider number of pixels that are "on" implies number of bits that are 1.
Therefore,no of bits represented as 1=77
Hence ,area=77
b)To find minimum aspect ratio which is represented as x:y where x represents width and y represents height.
Which we can represent width as 14 since 1st Column and last columns are only 0's. We can exclude and can count remaining columns for width.
Height is 8 because 1st and last rows represents 0 .
Therefore, minimum aspect ratio=14:8
c)To find centroid ,we need consider the rows and columns where the pixel value is 1.
Let's consider row values,row=[4-6,4-6,4-6,4-9,2-9,2-8,2-8,2-9,2-9,4-9,4-9,4-9,5-7,5-7]
Columns=[6-10,6-10,2-13,2-15,2-15,5-15,5-13,5,6,9-13]
Now we will find the mean of rows and coloumns.
Row mean=total sum/number of pixels represented as 1
=439/77
=5.7
Columns mean= 665/77
=8.63
d) Compactness:It is the square of the perimeter to its area.lets find the perimeter of the matrix.
We need to find equidistant between each and every pair of rows and columns using formula sqrt((x2-x1)2+(y2-y1)2)
We need to do between all the row column pairs which we got in b) .
Compactness=sqrt(resulting perimeter from above) /area
=Sqrt(perimeter)/77
Edit: The matrix at the bottom is the figure. For the image in Fig. 2 where...
Assignment Λ You shall write a Java program that accepts 5 command-line arguments and generates an image of a Sierpinski triangle, as a 24- bit RGB PNG image file. Specifications The command-line arguments shall consist of the following 1. The width (in pixels) of the image, as a positive decimal integer 2. The height (in pixels) of the image, as a positive decimal integer 3. The minimum area (in pixels) that a triangle must have in order to be drawn,...
3. (a) Use the table method to calculate the coordinates of the centre of mass of the shape shown in Figure Q3a. Use the bottom left corner as the origin. Give your answers to three significant figures. (10 marks) .(b) Use the calculus method to calculate the position of the centre of area, relative to the origin, of the shape enclosed by the lines x = 0, y = 0 and y = cos x between x = 0 and...
Can you show step by step solutions please with comments! please write neatly :) Problem 2 (12 points) An 8x8 image is given below: 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1...
The ACME Manufacturing Company has hired you to help automate their production assembly line. Cameras have been placed above a conveyer belt to enables parts on the belt to be photographed and analyzed. You are to augment the system that has been put in place by writing C code to detect the number of parts on the belt, and the positions of each object. The process by which you will do this is called Connected Component Labeling (CCL). These positions...
Answer the following questions Q1. The image digitisation process consists of, in general, three components to convert the continuous signal into digital form, including sampling (or discretisation in time/space), quantization (discretisation of amplitude) and coding (generation of binary code for each quantised level) a. Name the major distortions associated with the above image digitisation process [2 marks] Name the areas of principal applications (or the basic classes of problems) which are covered by image processing. b. Discuss the main issues...
from PIL import Image import random # NOTE: Feel free to add in any constant values you find useful to use BLACK = (0, 0, 0) WHITE = (255, 255, 255) # NOTE: Feel free to add in any helper functions to organize your code but # do NOT rename any existing functions (or else, autograder # won't be able to find them!!) # NOTE: The following function is already completed for you as an example # You can use...
For this project, each part will be in its oun matlab script. You will be uploading a total 3 m files. Be sure to make your variable names descriptive, and add comments regularly to describe what your code is doing and hou your code aligns with the assignment 1 Iterative Methods: Conjugate Gradient In most software applications, row reduction is rarely used to solve a linear system Ar-b instead, an iterative algorithm like the one presented below is used. 1.1...
Consider a cylindrical capacitor like that shown in Fig. 24.6. Let d = rb − ra be the spacing between the inner and outer conductors. (a) Let the radii of the two conductors be only slightly different, so that d << ra. Show that the result derived in Example 24.4 (Section 24.1) for the capacitance of a cylindrical capacitor then reduces to Eq. (24.2), the equation for the capacitance of a parallel-plate capacitor, with A being the surface area of...
The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...
The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...