The discrete integral of a contour of an image

In summary, the conversation discusses using discrete integrals with contours to integrate points on an image. The first example involves a simple curve, where the function is calculated at each point and multiplied by the distance between two consecutive points. However, the problem arises when the curve changes topology and becomes multiple curves. The speaker is unsure if the same method can be applied in this case. The second example shows the problem of dividing the contour into multiple curves. The speaker is looking for a way to calculate the discrete integral over these points, but is unsure if numerical methods can be used. The conversation then delves into the concept of line integrals in physics and how it could be applied to the problem. Finally, the speaker discovers a solution by considering the
  • #1
alitas
7
0
Hi everybody !

I have a question about discrete integrals with contours. I want to integrate
the points that makes the contour of an image. When the contour is only one
curve it is easy I get the function in every point of the contour and I multiply
by the distance between two consecutive points.

But my problems y when this curve changes of topology so the contour
can be several contours inside, outside the other curve. So I wonder if I can use the
same method.


Example 1: I calculate the corresponding functions
of the elements in the position of the contour multiplyed
by the width between two consecutive points.

000000000000
000011111100
000100000100
000010111100
000001000000

My problem Example 2: It is when my contour is not a curve
with starting and ending if not particionates and becomes
more curves. Someone knows how to calculate the discrete
integral over the points 1, and 2??.

0000000000000
0000111111000
0000102220000
0000102222220
0000100001120
0000111111120

The problem can be arbitrary I just show a case to explain my
problem

Thank you very much
Sincerely
Esmeralda Ruiz
 
Mathematics news on Phys.org
  • #2
alitas said:
My problem Example 2: It is when my contour is not a curve
with starting and ending if not particionates and becomes
more curves.

Do you mean that it "bifurcates" and becomes more curves?

It isn't possible to say what you should do unless we understand what you are trying to accomplish by doing the integration. What function are you integrating? What is the result of the integration supposed to mean?
 
  • #3
Thanks for answering. I attached an example I want to calculate the integral of a contour (discrete points). The function could be the force that makes evolve this contour. The first example is the trivial I calculate the function in every points and I multiply it by the width between the two consecutive points so the results is ok (the last point with the first). The problem is when the curve changes of topology or as you said bifurcates in others caused by the force applying to it. Then I would still like to calculate the integral of that curve(s) to keep evolving until it converges. I do not know if there is any way to do it a numerical way to calculate discrete integrals over some points or numerical optimization methods. The ones I know they need a polinomial function not an image.

Thanks for your help
 

Attachments

  • example 1.jpg
    example 1.jpg
    28.8 KB · Views: 449
  • #4
alitas said:
The function could be the force that makes evolve this contour.

Does your problem represent an actual problem in physics (force = force in Newtons)?

Or is this a kind of metaphorical force - some function f(...) that you invented to measure how much a contour departs from a smooth shape like a circle, some function that merely plays a role in image processing?
 
  • #5
It is the second thing the curve must evolve certain shape so the force can be for every point of the curve multiplied by a force. For example the force can be

c1 = average inside of the curve
c2 = average outside of Phi0
I1 = image
force=-(I1-c1).^2+(I1-c2).^2;

But the function I am using is working my problem is how to make the integral of
arbitrary points that can be in whatever point of the image. I also tried triangulization and getting the area of the triangles of every point. But it seems not work.

Thank you again
 
  • #6
So for example if you have several x,y and z (function) that are not consecutive how to integrate
x,y,z=function
1,1,3
1,2,4
1,4,5

instead of having a polinomial function you have an arbitrary function.

Thanks again
 
  • #7
Even though you are not dealing with physics, it might be useful to think about physics.

In physics, line integrals are often used to compute the flow of particles or "lines of force" through a contour. The net flow through a closed contour will be zero unless there are "sources" or "sinks" of particles within that area. Can the "force" that you are using be imagined as a "flux" of particles?
 
  • #8
right, I think you gave me the idea, so if I did not understood wrong, every curve will have the height equal 1 it would be the same as a line (height = 1), the only thing to consider is the width. So if I have two curves separated it will be the same idea as before ( I think), but without considering the width between two curves no connected and this will give me the integral that it would be equal the length of the contour. I think this is why the triangulation was not working because I was not looking for the area. Thank you very much it was a very good idea !.
 

1. What is the discrete integral of a contour of an image?

The discrete integral of a contour of an image is a mathematical operation that calculates the sum of the pixel intensities along a closed path in an image. It is commonly used in image processing to extract features and identify objects.

2. How is the discrete integral of a contour of an image different from a regular integral?

The discrete integral of a contour of an image is different from a regular integral because it operates on discrete values (pixels) rather than continuous values. It also follows a specific path along the contour of an image rather than over a continuous function.

3. Can the discrete integral of a contour of an image be negative?

Yes, the discrete integral of a contour of an image can be negative. This can happen if the path of the contour crosses from a region of higher pixel intensity to a region of lower pixel intensity, resulting in a negative change in the sum.

4. How is the discrete integral of a contour of an image used in computer vision?

The discrete integral of a contour of an image is used in computer vision to extract features from images, such as edges and corners, which can then be used to identify and classify objects. It can also be used in image segmentation to separate objects from their backgrounds.

5. Are there any limitations to using the discrete integral of a contour of an image?

One limitation of using the discrete integral of a contour of an image is that it assumes a closed contour, which may not always be the case in real-world images. Additionally, the accuracy of the measurement depends on the resolution of the image and the smoothness of the contour path.

Similar threads

Replies
6
Views
1K
  • Calculus
Replies
8
Views
2K
Replies
4
Views
2K
  • General Math
Replies
2
Views
1K
Replies
20
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Replies
1
Views
787
Replies
19
Views
3K
Replies
3
Views
1K
Back
Top