A New Chart Making Program. Update 21 Feb 2018

For all topics which do not fit in the other categories.

Moderators: rcperryls, Rose, karen4bells, Serinde, Alex

User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by Allyn »

richardandtracy wrote: ...This was prompted by both Cairee and Allyn both mentioning that they brighten an image by 10-12% prior to conversion to get a stitched image the same as the original image. ...
I did not say that. I don't simply lighten the image since that can wash the colors out. What I do during the pre-conversion prep depends on what the image needs, but it's never just lightening it by a pat percentage.
_________________________________________________________

WIP
Image
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by richardandtracy »

Steve,

The palette is intended to more accurately reflect the actual DMC thread colours as you see them in a room as opposed to how you see them in bright daylight. They are not the default colours, and have to be actively selected - they are offered simply as another option for the user to choose if they wish to.

I agree that the effect is to select lighter colours.

Which, actually, is the whole point - so that the dark effect I saw on my 'I'm Watching You' isn't duplicated.

There is a downside, I agree, in that some light pictures could be washed out in the brighter areas. In which case, use the standard DMC colour set. I suppose, as is the case with increasing the options to gain accuracy, you also increase the options to make it worse - and need to exercise good judgement to prevent that happening.
Not having the full colour range is also a limitation. The standard DMC thread definition file specified colour component values 0-255 for each of the RGB components. Now it covers 0-230. But... R230/G230/B230 is probably fairly close to the real colour of brilliant white as seen in a normal well lit room.


Allyn,
Sorry, you are completely correct, I was sloppy in the way I quoted you. You said as below:
When I convert an image to cross stitch, I know the process darkens and mutes the colors a bit[my highlight]. The trick is in the prep work. By prepping the image before conversion, I get the results I want. If you're going to mess with the color values, let me know so I can save the most recent version of the program before you start altering the color values.
Well, I have messed with the colour values, but not in the original palette, so no need to get concerned.

Cairee did say:
I almost always lighten a picture by about 12% before importing, it seems to work well in getting a truer color match.
Reducing the brightness by 10% has the equivalent effect of lightening the picture by 11% on the thread colour selection, which is close enough to Cairee's general figure to be almost un-noticeable. The tint of the colour is pretty much unaltered, as all components have been reduced by the same factor, however rounding errors in the integer maths used will very slightly change the tint if the last digit of the colour component value was not zero (eg 255 rounding to 230 instead of 229.5).


As a general comment, just to show my 'faith' in the new palette, I have to declare that I will NOT be using it for my next two projects, which are likely to take the best part of the next 4 years. I shall be doing those projects concurrently, and there are just under 210k stitches shared between them...

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by SteveM »

Just because a programs says it increased brightness by 10% doesn't necessarily mean the RGB values all increased by 10%. In GIMP you can change the brightness by -127 to +127 at a time so an increase of 13 could be interpreted as a 10% increase. Using the photo of your finished 'I'm Watching You' work I read the top left stitch as 175,156,149 on the brightest area of the stitch. After what could be called a 10% increase in brightness (+13) it now reads 179,161,154 or about 3% brighter.

Or to take a different approach, if I lighten the picture of your stitching by +30 in GIMP that is the most I can do before the image starts to wash out noticeably but looks closer to the original art. The resulting values for that top left stitch are 183,166,160 or an increase of about 6-7%. I'm using "about" loosely here because GIMP isn't scaling the individual colour components by the same amount.

Any how, I will go back to what I said before and that is that no one has to use this colour palette if they don't want to and could even make up their own if desired. I very much appreciate that you've done it that way.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by richardandtracy »

Steve,

You had me flapping there, wondering if I had jumped in with my size 12's without taking due care & attention.

I have taken my faithful freebie copy of Paintshop Pro 5.0 (May 1998!) and adjusted the colours of B5200, 3713 and 761 with a 10% reduction in brightness. Well, the figures for B5200 are identical with the ones I put in the revised file. The other 2 are not, and I cannot duplicate the numbers with my HSB calculation either.

So.. I may well have jumped blithely into shark infested waters without due care and attention. :oops:

I think what I'll do it so scrap the revised thread definition file and replace it with a new one shortly. I'll use PSP5 to take the DMC range image I have, apply a 10% brightness reduction to it, then write a program to extract the revised colours from the modified image, and write a revised thread definition file from that.

Thanks for your comments - it's something I wouldn't have noticed/known about if you hadn't mentioned it. Ignorance is such bliss! :thinks:

Regards

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by SteveM »

Oh you should never assume that I know what I'm talking about.

I brightened an image in GIMP by +127 and noticed that very bright colours only increased by 2-3%, but very dark colours were increased by 300%! Sometimes red got a bigger change than green and blue, and sometimes less. A 10% reduction/increase in each colour component sounds correct to me, but clearly the people writing the photo editing software know more about it than we do and I think your new plan to slightly darken the photo of the floss will give a better result. One of these days I will stop talking about it and begin a second WIP using your program to make the pattern.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by richardandtracy »

I have uploaded the program with the revised darkened DMC colours, and the brightness factor was -10%. The numbers are pretty much all a bit different from the ones I uploaded previously, so I think the approach of using PSP5 to do the colour transformation was probably correct. I still haven't the faintest idea what PSP does, I'd expect it to convert to HSB values, multiply the brightness by 0.9, then convert back to RGB. However, when using this site http://www.rapidtables.com/convert/color/rgb-to-hsv.htm (RGBtoHSB) and http://www.rapidtables.com/convert/color/hsv-to-rgb.htm (HSBtoRGB) to do it, the results are fairly different from PSP5's output. Obviously I have yet to find out how much I don't know.


Steve,

Even if you don't know what you are doing, you certainly give a good simulation of it... :wink:
The advantage of several people giving comments on a developing program is that even if no one person knows it all, at least problems can be flagged up and addressed by whatever method the 'collective' knowledge will allow.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by SteveM »

I'm still seeing B5200 as 230,230,230 which is the same as before and I'm not seeing any change in the pattern. Is that expected or did I get a copy of the previous release somehow?
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 6 Jan 2016

Post by richardandtracy »

Steve,

It appears all the 'greys', ie colours with equal RGB components have the same value as before. If you look at DMC760 (near the top of the list), that is different, as are all the ones where the RGB values are not equal.
As I said, I haven't the faintest idea what PSP does to the values... And I cannot find an explanation in online reference articles that makes a great deal of sense as to how the brightness of an image is altered. It seems to boil down to each program tackling it in their own way.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

I have updated the thread picker utility I did ages ago (http://www.crossstitchforum.com/viewtop ... 9&start=31), as below:
Image

Part of the reason I updated it was that I couldn't read my own writing when ordering threads for the current project, and ordered DMC 3755 instead of 3756. :oops: What is more, I had no tool to tell me which was the nearest colour to it (turns out it was 747). So I added on some features to this program to allow substitution matching, do some searches, add error quantification, and also to use the registered thread definition files if you extract the program into the same directory as my BlendThreads chart creation program. If you don't, you need to extract the 6 thread definition files included in the zip file.

A direct link to the zip file is here: http://www.chestnutpens.co.uk/downloads/pickthread.zip (855kb Windows 32bit program)
A link to the web page is here: http://www.chestnutpens.co.uk/misc/crossstitchplan.html

Hope this is of help to someone other than myself.

Regards,

Richard
Last edited by richardandtracy on Wed Feb 10, 2016 8:47 pm, edited 1 time in total.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

Your direct link has an extra 's' on "pickthread.zip".

Personally I think it's a hoot. What comes to my mind first is loading the original photo and clicking about to see what colour is the best match. That could be useful for touching up the raw output of the program in areas like eyes or faces that need the added colours. It could also be used by someone not using your BlendThreads to create a palette of blended colours targeted to the image, such as SQ and GK use.

Some suggestions if I may. The BMP is displayed quite small, a zoom of 2x, 3x, 4x, etc would be useful. The other is the display of the RMS Errror works well for the solids as it is "Error RMS 0" or "Error RMS 3" but for the blend those errors would be displayed as "Error RMS" and "Error RMS3". It also seems that "Error RMS3" in the blends could actually be an RMS error of 23 would could falsely lead to thinking that the blended option is better than the solid option having an error of 12, though the colour swatch should always be the main indicator for human colour matching.

It is also very educational about the process of picking threads to represent the image colours. For example, a dark area on my sample BMP was read as 19,19,13 so the tool found DMC 3371 with an RGB of 30,17,8 and an RMS of 12 to be the closest. But to my eye that color shifts to the brown and I'd be tempted to use DMC 310 instead despite the higher RMS error. Interestingly, there is no blend offered that is closer than solid 3371. Having a small list of alternate solid colours could be quite useful as well.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

Steve,

I've fixed the link.
I'll look at it on a PC to see what you mean about RMS0 and RMS3 (on android at the moment and can't run windoze programs). There may be a rounding error there. The calculation is all done in the label caption assignment line & I may have failed to cast from integers to floating point numbers in all the right places. Don't think I have, but there is a chance.

I agree about the image zoom, and was wondering if it would be worth it. It's a definite yes now. I'll also add jpeg, gif and emf opening too.

As for a list of alternate solids... I thought the same to myself this afternoon, but thought it could be classified as 'creeping featurism' and no one would use it. Maybe I was wrong again.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

Don't let me talk you into any changes you don't think would be worthwhile. I don't currently have a real use for the program and am just imagining what sort of info I would find useful.

I think the "Error RMS3" issue might be white space formatting related as everything looks good on your screenshots but not on this PC. When I manually calculated the RMS I got 23 when "Error RMS3" was being displayed. It is my theory that the "Error RMS" and "23" fields are overlapping somehow.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

Steve,

Had a look at it, and have added panning and zooming to the image.
The RMS3 problem you had is, I think, an effect of different systems font sizes being different. The 'Error RMS' is in one label and the result is in another. I think I'd put them close enough that when the 'Error RMS' label was bigger than on my system, it overwrote the other. I have moved them further apart.
I have added the capability to open jpeg, gif and emf files too.

I do not have the stamina to do the help file today, too, as it'll need every image to be updated. As a result will leave an amended upload to another day.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

OK, I've now updated the PickThread program, the help file etc, and the resultant image higher up this thread is now updated too. Shows the zoom and pan features on the image. The links above now go straight to the revised, updated and generally improved program. It's a bit bigger, with the download now being 937kb, almost all the growth is from including the facility to open jpeg, gif and emf files.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

Oh yes, I love the image zoom and the ability to open other than bmp image files. Thank you for that update.

Before updating I tested the previous release on my desktop computer and there was no issue with the "Error RMS" and its value overlapping, it looked fine. The update did fix that issue on my laptop. Both are Windows 7 with a 1920x1080 resolution yet the pickthread windows clearly doesn't render the same on both so I think it must be font size as you said. For example, on the laptop the "Swap Entry Method" button says "wap Entry Metho" while on my desktop computer it displays as it should. Not worth chasing after IMHO.

I have an image I've been playing with that has several shades of green. When I use DMC threads one gradient area goes to a dark green while in Anchor there are several shades on green used and it looks far better. Using pickthread I zoomed in on the area and can see that with DMC most of the area resolves to a single green that is a fair match, but the darker area resolves to brown shades or even a blend that is actually gray because there just aren't any greens close enough to match up. With Anchor colours not only are there several shades of suitable greens available as solids, but the blended threads have numerous good matches. I'm not sure of the application, but I find the discovery very enlightening.

This does lead me to ask a question about the colour picking algorithm. Let's say that for a certain pixel of the image a solid colour is available with an RMS error of 12 but a blend is available with an error of 11. Would it choose the blend for lowest error or choose the solid over the blend to simplify the pattern slightly?
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

Steve,

I suspect the cause of the differences you are noting is simply due to the 'colour space' rounding in an effort to prevent the algorithm from selecting thousands of colours. If you were to set the colour space divisions to 99 then do a blend conversion the chart program, whether using anchor or DMC would come out with something more accurate.

To give an example, an extreme one to be sure, too extreme for the program, but it'll show the effect relatively quickly.
Assume the floss list has 2 colours, RGB0/0/0 and RGB 200/200/200
Now assume we have 2 colours in the picture: RGB30/30/40 and RGB126/126/126.
Furthermore assume one colour space division, so all RGB values round to 0 or 255.
Now colour 1 will round to 0/0/0.
Colour 2, with all values less than 128, will also round to 0/0/0.
Net result, the closest colour for both colour 1 and colour 2 is thread 1 with RGB0/0/0

Example 2, assume 2 colour space divisions, rounding to 0, 128 or 255
Colour 1 goes to RGB0/0/0, again, which is nearest to thread 1.
Colour 2 rounds to RGB128/128/128, so the nearest thread match is now thread 2 with RGB200/200/200

It's the sort of process that happens inside thread selection algorithm taken to the extreme coarsest level.

The effect of the dithering can affect the colour of the pixel as it goes into the routine. Imagine the first case, with a dither pattern that puts the full error on the pixel to its right, with - in terms of my 'Custom Dither' box in the Chart program, dither values:
- - * 1 0
0 0 0 0 0
0 0 0 0 0
divisor = 1
We also have a pixel of colour 1 to the left of colour 2.
Colour 1 will round to RGB0/0/0, and then the nearest thread is thread 1 also with RGB 0/0/0. We wanted 30/30/40, so this is the error to be added to RGB 126/126/126, giving RGB 156/156/166.
Into the colour space rounding for pixel 2, this now rounds to RGB255/255/255. Consequently thread 2 at RGB200/200/200 is selected instead of thread 1 as it would have without dithering.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

I just received permission from an artist to make a cross stitch pattern of one of his works so I have started a SAL now to record my progress from the very beginning. First up is generating a pattern so I posted several mockups for comparison and would be grateful if anyone that is so inclined will give me your vote on which one you prefer as Allyn has done.

Of the 6 patterns shown at least one was made with Richard's Blend Threads program and at least one is not, that is all I will say until I reveal the exact nature of the patterns.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

I just noticed a small quirk. When I'm in the "Convert Picture to Thread Colours" window I might have "Actual # of Blend Colours 418, from 462 thread colours", but when I apply a merge it changes to something like "Actual # of Blend Colours 249, from 462 thread colours". The number of thread colours is no longer correct, though when I'm done and view the image details it is correct there.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

OK, I'll check how it calculates the colour count & possibly make it the same routine that calculates it for all.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

As strange as this sounds, with the latest version of the program the PDF that is generated is missing the title and copyright info. When I drop the old exe back into the folder and print they showed up again.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
Post Reply