Problem 2195. Sum of the pixel values for the blue color
Calculate the sum of the pixel values for the blue color, with a picture as an input.
NOTE: The picture will be provided as a matrix of size Height*Width*Colors
To test your algorithm, you can import the picture to MATLAB with the command 'inputImage=imread('http://static0.therichestimages.com/wp-content/uploads/2014/02/san-sebastian.jpg')'; and introduce 'inputImage' in your algorithm. The output should be '54784197'
Solution Stats
Problem Comments
-
7 Comments
Show
4 older comments
goc3
on 4 Jan 2021
@Dyuman Joshi: the test suite and description have been updated with the value provided by Rafael S.T. Vieira. At some point in time the image was changed, as the early solutions did not require any hard coding.
Dyuman Joshi
on 4 Jan 2021
Thank you @goc3, appreciate your effort in helping the community!
goc3
on 11 Jun 2024
The problem has been updated to test a built-in image as the linked images are no longer available.
Solution Comments
Show commentsProblem Recent Solvers63
Suggested Problems
-
3413 Solvers
-
Project Euler: Problem 5, Smallest multiple
1503 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1198 Solvers
-
First non-zero element in each column
870 Solvers
-
Find the dimensions of a matrix
531 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!