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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Remove extra space of photo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

ali

Iran
110 Posts

Posted - Sep 11 2020 :  02:09:53  Show Profile  Reply
Dear Nigel

I wrote codes for remove white space of image with Delphi satanadrd Timage which you can see in the attachments image input personal photos and result photo.
I want to remove other color space of color for example blue or red or all color space for example similar in the attachments photo.

Please help me or is better you make one fuction for this pesonel photos.
I want to you fix with imageen and if you do not fix then unfortunately I force for make it with Delphi satanadrd Timage.
I sure which it fuction is useful for imageen.

Best Regards

Ali Abbasi



xequte

38173 Posts

Posted - Sep 11 2020 :  02:31:22  Show Profile  Reply
Hi

You have several options here:

Auto-cropping (background is very simple):

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

Chroma Key Removal (background is green screen):

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


Another option is to cast the background is alpha:

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

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ali

Iran
110 Posts

Posted - Sep 11 2020 :  02:47:28  Show Profile  Reply
Hi Nigel

Thank you for your attention.

This program is web base with unigui framework. So I most use Timage component of delphi or none visual other components. I think most use image delphi with ImageenIO.

I can not use chromakey because background image may various color.

Best Regards

Ali Abbasi
Go to Top of Page

xequte

38173 Posts

Posted - Sep 11 2020 :  03:00:11  Show Profile  Reply
Looking at your input photo you should be able to use TImageEnProc.AutoCrop. It would not require a visual component.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ali

Iran
110 Posts

Posted - Sep 11 2020 :  03:07:09  Show Profile  Reply
Thank you very much I know which I do not require to visual components, but for show for user from original photo to result photo I must use Timage component. I got it and I make it.

Best Regards

Ali Abbasi
Go to Top of Page

ali

Iran
110 Posts

Posted - Sep 12 2020 :  01:52:41  Show Profile  Reply
Hi

1. I changed Crop_Margin to 0 and I can not Complete and accurate crop white space.

rect := IEDBView.Proc.AutoCrop( 0, clWhite, False );
IEDBView.Proc.Crop( max( rect.Left - 0, 0 ),
max( rect.Top - 0, 0 ),
min( rect.Right + 0, IEDBView.IEBitmap.Width ),
min( rect.Bottom + 0, IEDBView.IEBitmap.Height ) );

2. Also do you have codes for crop image with background for various color photos?
You can see in the attachment photos.


Best Regards

Ali Abbasi


Go to Top of Page

xequte

38173 Posts

Posted - Sep 12 2020 :  17:35:17  Show Profile  Reply
Hi

1. Please attach the example image. Increase the tolerance if the background is not cropping enough.

2. Why not use the color of the top-left pixel, or take an average of the colors in the top-left corner?

You can also try:

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

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: