Click here to Skip to main content
15,879,474 members
Home / Discussions / C#
   

C#

 
GeneralRe: automatic byte conversion? Pin
Luc Pattyn8-May-09 12:44
sitebuilderLuc Pattyn8-May-09 12:44 
GeneralRe: automatic byte conversion? Pin
terradtc8-May-09 13:05
terradtc8-May-09 13:05 
GeneralRe: automatic byte conversion? Pin
Luc Pattyn8-May-09 13:25
sitebuilderLuc Pattyn8-May-09 13:25 
Questionreading pixel's value in an image Pin
wasifmuneer8-May-09 8:53
wasifmuneer8-May-09 8:53 
AnswerRe: reading pixel's value in an image Pin
molesworth8-May-09 9:05
molesworth8-May-09 9:05 
GeneralRe: reading pixel's value in an image Pin
Dan Neely8-May-09 9:27
Dan Neely8-May-09 9:27 
AnswerRe: reading pixel's value in an image Pin
Dave Kreskowiak8-May-09 9:14
mveDave Kreskowiak8-May-09 9:14 
AnswerRe: reading pixel's value in an image Pin
terradtc8-May-09 10:50
terradtc8-May-09 10:50 
You're actually thinking the wrong way, you should not compare the pixels to the ones of their neighbours because the stars can be bigger then x pixels.

The easiest way to do this is to convert the image to a binary image first. What you should do is calculate the average pixel value of the image and then creating a bool array of the same size of the image, anything higher then the average becomes true, anything lower becomes false. Then you'll want to do something like labelling to differentiate between different stars so you can cut them out or do whatever you need to do with them.

A tip in advance:
Don't use the getPixel and setPixel methods of the Bitmap, use the LockBits and UnlockBits functions, they are a lot faster..
GeneralRe: reading pixel's value in an image Pin
wasifmuneer8-May-09 12:28
wasifmuneer8-May-09 12:28 
GeneralRe: reading pixel's value in an image Pin
Christian Graus8-May-09 14:53
protectorChristian Graus8-May-09 14:53 
GeneralRe: reading pixel's value in an image [modified] Pin
terradtc9-May-09 0:40
terradtc9-May-09 0:40 
Questionmsgbox show for a set time Pin
Sokka938-May-09 8:48
Sokka938-May-09 8:48 
AnswerRe: msgbox show for a set time Pin
Dave Kreskowiak8-May-09 9:00
mveDave Kreskowiak8-May-09 9:00 
AnswerRe: msgbox show for a set time Pin
Ravi Bhavnani8-May-09 11:31
professionalRavi Bhavnani8-May-09 11:31 
AnswerRe: msgbox show for a set time Pin
Atif Shahbaz8-May-09 21:05
Atif Shahbaz8-May-09 21:05 
AnswerRe: msgbox show for a set time Pin
Rajdeep.NET is BACK8-May-09 21:32
Rajdeep.NET is BACK8-May-09 21:32 
GeneralRe: msgbox show for a set time Pin
Sokka938-May-09 22:43
Sokka938-May-09 22:43 
QuestionSearching randomly Pin
Rajdeep.NET is BACK8-May-09 8:39
Rajdeep.NET is BACK8-May-09 8:39 
AnswerRe: Searching randomly Pin
fly9048-May-09 9:02
fly9048-May-09 9:02 
GeneralRe: Searching randomly Pin
Luc Pattyn8-May-09 9:17
sitebuilderLuc Pattyn8-May-09 9:17 
GeneralRe: Searching randomly Pin
fly9048-May-09 9:23
fly9048-May-09 9:23 
GeneralRe: Searching randomly Pin
Luc Pattyn8-May-09 9:39
sitebuilderLuc Pattyn8-May-09 9:39 
GeneralRe: Searching randomly Pin
fly9048-May-09 9:53
fly9048-May-09 9:53 
GeneralRe: Searching randomly Pin
jas0n2310-May-09 8:25
jas0n2310-May-09 8:25 
AnswerRe: Searching randomly Pin
Dan Neely8-May-09 11:00
Dan Neely8-May-09 11:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.