1 view (last 30 days)

Hi

I use the image I attached.

I use this line to get the sum of pixels from row 307 to 366, at columns from 464 to 490

for col = 464 : 490

heights(col) = sum(rgbImage(366,col) - rgbImage(307,col));

end

This subtraction would give us 59 pixels and with a calibration factor of 0,042 it would give us around 2,48 mm for all the columns.

When I export the values to an excel file I get

If you multiply the below values with 0,042 you only get around 6 values acceptable and the closest to 2,5mm.

Why this incongruency???

By measuring heights(col), I should get 59 pixels multiplied by 0,042 I would get around 2,47 mm. Why I don't get those values when I export them to Excel??

Any ideas?

1

5

7

10

13

21

31

38

48

54

58

65

69

76

75

73

69

67

66

58

52

45

39

33

28

24

18

14

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 11 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674545

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674545

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674551

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674551

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674552

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674552

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674559

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674559

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674560

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674560

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674565

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674565

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674577

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674577

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674581

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674581

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674584

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674584

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674589

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674589

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674597

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/446660-why-this-incongruency-happens-regarding-number-of-pixels#comment_674597

Sign in to comment.