ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Remove Isolated Area

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
graph_man Posted - Dec 25 2018 : 13:54:53
Hello,

Could you add new feature which can work as "Remove Isolated Pixels" but automatically select and delete areas that contain MORE than a certain number of pixels.

My task is to clear black areas in attached file (file-1) to get result (file-2).





10   L A T E S T    R E P L I E S    (Newest First)
graph_man Posted - Jan 08 2019 : 08:54:04
Thank you.
spetric Posted - Jan 08 2019 : 08:06:14
Yes, I know, but you can use that image as a mask
Here is an output of close operation with window 3:



Now, you can use that image as a mask, to copy a part of original image, covered by the mask, to some new white image. The algorithm should look like this:

1) make a copy of original image (origImg -> maskImg)
2) perform closing operation on maskImg.
3) create a new image and fill it with white (destImg).
4) copy origImage using maskImg to destImg.

For the last step, you can use origImg->CopyWithMask2(destImg, SelectionMask);
SelectionMask can be created from maskImg.

You can find close filter in TImageEnProc.Closing.
graph_man Posted - Jan 08 2019 : 07:57:09
> You can apply morphological filter

What command I need to use for that?
graph_man Posted - Jan 08 2019 : 07:54:56
> It will remove everything inside that white "paper".

I need to remove big black areas only and stay text without changes.
spetric Posted - Jan 08 2019 : 07:48:02
You can apply morphological filter (dilate or close) with window size 3 or 4.
on some grayscale or binary copy of your image. It will remove everything inside that white "paper". Then, use that new image as a mask to copy data from original image, covered by the mask, to some new white image.
graph_man Posted - Jan 08 2019 : 07:08:38
I should work like "Remove Isolated Pixels" but
remove "if number of pixels more" instead of "if number of pixels less".
graph_man Posted - Jan 08 2019 : 07:06:23
I need to do that automatically (for all big areas).
xequte Posted - Jan 07 2019 : 20:16:06
Sorry, there does not seem an easy way to do this. Would it work for you to perform a floodfill from each of the image corners?

https://www.imageen.com/help/TImageEnProc.CastColor.html

Nigel
Xequte Software
www.imageen.com
graph_man Posted - Dec 26 2018 : 03:31:58
Thanks
xequte Posted - Dec 25 2018 : 20:43:57
Hi

I'll look into this when we are back in the office.

Nigel
Xequte Software
www.imageen.com