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 8997559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:54:20+00:00 2026-06-15T23:54:20+00:00

I am working on a switching bilateral filter.. In this, they have formed clusters

  • 0

I am working on a switching bilateral filter.. In this, they have formed clusters of pixels to detect the edges in the image. They have used Sorted Quadrant Median Vector.

Code:

% Formation of clusters

 if((((m1 < avg) && (m4 < avg))&&((m2 >= avg) && (m3 >= avg))) || (((m2 < avg) && (m3 < avg))&&((m1 >= avg) && (m4 >= avg))))
     p=i+2;
     q=j+2;
     vec=[L(p-2,q) L(p-1,q) L(p+1,q) L(p+2,q)]; % Vertical edge
     dav=double(sum(vec)/4);
     %disp('vertical edge');

 elseif((((m3 < avg) && (m4 < avg))&&((m1 >= avg) && (m2 >= avg))) || (((m1 < avg) && (m2 < avg))&&((m3 >= avg) && (m4 >= avg))))
     p=i+2;
     q=j+2;
     vec=[L(p,q-2) L(p,q-1) L(p,q+1) L(p,q+2)]; % Horizontal edge
     dav=double(sum(vec)/4);
     %disp('horizontal edge');

 elseif((((m1 < avg) && (m3 < avg))&&((m2 >= avg) && (m4 >= avg))) || (((m2 < avg) && (m4 < avg))&&((m1 >= avg) && (m3 >= avg))))
     p=i+2;
     q=j+2;
     vec=[L(p-1,q+1) L(p-1,q-1) L(p+1,q-1) L(p+1,q+1)]; % Diagonal line
     dav=double(sum(vec)/4);
     %disp('diagonal line');

 end

m1,m2,m3 and m4 are the medians.. Is it correct to proceed this way?

Please explain these and suggest me a book/guide related to image processing in MATLAB

  • 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-15T23:54:21+00:00Added an answer on June 15, 2026 at 11:54 pm

    I assume here, m1, m2, m3, m4 are taken from one of your previous questions, meaning that
    they are medians of 3×3 subwindows of a 5×5 window.

    That is, they form a matrix like this:

    m1 m2
    m4 m3
    

    or in some similar configuration.

    That is, the first “if” branch means: if both the m1 and m4 medians are smaller than the average and m2 and m3 are greater (or the full opposite of this happens), there should be a steep change from left to right in that particular 5×5 subwindow. (Remember that medians filter out any single peak value which means that there will be not so many false edges detected even if the image is noisy.) As for vec,

    vec=[L(p-2,q) L(p-1,q) L(p+1,q) L(p+2,q)]; % Vertical edge
    

    just stores the vertical middle points of the search window. I don’t think it would work in this form, I would think storing the edge indices would make more sense here:

    vec=[[i:i+4]', repmat(j+2, 5, 1)]; 
    

    It would be the coordinates of the five edge points, where the edge is assumed to go from top to down in the middle of the current search window. (You can check this manually too.)

    The “else if”‘s work similarly.

    As for a starting point on image processing I can recommend you a book called “Learning OpenCV” by Gary Bradski and Adrian Kaehler although that is not a Matlab book. If you do not read the C++ programs in the book and the detailed description about OpenCV, you will still get quite a nice general round-up knowledge about image processing — or at least you’ll get familiar with the main concepts.

    As for Matlab specifics, I recommend you reading through the entire help on image processing toolbox. As though as it might sound, I think there is only hard way to learn image processing.

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

Sidebar

Related Questions

I have been recently working with Moles and I am now switching to Fakes.
I have a rails app that was working fine with sqlite but upon switching
While working on an Xcode project i keep getting the spinning wheel while switching
Some background I'm currently working on a mobile site so I keep switching user
I'm working on a project of image stitching using OpenCV 2.3.1 on Visual Studio
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with H2 I get this error when I try to write a row
I'm working on switching my JPA persistence provider from EclipseLink 2.3 to Hibernate 3.6.5.Final.
The project I'm working with is compiled with GCC 3.4.2. I'm considering switching to
I have been working in Java for the past 4 years and I am

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.