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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:56:36+00:00 2026-05-26T16:56:36+00:00

I have a image(png format) in hand. The lines that bound the ellipses (represent

  • 0

I have a image(png format) in hand. The lines that bound the ellipses (represent the nucleus) are over straight which are impractical. How could i extract the lines from the image and make them bent, and with the precondition that they still enclose the nucleus.

The following is the image:
enter image description here

After bending

enter image description here

EDIT: How can i translate the Dilation And Filter part in answer2 into Matlab language? I can’t figure it out.

  • 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-05-26T16:56:37+00:00Added an answer on May 26, 2026 at 4:56 pm

    Ok, here is a way involving several randomization steps needed to get a “natural” non symmetrical appearance.

    I am posting the actual code in Mathematica, just in case someone cares translating it to Matlab.

    (* A preparatory step: get your image and clean it*)
    i = Import@"https://i.stack.imgur.com/YENhB.png";
    i1 = Image@Replace[ImageData[i], {0., 0., 0.} -> {1, 1, 1}, {2}];
    i2 = ImageSubtract[i1, i];
    i3 = Inpaint[i, i2]
    

    enter image description here

    (*Now reduce to a skeleton to get a somewhat random starting point.  
    The actual algorithm for this dilation does not matter, as far as we 
    get a random area slightly larger than the original elipses *)
    id = Dilation[SkeletonTransform[
                 Dilation[SkeletonTransform@ColorNegate@Binarize@i3, 3]], 1] 
    

    enter image description here

    (*Now the real random dilation loop*)
    (*Init vars*)
    p = Array[1 &, 70]; j = 1;
    (*Store in w an image with a different color for each cluster, so we 
    can find edges between them*)
    w = (w1 = 
          WatershedComponents[
           GradientFilter[Binarize[id, .1], 1]]) /. {4 -> 0} // Colorize;
    (*and loop ...*)
    For[i = 1, i < 70, i++,
     (*Select edges in w and dilate them with a random 3x3 kernel*)
     ed = Dilation[EdgeDetect[w, 1], RandomInteger[{0, 1}, {3, 3}]];
     (*The following is the core*)
     p[[j++]] = w =
       ImageFilter[  (* We apply a filter to the edges*)
        (Switch[
              Length[#1],  (*Count the colors in a 3x3 neighborhood of each pixel*)
              0, {{{0, 0, 0}, 0}},          (*If no colors, return bkg*)
              1, #1,                        (*If one color, return it*)
              _, {{{0, 0, 0}, 0}}])[[1, 1]] (*If more than one color, return bkg*)&@
          Cases[Tally[Flatten[#1, 1]], 
           Except[{{0.`, 0.`, 0.`}, _}]] & (*But Don't count bkg pixels*),
        w, 1,
        Masking -> ed,       (*apply only to edges*)
        Interleaving -> True (*apply to all color chanels at once*)]
     ]
    

    The result is:

    enter image description here

    Edit

    For the Mathematica oriented reader, a functional code for the last loop could be easier (and shorter):

    NestList[
     ImageFilter[  
       If[Length[#1] ==  1, #1[[1, 1]], {0, 0, 0}] &@
         Cases[Tally[Flatten[#1, 1]], Except[{0.` {1, 1, 1}, _}]] & , #, 1,
       Masking      -> Dilation[EdgeDetect[#, 1], RandomInteger[{0, 1}, {3, 3}]],  
       Interleaving -> True ] &,
     WatershedComponents@GradientFilter[Binarize[id,.1],1]/.{4-> 0}//Colorize, 
    5]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PNG image that has an unsupported bitmap graphics context pixel format.
I have an image (in .png format), and I want this picture to convert
i want create image animation , i have 50 images with png format now
I have an image (PNG file) that has an alpha channel that is set
You have a large image saved in PNG format, its size lies around ~600KB.
i have some images (in front of my bachground-image) with low opacity(png format) and
I currently have an image upload input that only accepts PNG, JPG/JPEG, GIF images.
i have a .png image that i am trying to display as a UIBarButtonItem
I have a resource file (in .png format) which contain several images. They are
I have some images (.png format) that I use as drawables on the surface

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.