How would you Trace Bitmap this

Post questions on how to use or achieve an effect in Inkscape.
tamt
Posts: 8
Joined: Wed Dec 21, 2011 3:49 am

How would you Trace Bitmap this

Postby tamt » Thu Apr 12, 2012 8:11 am

HI I am trying to learn Inkscape & have been playing a lot with the Trace Bitmap tool in the past- most of which has been successful. But I am doding something wrong now as Im not getting great results...

Is the traced bitmap image supposed to look identical to the image being traced except of course the lines look much crisper. If so I must be using the wrong settings as lately all my trace bitmaps are looking a bit strange ...ESPECIALLY the angular designs

I just cant seem to work out how to trace bitmap angular frames - it seems every time the shape is distorted and they look odd, heres an attachment of the file I was using, though its not just this file its any file with angular edges

Are there Recommended Best settings for Trace Bitmap - if so could someone please tell me ?

My Trace to Bitmap settings were as follows ( though Ive been playing with lots of settings)

Brightness cutoff - selected threshold 0.450

Edge Detection ( unselected) - Threshold 0.650

Colour Quant ( unselected) - Colours ( 8)

INvert image ( unselected)

Mutiple Scan

Brightness ( unselected) Scans 8

Colours ( unselected)

Greys ( unselected)

Smooth Ticked
Stack Scans Ticked
Remove Bckground Not Ticked

Hopefully if you use these settings you will see exactly what I mean by "odd looking" result

Many Thanks
TT

P.S I am also uploading a flowing JPG that looked a bit off after being traced, was unable to attach the close up of that after trace Bitmapped but can post if needed..

Many Thanks for your time & help
Attachments
Zinnia all.jpg
Zinnia all.jpg (16.81 KiB) Viewed 3874 times
Frame 2 _after TraceBtmp.JPG
Frame 2 _after TraceBtmp.JPG (26.69 KiB) Viewed 3874 times
frame2.jpg
frame2.jpg (9.18 KiB) Viewed 3874 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How would you Trace Bitmap this

Postby brynn » Thu Apr 12, 2012 9:14 am

Hhmmmm....part of the problem may be the quality of the original, at least for the frame one. I see that some lines are heavier than others, and some lighter or darker than others (like a photocopy maybe?). But even so, you should be able to get a better scan.

For the record though, no, Trace Bitmap is not intended to accurately reproduce images. In a black and white line drawing like that though, you should be able to get a pretty darn good trace. Where it fails badly is like on photographs such as a landscape or a family photo.

According to the settings you reported, you're doing a Single Scan using Brightness Cutoff. The problem with that one is that the Preview Update feature doesn't work. In all the others, you can click the Update button to see what the current configuration of settings will look like. With Brightness Cutoff, you have to click Ok to see the preview, and then Undo. Then you can change the threshold, and click Ok. And continue to adjust it, remembering to Undo inbetween attempts. You should be able to find some threshold value that will fairly closely resemble the original.

Or you could try Edge Detection, where you just have to click Update to see how changing the threshold will affect the trace. Just adjust threshold then click Update to see how it looks, etc. until you find the best one. I don't think Color Quantization will be a good choice in this case, but experimenting can only help you learn :D However, I would not suggest any multiple scan option for this particular image.

Also look at the Options tab of the Trace Bitmap dialog. You can try different threshold values for Smooth Corners, or maybe even deselect it, for the frame. Just remember to keep doing the same Ok, Undo, change value, Ok, Undo, etc. as long as Brightness Cutoff is selected on the Mode tab. I'm not sure if the Optimize Path setting will have any effect on the frame, but you can experiment.

For the flower, all 3 of the settings on the Options tab could come into play. And I suspect you can adjust the Smooth Corners and/or Optimize Paths for that one, and get something better. But since you couldn't show that result, I can't be sure. Also on the flower, you might find Edge Detection will give a better result.

I know it can be frustrating and confusing trying to get a good scan. If you reach the end of your patience, and you don't mind posting the full size of the frame I don't mind experimenting a little. The flower one might be harder because of all the shading. And finally, here's the manual info, where you might pick up some helpful tips: http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace.html

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: How would you Trace Bitmap this

Postby chriswww » Thu Apr 12, 2012 10:16 am

could you please provide the jpeg used as a source for the frame trace bitmap. i'm thinking that maybe you can tweak the image during and post scan, before threshold trace works nicely. ultimately the image (still in raster format) should be black and white without any "issues" so that the threshold trace converts it as nicely as possible to vector.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How would you Trace Bitmap this

Postby druban » Thu Apr 12, 2012 12:57 pm

Trace bitmap appears to use pixel dimension in its calculations and therefore tracing a small bitmap yields very poor results compared to the same bitmap scaled up to a large size. You can do this right in Inkscape by scaling the bitmap up and then doing 'make bitmap copy' and then giving the new bitmap to Trace bitmap.
Your mind is what you think it is.

tamt
Posts: 8
Joined: Wed Dec 21, 2011 3:49 am

Re: How would you Trace Bitmap this

Postby tamt » Fri Apr 13, 2012 8:27 am

Hi Druban & Chriswww, umm sorry if I am being dense, I am a bit lost the jpg of the frame is frame2.jpg attached in earlier post??

Let me know if I need to post something else TT

tamt
Posts: 8
Joined: Wed Dec 21, 2011 3:49 am

Re: How would you Trace Bitmap this

Postby tamt » Fri Apr 13, 2012 8:29 am

Brynn here is close up of the flower tracing that looked odd

Many Thanks again for your help
Attachments
Zinnia tracle closeup.JPG
Zinnia tracle closeup.JPG (53.25 KiB) Viewed 3819 times

tamt
Posts: 8
Joined: Wed Dec 21, 2011 3:49 am

Re: How would you Trace Bitmap this

Postby tamt » Fri Apr 13, 2012 8:35 am

Forgot to say the frame was just an example of a frame I found online googling art deco frames etc see every time I have tried to trace an angular frame I found online it looks weird like that one did ..

I been a) finding image online, capturing as jpg, taking into app to increase resolution, then increaring contrast & gammas resaving as jpg. Then bringing into Inkscape and trace bitmap .. Been working great for most lined images ( outline ) but not so great for these kinds mentioned above .....Hope that helps clarify what im doing

But as I said I have a LOT to learn

In the meantime a BIG Thanks to everyone who is helping me with these challenges
TT

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: How would you Trace Bitmap this

Postby chriswww » Fri Apr 13, 2012 11:01 am

if you're saving as jpeg, then modifying, then saving as jpeg again....just in those steps you're losing image data, as jpeg is a compressed file format that doesn't allow 100% reconstitution of image, due to the compression algorithms used. If a non-jpeg lineart image is saved as jpeg (at any time and by whoever) it introduces image dirt at boundaries. jpeg format is much more suited to photos etc where there are color graduations without sharp contrast edges. Lastly, scaling up a raster image does not increase resolution. It actually increases artifacts, where whatever raster scaling algorithm is used it tries to interpolate pixels where there was none in original scale.
These things are likely to contribute to poor trace quality.
Also be careful using contrast & gamma manipulation to convert image to pure black & white. Some other tool/technique will probably produce better results. Try using the levels levers to get the cut-off at desired point or some of the more clever color mapping tools in gimp or photoshop etc. If memory serves correct, gimp allows you to change the image to black/white through the image->mode menu, which uses fairly decent algorithm for reasonable results. it's been a while since i used gimp. someone's written a nice tutorial on using gimp to convert color to black & white, which should also mostly apply to grayscale images http://www.gimp.org/tutorials/Color2BW/

i've mentioned it before in this forum..there's a web site for someone that developed a tracing tool (commercial product) but that website has lots of good info on how to scan well (a lot of this info applies to obtained images as well) and how to trace better. Even though some of the info is specifically geared to that program; there's still a lot of good info there applicable anywhere. The File Formats in their FAQ and the tutorial topics on this site are pretty good. vectormagic.com

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How would you Trace Bitmap this

Postby druban » Fri Apr 13, 2012 5:02 pm

tamt wrote:here is close up of the flower tracing that looked odd


Can you tell us 'odd' in what respect? If this is your traced vector result I think it came out quite well...
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How would you Trace Bitmap this

Postby brynn » Sat Apr 14, 2012 10:25 am

Hi TT,
I have the same question as druban. What about the zinnia trace appears odd to you? I see that some sharp corners have become sort of rounded or filled in. But that kind of detail can't be expected from Trace Bitmap.

I think druban's tip about tracing small images will probably help you the most. I didn't realize that your examples were the full size. If you can enlarge them before you trace, you might have better results.

ukurereh
Posts: 10
Joined: Sat Apr 14, 2012 11:35 am

Re: How would you Trace Bitmap this

Postby ukurereh » Sat Apr 14, 2012 11:50 am

I know unticking "Smooth" (not "Smooth corners") can get rid of weirdness my traces. Have you given that a shot?


Return to “Help with using Inkscape”