# Revision history [back]

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length * Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00 * Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

 2 No.2 Revision thdrksdfthmn 2170 ●5 ●18 ●46

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length * Length

• Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00 * Hu:0.00
• Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length

• Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00
• Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

Hello, after testing and debugging the code for ImageTest.png I realized that the countours detected are two on the same white area image. This cause the calculation of moments are also 2 for the same white area. My question, why it detect two contours? C:\fakepath\ImageTest.png

Second question, I tried also another type of image which the white area are continuous until at the end of the image as in test.png. running moment code does not reflect the white area as the contour is not detected at the end of the image. Is there any method that I can use for the program to know that the white area is the area that I want to calculate even it had touched the boundary of the image? C:\fakepath\test.png

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length

• Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00
• Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

Hello, after testing and debugging the code for ImageTest.png using this code I realized that the countours detected are two on the same white area image. This cause the calculation of moments are also 2 for the same white area. My question, why it detect two contours? C:\fakepath\ImageTest.png

Second question, I tried also another type of image which the white area are continuous until at the end of the image as in test.png. running moment code does not reflect the white area as the contour is not detected at the end of the image. Is there any method that I can use for the program to know that the white area is the area that I want to calculate even it had touched the boundary of the image? C:\fakepath\test.png

 5 No.5 Revision StevenPuttemans 20029 ●16 ●82 ●207 http://stevenputtemans...

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length

• Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00
• Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

FROM DOUBLE POST

Hello, after testing and debugging the code for ImageTest.png using this code I realized that the countours detected are two on the same white area image. This cause the calculation of moments are also 2 for the same white area. My question, why it detect two contours? C:\fakepath\ImageTest.png

Second question, I tried also another type of image which the white area are continuous until at the end of the image as in test.png. running moment code does not reflect the white area as the contour is not detected at the end of the image. Is there any method that I can use for the program to know that the white area is the area that I want to calculate even it had touched the boundary of the image? C:\fakepath\test.png

### Moment and Archlength return values - confused

Hello, I had used the moment coding together with the arch length code and found out the number do not match what I had expected. I had an image 500X500 pixel as in this C:\fakepath\ImageTest.png.

Info: Area and Contour Length

• Contour[0] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.83 - Hu:0.00
• Contour[1] - Area (M_00) = 0.00 - Area OpenCV: 0.00 - Length: 994.00 - Hu:0.00

For the M00 it state = 0? why 0?? There should be maybe 500 pixel? and the contour found are 2, I may agree due to the two lines in the result window.

The biggest confusion is the arch length value. Why 994? if it is a straight line, it should be the size of the image which is 500 pixels. Can someone show me where should I look on?

FROM DOUBLE POST

Hello, after testing and debugging the code for ImageTest.png using this code I realized that the countours detected are two on the same white area image. This cause the calculation of moments are also 2 for the same white area. My question, why it detect two contours? C:\fakepath\ImageTest.png

Second question, I tried also another type of image which the white area are continuous until at the end of the image as in test.png. running moment code does not reflect the white area as the contour is not detected at the end of the image. Is there any method that I can use for the program to know that the white area is the area that I want to calculate even it had touched the boundary of the image? C:\fakepath\test.png

Here is the image with two white area