Why do I get such different values for R, G and B for very similar photos?
I previously asked this question here. .Since then I have been finding answers little by little to the doubts that have arisen.
In short, I am applying a mask to a series of photos of a sample which is changing color over time. From each of these photos I am measuring the mean R, G and B values within the mask and then transforming them to L, a and b, and finally obtaining the Delta E values between each photo and the first one.
At first, with small samples, everything worked well, and I was able to obtain graphs like the following:
these from samples such as the following:
However, then, using larger samples, I am getting values like the following:
As I said, the only thing I did was to increase the sample size (plus change the time between each photo from about three per second to one per second, and increase the total number of photos by almost 2000).
The origin of the problem seems to be in the measurement of the values of R, G and B, because from these I did the rest of the calculations. For the large sample, where the error occurs, the values of R, G and B go up and down drastically in a strange way from photo 100 to 1800, more or less.
I checked photo 98, 99, 100 and 101 and at first sight they are identical, so the error is not born (apparently) from the analyzed photos.
These are the photos when all start to fail.
I use two codes, the first one (made by Data Analyst, shared by himself in one of the links I put in my first question) to make the mask and verify that it has a correct shape and size. And the second one to apply this mask to each of the photos of the sample and obtain from this process the values of R, G, B, L, a, b and Delta E. Finally, I also use another one to make the graphs. I share them in case you need to see them.
So, what could be going on, why from two very similar photos do you get values for R, G and B that do not make sense, why with the other sample does this error not occur?
It is worth to say that analyzing the photos 100 and 101 (where the delivered data go crazy) in the first code (the one that creates the mask) i get similar values for R, G and B, nothing like the ones delivered by the second code. So it is likely that the error has to do with the precision used for the numbers (and not with the code itself, as it was used for the small sample correctly) in addition to the fact that as the color change is more gradual in this large sample, the values from photo to photo are more similar. If the error arises from here, could you help me to correct it? I tried to make some changes but the error persisted, and I’m not very good at programming without the help of AI (my bad).
Thanks in advance!I previously asked this question here. .Since then I have been finding answers little by little to the doubts that have arisen.
In short, I am applying a mask to a series of photos of a sample which is changing color over time. From each of these photos I am measuring the mean R, G and B values within the mask and then transforming them to L, a and b, and finally obtaining the Delta E values between each photo and the first one.
At first, with small samples, everything worked well, and I was able to obtain graphs like the following:
these from samples such as the following:
However, then, using larger samples, I am getting values like the following:
As I said, the only thing I did was to increase the sample size (plus change the time between each photo from about three per second to one per second, and increase the total number of photos by almost 2000).
The origin of the problem seems to be in the measurement of the values of R, G and B, because from these I did the rest of the calculations. For the large sample, where the error occurs, the values of R, G and B go up and down drastically in a strange way from photo 100 to 1800, more or less.
I checked photo 98, 99, 100 and 101 and at first sight they are identical, so the error is not born (apparently) from the analyzed photos.
These are the photos when all start to fail.
I use two codes, the first one (made by Data Analyst, shared by himself in one of the links I put in my first question) to make the mask and verify that it has a correct shape and size. And the second one to apply this mask to each of the photos of the sample and obtain from this process the values of R, G, B, L, a, b and Delta E. Finally, I also use another one to make the graphs. I share them in case you need to see them.
So, what could be going on, why from two very similar photos do you get values for R, G and B that do not make sense, why with the other sample does this error not occur?
It is worth to say that analyzing the photos 100 and 101 (where the delivered data go crazy) in the first code (the one that creates the mask) i get similar values for R, G and B, nothing like the ones delivered by the second code. So it is likely that the error has to do with the precision used for the numbers (and not with the code itself, as it was used for the small sample correctly) in addition to the fact that as the color change is more gradual in this large sample, the values from photo to photo are more similar. If the error arises from here, could you help me to correct it? I tried to make some changes but the error persisted, and I’m not very good at programming without the help of AI (my bad).
Thanks in advance! I previously asked this question here. .Since then I have been finding answers little by little to the doubts that have arisen.
In short, I am applying a mask to a series of photos of a sample which is changing color over time. From each of these photos I am measuring the mean R, G and B values within the mask and then transforming them to L, a and b, and finally obtaining the Delta E values between each photo and the first one.
At first, with small samples, everything worked well, and I was able to obtain graphs like the following:
these from samples such as the following:
However, then, using larger samples, I am getting values like the following:
As I said, the only thing I did was to increase the sample size (plus change the time between each photo from about three per second to one per second, and increase the total number of photos by almost 2000).
The origin of the problem seems to be in the measurement of the values of R, G and B, because from these I did the rest of the calculations. For the large sample, where the error occurs, the values of R, G and B go up and down drastically in a strange way from photo 100 to 1800, more or less.
I checked photo 98, 99, 100 and 101 and at first sight they are identical, so the error is not born (apparently) from the analyzed photos.
These are the photos when all start to fail.
I use two codes, the first one (made by Data Analyst, shared by himself in one of the links I put in my first question) to make the mask and verify that it has a correct shape and size. And the second one to apply this mask to each of the photos of the sample and obtain from this process the values of R, G, B, L, a, b and Delta E. Finally, I also use another one to make the graphs. I share them in case you need to see them.
So, what could be going on, why from two very similar photos do you get values for R, G and B that do not make sense, why with the other sample does this error not occur?
It is worth to say that analyzing the photos 100 and 101 (where the delivered data go crazy) in the first code (the one that creates the mask) i get similar values for R, G and B, nothing like the ones delivered by the second code. So it is likely that the error has to do with the precision used for the numbers (and not with the code itself, as it was used for the small sample correctly) in addition to the fact that as the color change is more gradual in this large sample, the values from photo to photo are more similar. If the error arises from here, could you help me to correct it? I tried to make some changes but the error persisted, and I’m not very good at programming without the help of AI (my bad).
Thanks in advance! image analysis, image processing, image acquisition MATLAB Answers — New Questions