Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 7, 2006 3:59:27 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
how I can create shadows of object in image ?
Having an imaging with some object painted on, like charis, tables or any other, how I can create shadows giving the angle and the altitude of the sun ? I'm using LT 14.5 with VB.NET, and I try to use the ShadowCommand class, but it doesn't seems to be the right way for my problem.

Thanks.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, November 7, 2006 4:31:19 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Can you please post sample images that show the image before and after the effect?

Thanks,

 
#3 Posted : Tuesday, November 7, 2006 5:40:03 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
I send three images:

- Before: is the starting image
- AnnStampObject: is the stamp added on "Before" image
- After: is the final one obtained realizing first to images.

I need to add the shadow of the tree on the ground.

Thanks!!!
File Attachment(s):
Example.rar (901kb) downloaded 28 time(s).
 
#4 Posted : Tuesday, November 7, 2006 6:45:22 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


We don't have anything that will be able to do what you are hoping.  The best thing you could try would be to use a black (with some alpha transparency most likely) image the same as the object you are trying to cast.  Once you have that, you can try combining the black image after changing the angle and size.

The main difficulty here is that you are trying to do three dimensional functionality on a 2D image.  It will be very difficult to detect exactly where and how the shadow should fall due to the terrain, angle, sun angle, etc.

If you want, I could add this as a feature request.  If implemented, it would most likely be in a major release.  If you need this functionality more immediately, please contact our custom development department at http://leadtools.com/devservices/ .
 
#5 Posted : Tuesday, November 7, 2006 10:08:51 PM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Thanks, I'll try it. May be a good idea add this request as a new future in future release.

Bye.
 
#6 Posted : Thursday, November 9, 2006 8:14:35 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I have added a feature request for this functionality with the number 847FRQ.
 
#7 Posted : Friday, November 17, 2006 7:48:05 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
in the meantime I think to my problem with shadows and what you suggest in one reply is applicable, but I need further information:

In order to create the second image (for shadow), how can create an image that represente the 1-bit mask of the original image where white is the object of the source image and the background is black. This because the two image that after I have to combine must have the same black background because I have to apply transparency.

Combining the two images is possible to put one in front of another (the object image in front of the shadow image) ? How?

Thanks!
 
#8 Posted : Wednesday, November 22, 2006 7:02:48 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Call AddColorToRegion and set the color parameter to Black and the
combineMode parameter to SetNot to create a region that includes the
object only.  Then use the FillCommand class to fill the region with white.

 
#9 Posted : Monday, November 27, 2006 8:04:44 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Thanks,
now I'm at 50% of my work. The file named "OK.bmp" is obtained combining two images (one for the object and one for its shadow) together with CombineCommand with Flags = Operation.Xor. How can obtain image named "HOW"? How can I place the shadow's image under the object's image and link together in a single image ?

Thanks!
File Attachment(s):
shadow.rar (153kb) downloaded 28 time(s).
 
#10 Posted : Monday, November 27, 2006 11:43:59 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

So what you're saying is, that you want to remove the extra white space
between the object and the shadow and connect them to each other? 
If yes, then try using the AutoCropCommand class on each of the bitmaps before combining them.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.131 seconds.