Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:23:10+00:00 2026-06-12T01:23:10+00:00

I have an array of average RGB pixel values from a ROI out of

  • 0

I have an array of average RGB pixel values from a ROI out of 611 images (dimensions 3×611). The images are taken over 64 seconds. I interpret avergae values of each color stream as a signal with time and plot it in Matlab. I also plot the power spectrum using fft(). In this power spectrum I am getting a huge values in the low frequency ranges. I want to remove these values and so want a high pass filter with cutoff at 0.2 Hz. Also I want this filter to be very sharp and totally dampen the power of frequencies less than 0.2 Hz and maintain the power of frequencies greater than 0.2 Hz. Please suggest a way to do this.

Code till I get power spectrum of green stream

imageFiles = dir('*.png');      
noFiles = length(imageFiles);    % Number of files found
avgVals = zeros(noFiles,3);

noise = 0;                       %Boolean for noise: if 1, then ROI moves randomly

noiseV = 0;
noiseH = 0;

for i=1:noFiles
   curFileName = imageFiles(i).name;
   curImage = imread(curFileName);

   temp1  = curImage(175:215 , 290:385, 1);
   avgVals(i,1) = (sum(sum(temp1)'))/3936;

   temp2  = curImage(175:215 , 290:385, 2);
   avgVals(i,2) = (sum(sum(temp2)'))/3936;

   temp3  = curImage(175:215 , 290:385, 3);
   avgVals(i,3) = (sum(sum(temp3)'))/3936;
end

Rstream = avgVals(:,1);
Gstream = avgVals(:,2);
Bstream = avgVals(:,3);

%plot actual signal with respect to time
xAxis = (0:64/610:64);
plot(xAxis,Rstream,'r');
hold on;
plot(xAxis,Gstream,'g');
hold on;
plot(xAxis,Bstream,'b');

nfft = 1024;

R = fft(Rstream,nfft);
R = R(1:nfft/2);
mR = abs(R);
G = fft(Gstream,nfft);
G = G(1:nfft/2);
mG = abs(G);
B = fft(Bstream,nfft);
B = B(1:nfft/2);
mB = abs(B);

f=(0:nfft/2-1)*(611/64)/nfft;

figure(2);
plot(f,mG,'g');

Thanks. Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:23:11+00:00Added an answer on June 12, 2026 at 1:23 am

    If you’re not familiar with Matlab filters you can use the filterbuilder GUI by typing filterbuilder in the console.

    Once you made your settings you’ll get a filter object that you can use in combination with the filter function.

    http://www.mathworks.de/de/help/signal/ref/filterbuilder.html

    http://www.mathworks.de/de/help/matlab/ref/filter.html

    If you are working on what I think you’re doing you can also do a simple detrending using detrend, in order to get rid of the “DC” part of you signal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would get find an average from an array? If I have the array:
I'm trying to build a tool to average values from a multidimensional array in
I have the following array, I need to reorder it by average rating descending.
So i have a 2 dimensional array that is used over several pages (session)
I essentially have an array of values like this: 0.25, 0.24, 0.27, 0.26, 0.29,
Is there a way to calculate the average distance of array elements from array
I have sales statistic data in array form to calc standard deviation or average
I have a two-dimensional array of data. I need to average every two rows,
I have to sort an array. Apart from the already existing types of sorting
I have a C array fftArray[64] that contains values that I want averaged and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.