首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
program代做、C/C++程序语言代写
项目预算:
开发周期:
发布时间:
要求地区:
and multiplicative scaling. By updating the individual pixel values in the image’s matrix, you can manipulate the
image in various ways to achieve the desired result. We will provide you with the starting code and required files
for the project.
Environment Setup
Code link:
1. Set up visual studio code for C/C++: Visual Studio Code C/C++ setup.
2. Download the code and set up your environment.
3. Rename the file FIRSTNAME LASTNAME NETID with your first name, last name, and NETID.
4. Test by running make. To learn more about make, read this Makefile tutorial.
Part I (35 points)
Create a templated class named Vector that serves as a fundamental component for implementing matrices in the
image-processing library (from Project 1) that performs matrix operations on images. The Vector class should be
capable of storing a collection of homogeneous data of any data type. Implement the class using either an array or
a linked list, based on your preference. The class should provide the following functionalities:
1. int getsize(): A member function that returns the size of the vector, i.e., the number of elements it
contains.
2. Copy constructor: A constructor that creates a new vector as a copy of an existing one.
3. Assignment operator (operator=): An operator that allows the assignment of one vector to another.
4. Destructor: A destructor that cleans up any resources the vector uses.
5. Input and output stream operators (operator>> and operator<<): Operators that allow reading from and
writing to input and output streams, respectively.
6. Arithmetic operators (operator+, operator-, and operator*): Operators that allow addition, subtraction, and multiplication of vectors.
7. Subscript operator (operator[]): An operator that provides access to individual elements of the vector
based on their index.
8. Additionally, implement any member functions as virtual if you believe they should be overrideable in derived classes. This class will later be used to create the Matrix class, which will be an essential part of the
image-processing library.
9. Constructors also need to be defined for the Vector object to be usable.
2
Part II (35 points)
Create a new class named Matrix that represents a matrix of elements of type uint8 t. The Matrix class should
utilize the Vector class through composition to implement the matrix structure, where each row or column of
the matrix is represented as an instance of the Vector class. The class should provide implementations for the
following operators and member functions:
1. Copy constructor
2. Assignment operator (operator=)
3. Destructor
4. Input and output stream operators (operator>> and operator<<)
5. Arithmetic operators (operator+, operator-, and operator*)
6. Subscript operator (operator[])
Additionally, implement the following new member functions in the Matrix class:
1. int getrows(): A member function that returns the number of rows in the matrix.
2. int getcols(): A member function that returns the number of columns in the matrix.
The Matrix class will serve as an essential component in the image-processing library (from Project 1) that performs matrix operations on images. The composition of Vector instances allows the Matrix class to leverage the
functionalities of the Vector class while maintaining the semantic distinction between vectors and matrices.
Part III (30 points)
Create a new Image class that inherits from the Matrix class and implements all the functions described in Project
1. The Image class should have the following properties:
• filePath: The file path for the image.
• numChannels: The number of color channels (e.g., 3 for RGB images).
• width: The width of the image in pixels.
• height: The height of the image in pixels.
The Image class should be capable of performing the following operations on images:
1. Scaling an image
2. Adding two images
3. Subtracting two images
4. Multiplying two images
The operations for scaling, adding, subtracting, and multiplying images should be implemented as overloaded
operators (+, -, and *).
3
Part IV (30 points) EXTRA CREDIT
• Add a function called transpose() to the Matrix class. This function should generate the transpose of
the original matrix, such that each element in the transposed matrix MT is given by the formula MT
i j = Mji,
where Mji is the element in the j-th row and i-th column of the original matrix M. The resulting matrix MT
should have dimensions that are the transpose of the original matrix’s dimensions, i.e., if the original matrix
M has dimensions m ⇥ n, the transposed matrix MT should have dimensions n ⇥ m.
• Additionally, create a function called resize() in the Image class that uses the stb image resize library
to resize an image and populates the Image object accordingly. The resize() function should take the
original image of dimensions m ⇥ n (height m and width n) and produce a resized image of dimensions p ⇥ q
(new height p and new width q), where p and q are the target dimensions for resizing. Use the functions
provided by the stb image resize library to perform the resizing operation, preserving the aspect ratio
and visual content of the image while adjusting its size. The resized image should be stored in the Image
object.
You may want to write a main.cpp file that tests the Image class with real images, executing all the operations
implemented in the previous parts of this project.
Submission
Please zip your code and submit it via Canvas. You must include the file with your name and NETID (as specified
in Section and your modified headers.
An illustration of the file structure is shown below:
The file organizational structure for this project is as follows:
• FIRSTNAME LASTNAME NETID
• Makefile
• src
– Image.cpp
4
– Image.h
– Matrix.cpp
– Matrix.h
– Vector.h
– main.cpp
• stb image
– stb image.h
– stb image resize.h
– stb image write.h
5
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
data程序代写、代做c/c++编程语...
2024-05-17
data程序代写、代做python编程...
2024-05-17
program代做、c/c++,python程...
2024-05-17
代写math 3333 3.0 - winter 2...
2024-05-17
代做seng6110 programming ass...
2024-05-17
代写seng6110 object oriented...
2024-05-17
代写comp828: statistical pro...
2024-05-17
代做culture and society调试数...
2024-05-17
代做comp 4911 winter 2024 as...
2024-05-17
代做lh physical iiib / 03 33...
2024-05-17
代做3032ict big data analyti...
2024-05-17
代写comp4702 report代写留学生...
2024-05-17
代写fin2020 hw6代写c/c++编程
2024-05-17
热点标签
fit2004
fit3152
mec208
econ20120
cpt304
econ2101
econ0051
engi4547
econ1048
eengm2510
fit1008
7033mkt
ec2066
cct380h5f
man00019m
mech265001
fin2020
fit9137
n1542
csc4140
math6119
comp1710
fina864
csys5020
busi4412
math5007
2702ict
dts204tc
comp2003j
cosc2673
ecmt2150
bff3121–
comu7000
stat6118
comp814
acc202
ematm0067
bit233
ecs776p
600543
bpln0025
comp3400
econ7030
159.342 ‐ operating
mang6134
math1005/math6005
geog5404m
comp1710/6780
infs 2042
inf6028
bman30702
math0002
msci242l
mgt11001
com00177m
bman71282
fit2001
cpt210
159.341
econ7310
comp3221
comp10002
cpt206
ecmt1010
finm081
econ2005
cpt202
fit3094
socs0030
data7201
data2x01
mn-3507
mat246h1
ib2d90
ib3j80
acc207
comp90007
compx518-24a
fit1050
info1111
acct2201
buad801
compsci369
cse 332s
info1110
math1033
scie1000
eeee2057
math4063
cmt219
econ5074
eng5009
csse2310/csse7231
ec333
econ0001
cpt204
elec4630
ma117
dts104tc
comp2017
640481
csit128
eco000109m
finc5090
ggr202h5f
nbs8295
4ssmn902
chc6171
dsa1002
ebu6304
comp1021
csci-ua.202
com6511
ma416
mec206
iom209
bism7202
idepg001
cpt106
comp1212
ecom209
math1062
mn-3526
fnce3000
fmhu5002
psyc10003
fina2222
be631-6-sp/1
finc2011
37989
5aaob204
citx1401
econ0028
bsan3204
comp9123
cmt218
itp122
qbus6820
ecmt1020
bus0117
soft3202/comp9202
basc0057
mecm30013
aem4060
acb1120
comp2123
econ2151
ecmt6006
inmr77
com 5140
ocmp5328
comp1039
had7002h
cmt309
asb-3715
elec373
cpt204-2324
be631-6-sp
econ3016
mast10007
buss6002
comp4403
comp30023
finm1416
csc-30002
6qqmn971
fin668
mnfg309
inft2031
cits1402
comp2011
eecs 3221
ebu4201
ct60a9600
com336
8pro102
econ7300
comp3425
comp8410
comp222
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
32022
mth6158
comp328
finn41615
2024
mec302
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!