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

  • Home
  • SEARCH
  • 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 9120253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:35:09+00:00 2026-06-17T05:35:09+00:00

Given an image, I would like to extract more subimages from it, but the

  • 0

Given an image, I would like to extract more subimages from it, but the resulting subimages must not be overly similar to each other. If the center of each ROI should be chosen randomly, then we must make sure that each subimage has at most only a small percentage of area in common with other subimages.
Or we could decompose the image into small regions over a regular grid, then I randomly choose a subimage within each region. This option, however, does not ensure that all subimages are sufficiently different from each other. Obviously I have to choose a good way to compare the resulting subimages, but also a similarity threshold.

The above procedure must be performed on many images: all the extracted subimages should not be too similar. Is there a way to identify regions that are not very similar from a set of images (for eg by inspecting all histograms)?

  • 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-17T05:35:10+00:00Added an answer on June 17, 2026 at 5:35 am

    One possible way is to split your image into n x n squares (save edge cases) as you pointed out, reduce each of them to a single value and group them according to k-nearest values (pertaining to the other pieces). After you group them, then you can select, for example, one image from each group. Something that is potentially better is to use a more relevant metric inside each group, see Comparing image in url to image in filesystem in python for two such metrics. By using this metric, you can select more than one piece from each group.

    Here is an example using some duck I found around. It considers n = 128. To reduce each piece to a single number, it calculates the euclidean distance to a pure black piece of n x n.

    f = Import["http://fohn.net/duck-pictures-facts/mallard-duck.jpg"];
    pieces = Flatten[ImagePartition[ColorConvert[f, "Grayscale"], 128]]
    

    enter image description here

    black = Image[ConstantArray[0, {128, 128}]];
    dist = Map[ImageDistance[#, black, DistanceFunction -> EuclideanDistance] &,
                pieces];
    nf = Nearest[dist -> pieces];
    

    Then we can see the grouping by considering k = 2:

    GraphPlot[
     Flatten[Table[
       Thread[pieces[[i]] -> nf[dist[[i]], 2]], {i, Length[pieces]}]],
     VertexRenderingFunction -> (Inset[#2, #, Center, .4] &), 
     SelfLoopStyle -> None]
    

    enter image description here

    Now you could use a metric (better than the distance to black) inside each of these groups to select the pieces you want from there.

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

Sidebar

Related Questions

Starting out with a given image, I would like to be able to trace
I would like to create a function in Matlab that, given an image, will
I would like to determine if a given URL is an image without relying
I would like to check if URL given by user is image (jpg, png,
I would like to create screenshots of web pages from a given URL. While
I have given bg image for radio button. It is working in chrome but
Given a URL to an image (and not the image itself), what's the most
I have a System.Drawing.Image that I would like to use as the centered portion
Given a number of images (animation frames) I would like to prefetch them and
I would like to stretch and crop an image so that it shows full

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.