Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar)
*Hint: a formula exists!
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers26
Suggested Problems
-
Find state names that start with the letter N
1440 Solvers
-
Back to basics 22 - Rotate a matrix
937 Solvers
-
Given a window, how many subsets of a vector sum positive
871 Solvers
-
Create a matrix X, where each column is a shifted copy of the vector v
222 Solvers
-
Matrix which contains the values of an other matrix A at the given locations.
239 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I believe one of the paretheses is misplaced in each of the assert statements. They should be assert(abs(RGB_to_gray(x)-g) < 1e-2).