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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:11:46+00:00 2026-05-26T15:11:46+00:00

I have some image like this: There is a gap in some lines, How

  • 0

I have some image like this:

image

There is a gap in some lines, How can I detect gap’s position in image?


It’s the result. It seems closing creates new pixels.

after closing and subtracting

  • 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-26T15:11:47+00:00Added an answer on May 26, 2026 at 3:11 pm

    May i assume that the final goal is close the gap?
    Than you might want to use morphological operations. To close the gap you just need the so called “closing“. This is done by applying “dilation” and than an “erosion“.

    So how do you find a position where the gap was closed? You can just compare the before and after image and look at the changes.

    EDIT: after your post i decided to update the answear. So i tried a little piece of code in matlab.

    originalBW = imread('Je3ud.jpg');
    imshow(originalBW);
    
    se = strel('line',8, 0); % a straight line of 8 pixels
    
    closeBW = imclose(originalBW,se_disk);
    figure, imshow(closeBW)
    
    subtractedBW = closeBW - originalBW;
    
    figure, imshow(subtractedBW)
    

    it produces an resulting image:

    enter image description here

    So basicly we have found the right position, but have unfortunatly got alot of false positives. I think you can get the result you want by treating each one of them as a candidate match and getting rid of the false positives. One important part of the false positives seems to be that if you check their vertical neighborhood (in the original image) you will find that there are white pixels, because the white line was not really disconnected there (and they therefore can not be the right solution). So you can try to use that to discard the false positives.

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

Sidebar

Related Questions

I have some js code which generates an image-tag like this: main_pic_div.innerHTML =<img src='+path_big_image+?+Math.random();'
There is a data file and some image files that I have to download
I have some code like this: public void SaveImage(int Counter) { var task =
I have to perform some image editing operation like cropping, gray scale, rotating image,
I have found some info on the subject ( like this link) , but
So I have some path generator which now works like this http://www.openprocessing.org/visuals/?visualID=2615 (There is
I have some text with images inside it. For example like this texttext<img src=2011-08-15/4/img/123.JPG
I have code like this: <div id=sc> <h1>1. Orange</h1> <p>some text in here </p>
I have some code a little like this... <img src=... width=100 height=100 alt= onclick=FlipImg(1234)
I have some code in one of my views like this. I feel that

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.