Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Integrated Performance Primitives
- How to calculate Euclidean distance between RGB Pixels?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

samueleforconi

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-01-2008
07:07 AM

190 Views

How to calculate Euclidean distance between RGB Pixels?

Hi, I'm coding an algorithm for background estimation using Intel IPP, and I need to calculate the euclidean difference between pixels (RGB) of two consecutive video frames.

In other words, if Px and Py are the two RGB pixels I need to determine the value:

d(x,y) = sqrt( (Rx-Ry) + (Gx-Gy) + (Bx-By) ).

I see in the manual that there are some functions that can calculate the euclidean distance between an image and a template, but I can't figure out how can I use one of them to fit my needs.

Do you think that using a loop to iterate on each pixel of the two images is much more

expensive in calculation time than using the IPP function?

Thank you.

Samuele.

Link Copied

1 Reply

Vladimir_Dudnik

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-20-2008
09:12 AM

190 Views

Hi Samuele,

We do not have such single primitive function. But you may try to implement this algorithm with combination of call for several IPP functions.

Regards,

Vladimir

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.