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
msufly
Posts: 735
Joined: Mon Oct 10, 2011 9:49 pm
Location: Louisiana, US

Re: A New, Free, Chart Making Program

Post by msufly »

Thanks for this Richard. I'll download it and look forward to playing around with it.
Kim


WIPs:
A Summer Ball - Sandy Littlejohns
Camelot Sampler - Teresa Wentzler
(And 14 more!)
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New, Free, Chart Making Program

Post by richardandtracy »

mags wrote:...not that I understand all the terminology :lol: )
To be honest, until about 2 weeks ago, neither did I! It wasn't until I looked it up on Wikipedia to find out what was involved in dithering did I even think it might be possible - I always regarded it as a dark art practiced by computer professionals. I am very far from being a computer professional: I have only ever had 12 hrs of tuition in Pascal (a language I hated with a passion because I wasn't ready for it at the time) and every other last bit of programming has been self taught, and the object has usually been to make my life at work easier.

For example: In 2004 I spent 6 weeks down at Bournemouth acting as a stress engineer for an aircraft interior manufacturing company, and had to use the 'NISA' finite element software to do so. The modeller was originally programmed in the early 1990's and hadn't developed, and was so pathetic that I said Even I can do better than this. That rash statement has taught me an enormous amount (much of it about making rash statements...!), and after 6 weeks I had a better 3D modeller that was between 4 & 6 times quicker to use, meaning that I could keep doing the subcontracting and undercut others so I got the work instead, despite having a higher hourly rate.

Regards,

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

msufly wrote:Thanks for this Richard. I'll download it and look forward to playing around with it.
I would appreciate it if you could tell me if you think there are glaring problems with it - when you write your own software, you tend to write it to suit the way you work. I have found, over the years, that what seems logical to me doesn't always suit everyone. [How could they be so wrong?!?]

However, I always feel the tool should suit you & not vice versa, so please let me know where it doesn't fit.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New, Free, Chart Making Program

Post by Allyn »

richardandtracy wrote:OK, the modified thread conversion with dithering and scaling has been uploaded, and may be downloaded as the first download on:
http://www.chestnutpens.co.uk/misc/downloads.html
The link won't open for me. :( I'll try again later.
_________________________________________________________

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

How odd. I have just tried it and it was OK.

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
NeedleAndFork
Posts: 980
Joined: Tue Apr 09, 2013 5:05 am

Re: A New, Free, Chart Making Program

Post by NeedleAndFork »

Just a thought - I know what the image I'm using looks like. I don't need the original image to be large within the program. I'd rather have the original image small and the converted image, which I want to see details of so I can tweak and play with settings be the larger one.
My blog: Obsessed With Thread

My WIPs: Kimono Lantern Mermaid, Rovaris Alphabet Sampler Christmas Ornaments

Participant of: Ornament a Month SAL, Stitch from Stash Challenge
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New, Free, Chart Making Program

Post by richardandtracy »

The original image and converted image in the program screen capture are shown at 1:1 size - showing off the new facility to scale images down too.

That is a good thought about zooming the converted image: Copying the converted image to clipboard, pasting in a graphics program & then zooming is irritating. I'll add a zoom facility to the output image to the 'To do' list.

I do think when selecting the area to apply the dithering to, a zoom will needed on the input image too. I have already added a 'Paste' to the input image so it can be modified in an external package to speed things up.

If multiple operations are being done on an output image, I think an 'undo' facility will be needed. It's possible for it to get very lengthy very quickly if infinite levels of undo are kept. Not sure that just one level would be enough, so would 5 be OK (that's my feel would be a good compromise between memory usage & utility)?

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New, Free, Chart Making Program

Post by Allyn »

richardandtracy wrote: ...If multiple operations are being done on an output image, I think an 'undo' facility will be needed. It's possible for it to get very lengthy very quickly if infinite levels of undo are kept. Not sure that just one level would be enough, so would 5 be OK (that's my feel would be a good compromise between memory usage & utility)?
I think five would work. Off the cuff, I was going to say eight, but five would work.
_________________________________________________________

WIP
Image
User avatar
msufly
Posts: 735
Joined: Mon Oct 10, 2011 9:49 pm
Location: Louisiana, US

Re: A New, Free, Chart Making Program

Post by msufly »

Ok...I spent about 40 min playing with this program. I'd say I'm an average person in terms of no special computer or graphic design skills. I have a 5 yr old laptop that runs Windows 7. Here's my experience:

After downloading & unzipping the program, I searched the folder full of files for the application file and found it called "Backstitch". I used Google to find a free online image converter to change my jpeg to bmp. Here's the original image I used....this is my greyhound Koda that passed away unexpectedly about a month ago. It's my fav pic of him and I chose it because it's fairly simple in terms of not much background but his brindle coat and bare thigh have lots of detail.
Image
I opened the bmp in the program. The # of colour divisions is default set to 10 but I have no idea what this means....I saw Richard set his to 17 for his original post in this thread. The bmp is huge in terms of # of pixels so I reduced it, which helped to reduce the # of colours used. Then I selected different dithering techniques to see how they differed. Here are a few examples:
Image
Chestnut Pens randomized 2 (143 colours)
Image
Floyd Steinburg (110 colours)
Image
Jarvis et al (94 colours)
Previewing this post, I see that compressing the size of the pictures I post makes the differences harder to see, but they're more obvious when I'm looking at them on the program.

So 2 questions for Richard: What does the program mean by "Number of Colour Space Divisions"? And is the Converted Image Size just used to reduce the image or is that going to be my stitch count?
Kim


WIPs:
A Summer Ball - Sandy Littlejohns
Camelot Sampler - Teresa Wentzler
(And 14 more!)
User avatar
msufly
Posts: 735
Joined: Mon Oct 10, 2011 9:49 pm
Location: Louisiana, US

Re: A New, Free, Chart Making Program

Post by msufly »

Also, if I chose one of the dithering techniques that has over 100 colors, the program will reduce it to 100 once I select that one to chart, which of course changes the appearance. And FYI - it does take my computer a minute or two to process the changes when I select a different dithering technique so I've been stitching while I"m playing with the program...multi-tasking!

Hope this helps anyone that's thinking about using this program!
Kim


WIPs:
A Summer Ball - Sandy Littlejohns
Camelot Sampler - Teresa Wentzler
(And 14 more!)
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New, Free, Chart Making Program

Post by richardandtracy »

msufly wrote: ...
So 2 questions for Richard: What does the program mean by "Number of Colour Space Divisions"? And is the Converted Image Size just used to reduce the image or is that going to be my stitch count?
  1. I tried to explain the colour space divisions in the help file, but possibly didn't do the best job I could have done.
    Basically the concept is that each of the red, green & blue components can have a value of 0 to 255, and there are 256 possible values. When there are 2 colour space divisions, the values are all rounded to 0, 128 & 256. When there are 3 colour divisions, then the values are rounded to 0,85,171 and 255. Similarly with 4 divisions, the values are 0,64,128,192 & 255, and so on for each different number of divisions. This limits the different colours in the picture and then these limited colours are converted.
  2. The converted image size is the number of stitches you want to stitch in the final picture. I have changed the label to read 'Size of converted picture in Stitches'
I am sorry the thread conversion took so long. I have tried it with images of a maximum 450 x 300 (as that's a 1 year stitching task), and had it take just a few seconds to work on my PC. I'll see what I can do to speed up the dithering process, but I'm not sure I can make it much quicker.
I will have to increase the numbers of symbols available. The program does not change the numbers to less than 100, but it won't print the symbols with number over 100.

Regards,

Richard.
Last edited by richardandtracy on Thu Oct 02, 2014 2:25 pm, edited 2 times in total.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New, Free, Chart Making Program

Post by richardandtracy »

In response to a little request by Allyn, I have tried playing with tweeding of threads, and came up with a couple of programs.

The first generated all the possible tweeds from combining 2 DMC colours at a hue difference of 90 degrees or less. There are 44107 different tweeds that meet this requirement. Several can be made up by different combinations of threads. Anyway, this was simply used to generate a text file that looked a bit like this:

Code: Select all

# DMC Component Names,Description,Red,Green,Blue,RGB Value,AnchorEquivalentName
3713+761,Tweed of 3713 + 761 and 3708 + 225 and 3708 + 967 and 3706 + 712 and 894 + 712 and 3716 + 819 and 604 + 712,255,213,213,14013951,No Equivalent,
3713+760,Tweed of 3713 + 760,250,199,199,13092858,No Equivalent,
3713+3712,Tweed of 3713 + 3712 and 604 + 3771 and 3609 + 3825,248,180,180,11842808,No Equivalent,
for 44107 lines. Not wonderful reading, but it's useful.

But how to use this mass of data?
Well, this is where the program came in that I wrote for Allyn, and it may be useful for a few other people besides her.

It's a program where you can type in an RGB value and get out the nearest DMC value, as well as the 100 nearest tweeds to the value. As frequently more than one combination of threads can make the same tweed, the program will allow you to scroll through the possible tweeds to choose which you want to use.

The program also lets you open/paste an image and click on a pixel for the same result.

The download is here:
http://www.chestnutpens.co.uk/downloads/pickthread.zip.
When in use with the image familiar above, this is the screenshot:
Image
As usual, I have included the source code, a .chm help file and the two text files required for the program to work.

I hope it's useful for someone!

I am trying to think of a way of incorporating this sort of information in the chart making program without having to throw everything away and start again. It'll take a few weeks to mull it over, I think.

Have to say, my recent programming bug is nearly burnt out...

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New, Free, Chart Making Program

Post by Allyn »

Thank you so much. :) :whoop: :whoop: :whoop:

Image Image Image Image Image
_________________________________________________________

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

I have modified the chart program so it'll print 200 symbols now. I have designs for another 31 that I'll incorporate later next week, and any I can think up in the mean time. No programming this weekend - busy selling pens & pocket watches at craft fairs and visiting the London Pen show.

Unfortunately at the moment I can't test symbols 165-200 as I can't get it to choose more than 164 colours from any of the images I have. Will have to look around for different images to do that.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
NeedleAndFork
Posts: 980
Joined: Tue Apr 09, 2013 5:05 am

Re: A New, Free, Chart Making Program

Post by NeedleAndFork »

I'll PM you a link to one I tried converting that ended up with 210 colors when I let the software go hog wild with it and gave it no limitations... :)

Edit: Or maybe not. I can't find the image anywhere! Grrrr. I need to reorganize my stuff and if I come across it I'll send it to you!
My blog: Obsessed With Thread

My WIPs: Kimono Lantern Mermaid, Rovaris Alphabet Sampler Christmas Ornaments

Participant of: Ornament a Month SAL, Stitch from Stash Challenge
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New, Free, Chart Making Program

Post by richardandtracy »

Thanks for the offer, but it's not needed now.

I wrote a program (what else?!?) to use the DMC library of colours I have to generate an image with an 8 x 8 pixel square of each DMC colour ( :oops: was intended to be 10 x 10 but I forgot about the white outline to the rectangle as it was drawn, and rather liked the result).
Image
This image can be used to stress out your current conversion package! It will also show up any limits to the numbers of symbols available. I have just tried Ryijy and found that it's limited to 410. I am currently up to 309 for my chart program and ideally want to get up to 448 (one for each DMC colour). The programming effort, when not using text characters, is considerable. Designs for 310 to 332 are on my desk waiting for programming time.

I cannot vouch for the exact colours - I uploaded a .bmp to photobucket and it seems to have been converted automatically to a png - I assume that as both are lossless formats, the colours should be identical, but you can't be absolutely sure.

Regards,

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

448 Symbols are now catered for in the program, and it can be downloaded now. Drawing all those symbols has taken the length of code for the main window from just over 5000 lines to 17300 lines. Thank goodness for copy & paste when varying a symbol a little!

Regards,

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

I have been playing with some programming in the last couple of days and have learnt how to:
  1. Save images in an invisible list in memory for a well nigh infinite undo list.
  2. Create a lasso to select a region.
  3. Found that there is an OS command to detect very quickly whether a point is inside a region - bool PtInRegion(HRGN Handle, int X, int Y).
What I am now going to work on is incorporate this new knowledge in the thread conversion window. The lasso will be used to define an area over which the current settings will apply when the 'Update' button is pressed. That way a random dither can be put (say) in a corner of the image, a straight RGB conversion over the top of the image and a Hue/Sat/Brightness conversion over another part of the image, and the last operations undone sequentially.

Just for the fun of it, I've added two more windows, one to merge/change colours and a second to crop the chart image.

I'll upload the revision when I've incorporated it.

Still mulling over tweeding and how to incorporate it into the conversion. Reducing the permitted hue differences between threads to 45 degrees (out of a 180 degree maximum), and brightness/saturation differences to 0.25 (out of a maximum of 1.0), leads to tweeding combinations that almost certainly will fool the eye and still give enough combinations to be very useful - just over 11000. The difficulty then is in selecting the combination that already has thread colours being used in the image if possible, or if not possible, trying to reduce the extra thread colours to the absolute minimum.

Regards,

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

Re: A New, Free, Chart Making Program

Post by richardandtracy »

Quite pleased at the moment.
Did manage to incorporate lasso selection & partial conversion of the image. The idea is below. Starting off with a pretty horrible straight RGB conversion, which is good for the lace glove, but not the skin tones, select a lasso around the skin of the starting image (horrible conversion of the skin also visible):
Image
Now dither the lassoed area only, and the dithering only applies to the skin tones, giving a composite image:
Image
Gets the best of both worlds, straight RGB conversion where it's best, and dithering where it's best.
I've also added the option to fill everywhere outside the lasso with a single thread colour, should you wish to do background erasing and image conversion at the same time.

Anyway, the revised program is available at the usual address of http://www.chestnutpens.co.uk/misc/downloads.html and select the 'Cross Stitch Chart Creation' download. The update includes thread colour merging and cropping windows too.

Hope it's useful to someone.

Regards,

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

Re: A New Chart Making Program (with bending?)

Post by richardandtracy »

I have done a test program to try out blending of threads, and have a result.
Normal dithered converted picture, colour space divisions = 17, Sierra 2-4a dithering, RGB = 100%, Hue/Sat/Brightness = 0%. This gives 94 colours:
Image
Now, with all other settings the same but using blending of colours:
Image
This has 136 different blend or single colours with 101 different thread colours.

Is the improvement in picture realism great enough to get anyone to say 'Yes, I want it!'?
I'm not sure it is for me, and the programming effort involved in putting this into the main program is pretty big, so I'll not incorporate blending in the main chart program unless someone pipes up and says they want it. If anyone (just one) person says they want it, I'll do it.

The blending colours were taken with threads not more than 45 degree hue difference (out of 180 degree max), 0.26 difference out of 1.00 on Saturation & Brightness. This limited the blends to around 11000 out of a maximum of over 100,000 possible blends, but the similarity in the thread colours means the blend shouldn't break down when you look at it.

At the moment the blending program takes the option with the least difference in thread colours regardless of the fact a blending option may exist which will minimise thread usage. There are so many ways to optimise thread selection (none of which are easy to program), but I am not convinced that effort is justified - the picture above gives the 'best possible' improvement, and it's not huge.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
Post Reply