ken jun

Ranch Hand

Posts: 46

Tim Moores

Saloon Keeper

Posts: 3511

77

ken jun

Ranch Hand

Posts: 46

posted 5 years ago

I am sorry I do not express it clearly. the curl from the wiki http://en.wikipedia.org/wiki/Curl_(mathematics)

here is the code I use to count the "curl" in MATLAB

%count the gradient of an image

I = imread('a.jpg');

[rows cols dim]=size(I);

%sobel operator used to calculate gradient image

Grd=[ -1 -2 -1;

0 0 0;

1 2 1];

Emean=zeros(rows,cols);

for i=1:dim

Ev(:,:,i)=conv2(x(:,:,i),Grd,'same');

Eh(:,:,i)=conv2(x(:,:,i),Grd.','same');

E(:,:,i)=abs(Eh(:,:,i))+abs(Ev(:,:,i));

% E(:,:,i)=conv2(X(:,:,i),Grd1,'same');

end

Emean=1/dim*sum(E,3); %finds average gradient image

%count the "curl"

Ecurl = zeros(rows, cols);%creat a 0 rows * cols matrix

for i = 1:dim

Ecurl(:,:,i) = conv2(Iy(:,:,i), Grd.', 'same') - conv2(Ix(:,:,i), Grd, 'same');

end

theCurl = 1/dim*sum(Ecurl,3);

looking forward to your reply .thanks

Tim Moores wrote:I have done a fair amount of image processing work, and have no idea what you mean by "curl of an image"; where did you see that? In the computing domain, "curl" is a command line tool to access a particular URL.

I am sorry I do not express it clearly. the curl from the wiki http://en.wikipedia.org/wiki/Curl_(mathematics)

here is the code I use to count the "curl" in MATLAB

%count the gradient of an image

I = imread('a.jpg');

[rows cols dim]=size(I);

%sobel operator used to calculate gradient image

Grd=[ -1 -2 -1;

0 0 0;

1 2 1];

Emean=zeros(rows,cols);

for i=1:dim

Ev(:,:,i)=conv2(x(:,:,i),Grd,'same');

Eh(:,:,i)=conv2(x(:,:,i),Grd.','same');

E(:,:,i)=abs(Eh(:,:,i))+abs(Ev(:,:,i));

% E(:,:,i)=conv2(X(:,:,i),Grd1,'same');

end

Emean=1/dim*sum(E,3); %finds average gradient image

%count the "curl"

Ecurl = zeros(rows, cols);%creat a 0 rows * cols matrix

for i = 1:dim

Ecurl(:,:,i) = conv2(Iy(:,:,i), Grd.', 'same') - conv2(Ix(:,:,i), Grd, 'same');

end

theCurl = 1/dim*sum(Ecurl,3);

looking forward to your reply .thanks

Campbell Ritchie

Sheriff

Posts: 53750

127

posted 5 years ago

The only CURL I could find on Wikipedia was this. I don’t know how many mathematicians we have who are regular readers here, because they might be the only people able to help. If you post the same question elsewhere, be sure to tell people on both website about the cross-post.

Matthew Brown

Bartender

Posts: 4568

9

posted 5 years ago

I don't know anything about image processing, but in general the curl of a vector field is a measure of the local rotation of the field.

For example, I used it a lot in fluid mechanics. If you have a function giving the velocity of the fluid at any point, then the curl of that gives you the "vorticity" - the amount the fluid is swirling at that point. A whirlwind or tornado is an example of a high concentration of vorticity.

I'm not quite sure what that would correspond to in an image, but it would be something to do with rotation.

For example, I used it a lot in fluid mechanics. If you have a function giving the velocity of the fluid at any point, then the curl of that gives you the "vorticity" - the amount the fluid is swirling at that point. A whirlwind or tornado is an example of a high concentration of vorticity.

I'm not quite sure what that would correspond to in an image, but it would be something to do with rotation.

ken jun

Ranch Hand

Posts: 46

posted 5 years ago

thanks a lot ,if I post it somewhere else I will tell about the cross-post

Campbell Ritchie wrote:The only CURL I could find on Wikipedia was this. I don’t know how many mathematicians we have who are regular readers here, because they might be the only people able to help. If you post the same question elsewhere, be sure to tell people on both website about the cross-post.

thanks a lot ,if I post it somewhere else I will tell about the cross-post

ken jun

Ranch Hand

Posts: 46

posted 5 years ago

I check the meaning of "curl" in math and physics , but I read more I feel more confused. ╮(╯_╰)╭

According to your answer, I think ,perhaps , it is something about rotation.

thank you Matthew

Matthew Brown wrote:I don't know anything about image processing, but in general the curl of a vector field is a measure of the local rotation of the field.

For example, I used it a lot in fluid mechanics. If you have a function giving the velocity of the fluid at any point, then the curl of that gives you the "vorticity" - the amount the fluid is swirling at that point. A whirlwind or tornado is an example of a high concentration of vorticity.

I'm not quite sure what that would correspond to in an image, but it would be something to do with rotation.

I check the meaning of "curl" in math and physics , but I read more I feel more confused. ╮(╯_╰)╭

According to your answer, I think ,perhaps , it is something about rotation.

thank you Matthew

Campbell Ritchie

Sheriff

Posts: 53750

127

Matthew Brown

Bartender

Posts: 4568

9

posted 5 years ago

It's not that specific. Curl is a general differential operator on any vector field. I just find thinking about fluid flow to be one of the easiest ways to understand what it means, because there there's a nice physical interpretation.

It also crops up in Maxwell's equations, describing the relationship between electricity and magnetism:

(

Campbell Ritchie wrote:It seems weird that you should try putting something in an image which refers to water turning in a pipe. Which seems to be what I found when I looked for it.

It's not that specific. Curl is a general differential operator on any vector field. I just find thinking about fluid flow to be one of the easiest ways to understand what it means, because there there's a nice physical interpretation.

It also crops up in Maxwell's equations, describing the relationship between electricity and magnetism:

(

**E**is electric field,

**B**is magnetic field, and the "Delta x" part is the usual notation for curl).

ken jun

Ranch Hand

Posts: 46

posted 5 years ago

Thank you very much. But I am still confused about how to describe it on the image field in a easily understand way ╮(╯_╰)╭

Matthew Brown wrote:Campbell Ritchie wrote:It seems weird that you should try putting something in an image which refers to water turning in a pipe. Which seems to be what I found when I looked for it.

It's not that specific. Curl is a general differential operator on any vector field. I just find thinking about fluid flow to be one of the easiest ways to understand what it means, because there there's a nice physical interpretation.

It also crops up in Maxwell's equations, describing the relationship between electricity and magnetism:

(Eis electric field,Bis magnetic field, and the "Delta x" part is the usual notation for curl).

Thank you very much. But I am still confused about how to describe it on the image field in a easily understand way ╮(╯_╰)╭

Consider Paul's rocket mass heater. |