rt A: w you are quite comfortable with 2D pointers. Here your goal is to define and allocate emory for 3D pointers. Write a function that receives four arguments: • An alias to a 3D pointer • Number of pages (or number of matrices) Number of rows Number of columns w your goal is to first allocate the memory for pages, rows and then for columns hamically using a new operator. After creating a 3D array now assign the values to each pixel(index) of e3D array Randomly consider this 3D array as Red, Green, Blue (RGB) Image, Calculate the mean and ander deviation of RGB image and return the mean and standard deviation of the pixel. rt B: ite one more function in this function, your goal is to write code for deallocating a dynamically ocated 3D matrix. Your function will receive four arguments: • An Alias to 3D pointer Number of pages Number of rows Number of columns mplete the code to properly deallocate the 3D array

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.2: Array Names As Pointers
Problem 2E
icon
Related questions
Question

Note: Please solve using c++ programming Language.

Task 3
Part A:
Now you are quite comfortable with 2D pointers. Here your goal is to define and allocate
memory for 3D pointers. Write a function that receives four arguments:
• An alias to a 3D pointer
Number of pages (or number of matrices)
• Number of rows
Number of columns
Now your goal is to first allocate the memory for pages, rows and then for columns
dynamically using a new operator. After creating a 3D array now assign the values to each pixel(index) of
the 3D array Randomly consider this 3D array as Red, Green, Blue (RGB) Image, Calculate the mean and
Stander deviation of RGB image and return the mean and standard deviation of the pixel.
Part B:
Write one more function in this function, your goal is to write code for deallocating a dynamically
allocated 3D matrix. Your function will receive four arguments:
• An Alias to 3D pointer
Number of pages
Number of rows
Number of columns
Complete the code to properly deallocate the 3D array
Transcribed Image Text:Task 3 Part A: Now you are quite comfortable with 2D pointers. Here your goal is to define and allocate memory for 3D pointers. Write a function that receives four arguments: • An alias to a 3D pointer Number of pages (or number of matrices) • Number of rows Number of columns Now your goal is to first allocate the memory for pages, rows and then for columns dynamically using a new operator. After creating a 3D array now assign the values to each pixel(index) of the 3D array Randomly consider this 3D array as Red, Green, Blue (RGB) Image, Calculate the mean and Stander deviation of RGB image and return the mean and standard deviation of the pixel. Part B: Write one more function in this function, your goal is to write code for deallocating a dynamically allocated 3D matrix. Your function will receive four arguments: • An Alias to 3D pointer Number of pages Number of rows Number of columns Complete the code to properly deallocate the 3D array
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr