Hi Andrew
QcadCAM Version: 3.27.8.0
Build Date: Oct 6 2022
Revision: dea3962
Qt Version: 5.14.2
Architecture: x86_64
Compiler: gcc 5.4.0
OS: Linux Mint 20.3 x86_64
And
OS: Windows 10 Pro 64bit
This is a well welcomed feature in Qcad but I seem to be having trouble with it..
.
I've looked at the Help file but I need some guidance on the actual settings for tracing.
Below is an example from Inkscape v1.1 Appimage "I have used this for years" the Trace Bitmap settings are default values.. I tied default values in Qcad but could not achieve the desired result, I also tried setting to monochrome and played around with the thresholds but it shows a black screen and on an odd occasion locks up...
.
Any help will be much appreciated and I'm very happy that this feature will now be a part of Qcad
.
Please see below sample screenshots, image file used "Face.png" and dxf output from Inkscape...
.
Cheers
John
PS FYI I had the same issue with previous Qcad Build 3.27.7
.
Help with Trace Bitmap - New Feature
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Help with Trace Bitmap - New Feature
Last edited by John Hyslop on Fri Oct 07, 2022 6:03 am, edited 2 times in total.
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
Re: Help with Trace Bitmap - New Feature
Hi John,
... what will produce something like this
I'm sure there is room for improvement but right now I don't have the time to play with it ...
To get you started try this settings ...John Hyslop wrote: ↑Fri Oct 07, 2022 1:31 amI tied default values in Qcad but could not achieve the desired result, I also tried setting to monochrome and played around with the thresholds but it shows a black screen and on an odd occasion locks up...
... what will produce something like this
I'm sure there is room for improvement but right now I don't have the time to play with it ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: Help with Trace Bitmap - New Feature
Hi Husky
Thanks for the fast response but I still cannot get this to work...
See video attached..
Cheers
John
Thanks for the fast response but I still cannot get this to work...
See video attached..
Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: Help with Trace Bitmap - New Feature
Hi Husky
Okay I got this to work... but only after applying the default settings 1st
then changing them as per your suggestion..?
Is there a reason we need to update with defaults 1st then change?
I'm marking this solved.. because it does work but only if you do as above..
Thank you very much.. you've made my day
Cheers
John
Okay I got this to work... but only after applying the default settings 1st
then changing them as per your suggestion..?
Is there a reason we need to update with defaults 1st then change?
I'm marking this solved.. because it does work but only if you do as above..
Thank you very much.. you've made my day
Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: [ALMOST SOLVED] Help with Trace Bitmap - New Feature
Hi Husky
It is a bit buggy though... for instance when monochrome is unticked alpha and brightness are not available
but when ticked they are ? should it not be the other way around?
Please see gif below..
Cheers
John BUG
It is a bit buggy though... for instance when monochrome is unticked alpha and brightness are not available
but when ticked they are ? should it not be the other way around?
Please see gif below..
Cheers
John BUG
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re:Help with Trace Bitmap - New Feature
Sorry... I found more bugs...
inconsistent results with same values entered
Here's the file I tested with... Cheers
John
inconsistent results with same values entered
Here's the file I tested with... Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
Re: Help with Trace Bitmap - New Feature
Essentially, 'Monochrome' means in shades of 1 color, In that case one has to define what shades to include/exclude.John Hyslop wrote: ↑Fri Oct 07, 2022 5:42 amfor instance when monochrome is unticked alpha and brightness are not available
I suspect that the number of colors doesn't matter at that point.
In Peek 2022-10-07 15-38.gif, not monochrome and 2 colors it selects everything In white + black including gray or whole the bitmap.
Ticking 'Monochrome' here means that your bitmap RGB is turned into grayscale (8 BitsPerPixel) on the fly.
The weighted method would be Y = 0.299R + 0.587G + 0.114B
From the help file it is clear that the 'Brightness Threshold' then defines what shade of gray is considered background.
For RGBA there is the A-channel threshold (transparency).
But both 'Thresholds' then speak of all black, all white what in essence is black/white (1 BitsPerPixel).
Indeed, one would expect the same results from the same settings.
Remark that you ask to reduce the color depth to 3 colors and there are indeed 3 spikes in the Histogram:
White, black and the gray from the checker board, all three with some nuances.
Jpeg files are not ideal sources because of the decompression artifacts, there are 220 unique colors in the star example.
What threshold is used for a certain color depth eludes me.
I think not, but it might simply be the 'inconsistent results' and with what you start with.John Hyslop wrote: ↑Fri Oct 07, 2022 5:19 amIs there a reason we need to update with defaults 1st then change?
Fully testing this new QCAD feature would require consistent results.
QCAD trace path is nothing similar or close to Inkscape Trace path.
The latter will export splines while QCAD sticks to polylines.
If we overlay the dxf over the Face.png (scaled 0.75), it is obvious that Inkscape draws an envelope around darker regions.
For this every pixel is locally weighted regarding their neighbors.
That picture has 397 unique colors.
Still, at some points Inkscape soften corners where we see/suspect hard corners.
I am more troubled with the fact that it locks up when no image is selected.
QQ is needed to terminate the tool.
Script based:
Rather odd that any entity type is welcome for the prevImageEntity variable.
With a multiple selection the odds are against us that the first queried entity id is indeed the intended image.
In debugger mode an uncaught exception is thrown without an image entity, the script simply halts at that point.
Starting the tool doesn't display a preview image,
That figures because the preview, a scaled image + trace, is only generated when hitting the 'Update' button.
On would expect the dialog to open with the image ... Without tracing.
Further, I suspect the preview to be not consistent with the final result.
The preview trace is preformed on a QImage scaled to fit 256 by 256 pixels preserving the aspect ratio.
The final result is preformed on the actual image file of all selected images.
A scaled bitmap is never equal to the original, that all depends on the algorithm that is used.
Face.png is 446 x 380 px and star.jpeg is 728 x 508 px
Regards,
CVH