Image processing techniques to distinguish between stars and galaxies in an image? Say I have an arbitary image of stars and galaxies without any extra information (no other spectra info other than image itself). Can you help me distinguish them? 

Are there any specific features / properties I could look for? Say for eg the R G or B value or maybe values in some other color space (YUV etc.) be more or less for stars than galaxies, etc.

EDIT:

I dont have any "special" data (no sensor or spectral data), I only have data from the internet (common images). The point is to detect stars and galaxies from images commonly found on the internet.

One of them is this: https://cdn.spacetelescope.org/archives/images/large/heic0916a.jpg
If you have the CCD data and instrument profile, then a star may be treated as a "point source" and a galaxy as an "extended source". This means that, under ideal conditions a star will have it's light spread through the "point spread function" of the telescope, usually these objects have a Gaussian(ish) intensity profile with one pixel of the CCD claiming most of the light and adjacent pixels falling off in intensity, while a galaxy will have an extended, flattened profile with 2 or 3 or 20 pixels claiming most of the light and then falling off in adjacent pixels.

If you have the full CCD information, this is the method of choice. This breaks down when galaxies are so far away that they are resolved smaller than the "point source" stars (larger telescopes can resolve farther away galaxies as extended than smaller, back yard telescopes).

If you just have catalog data, such as colors, then you want to look for items falling off of the "stellar color locus." Stars, in color space tend to sit on a "ribbon" in color-color space (see this from Yanny+2000)



Objects with colors which do not lie on this "ribbon" are special objects. For example the box labeled "Q" is Quasars, which is a type of galaxy. Not shown in this image is a "cloud" of objects which are galaxies (in this image, the cloud will start around that quasar box and extend much redder in both color axes). If you take all of your objects from a telescope and plot them in any(ish) color-color space you will find a tight band, which are stars, and a cloud near this band (which are galaxies). This is because stars operate as a blackbody, while galaxies operate as a dual blackbody (with a lot of light emitted by the stars, following the same blackbody radiation profile, and a lot of gas absorbing this light and re-emitting it in cooler, infrared blackbody colors).

This method is not perfect, this is a statistical method for selecting say 90% galaxies.

Note: Rob is absolutely correct that you cannot do any of these with jpeg images. A lot of jpegs, especially promotional images have had their colors doctored, or even include false colors (for example to represent ultraviolet or infrared light; this is also why you can't do this with random jpegs, each camera will have it's own way of representing color, so my polaroid camera picture will give different colors than a modern random DLSR camera... you can only do this if all the images are collected from identical cameras). jpegs also do not include the "full CCD information" ie. the intensity of light falling onto each pixel of the CCD.

Note 2: Yes you can estimate the PSF for a telescope with an image, but only a CCD image which shows the photon count in each pixel. A CCD image is a 3d image, which shows how many photons fall into each bin, a jpeg does not have this information, so it is... impossible I think, unless the jpeg is produced to show the photon count and not the color.