Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › I need to make a program (for a specific task)...
New Posts  All Forums:Forum Nav:

I need to make a program (for a specific task)...

post #1 of 16
Thread Starter 
I need to make a program (for a specific task). At this point I'll go on and say I have pretty much no relevant (is that the right word?) programming experience. Basically what I need to do is measure the length of all those fibers in the image below. Right now I am doing it manually by basically using a software to outline them and then the computer calculates its lengths. I need to make a program that measures all their lengths and lists them.

There are two other important things I can think of. One is that the "fibers" on the boundaries that are not fully shown in the image are suppose to be discarded (but this could some how be done manually since it doesn't take that much time and I have no idea how it would be programmed). The other harder part is sometimes the fibers will be more brighter other times they won't. You can see at the tips of these fibers sometimes they aren't completely lit. So there has to be some sort of cut off point to where the fiber stops; preferably one that can be set for the image that I am working on. So, I need for someone or some members here to tell me how I would go about doing this. What I should learn in terms of programming and then how would I actually create an algorithm to do it.

I asked a friend and he said look into OpenCV (no idea what this is or if I've written it correctly) since it basically treats the fibers as lines and then measures their lengths.

Right now my goal is to finish this by the end of June/beginning of July; which gives me almost 4 months. I'm not sure whether that is realistic or not or impossible or completely doable (keep in mind I'm in school which wastes a lot of my time). So any assistance would be appreciated and thanks in advance + rep.

Edited by ninjaburrito - 3/6/11 at 2:45pm
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
post #2 of 16
It is doable. In simple terms, you need a program that can scan lines of pixels and search out for changes of color from dark gray to white.
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
post #3 of 16
that would be tough for the program to scan it, but it would be easier if you enter the coords and then measure it like that. however, it would be in pixels and since pixels dont have a set length irl, u would need to define the actual length to pixel.
segfault
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i5-750 @ 4Ghz Gigabyte P55A-UD4P MSI GTX 770 Kingston HyperX 2x4GB 1600MHz CL9 
Hard DriveOptical DriveCoolingOS
WD Caviar Black 500GB LG 24x Corsair H50 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Samsung SyncMaster P2270 Steelseries 6Gv2 Corsair TX750 Thermaltake V9 Black Edition 
MouseMouse Pad
Razer Deathadder 2013 Edition Steelseries QcK 
  hide details  
Reply
segfault
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i5-750 @ 4Ghz Gigabyte P55A-UD4P MSI GTX 770 Kingston HyperX 2x4GB 1600MHz CL9 
Hard DriveOptical DriveCoolingOS
WD Caviar Black 500GB LG 24x Corsair H50 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Samsung SyncMaster P2270 Steelseries 6Gv2 Corsair TX750 Thermaltake V9 Black Edition 
MouseMouse Pad
Razer Deathadder 2013 Edition Steelseries QcK 
  hide details  
Reply
post #4 of 16
This would be an excellent starting point since you can use it to gain access to pixels in pictures. You could then write your own code to scan through the picture and look for lines and start collecting data on them.
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
post #5 of 16
Thread Starter 
Quote:
Originally Posted by tyuo9980 View Post
that would be tough for the program to scan it, but it would be easier if you enter the coords and then measure it like that. however, it would be in pixels and since pixels dont have a set length irl, u would need to define the actual length to pixel.
Don't worry about the pixel thing (I know how much a pixel is equal to for these images). What do you mean by the stuff in bold?, sorry I didn't understand it fully. + rep

Quote:
Originally Posted by joemaniaci View Post
This would be an excellent starting point since you can use it to gain access to pixels in pictures. You could then write your own code to scan through the picture and look for lines and start collecting data on them.
Alright, don't know what most of the stuff on the website means (yet, going through the FAQ). So should I learn the basics of C++ and programming first? +rep
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
post #6 of 16
Quote:
Originally Posted by ninjaburrito View Post
Don't worry about the pixel thing (I know how much a pixel is equal to for these images). What do you mean by the stuff in bold?, sorry I didn't understand it fully. + rep
i mean the 2 points of the line.

length = sqrt [(x2-x1)^2 + (y2-y1)^2]

eg) split the picture into 4 quadrants. line 1's start and end points are -2,8 and 5,10 with each unit = 1 pixel.

= sqrt [(5+2)^2 + (10-8)^2]
= sqrt (7^2 + 2^2)
= sqrt (49 + 4)
= sqrt (52)
= ~7.211 pixel length.

this only applies to a straight line. since the ones you are trying to figure out are curved, this formula wont be very accurate.
segfault
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i5-750 @ 4Ghz Gigabyte P55A-UD4P MSI GTX 770 Kingston HyperX 2x4GB 1600MHz CL9 
Hard DriveOptical DriveCoolingOS
WD Caviar Black 500GB LG 24x Corsair H50 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Samsung SyncMaster P2270 Steelseries 6Gv2 Corsair TX750 Thermaltake V9 Black Edition 
MouseMouse Pad
Razer Deathadder 2013 Edition Steelseries QcK 
  hide details  
Reply
segfault
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i5-750 @ 4Ghz Gigabyte P55A-UD4P MSI GTX 770 Kingston HyperX 2x4GB 1600MHz CL9 
Hard DriveOptical DriveCoolingOS
WD Caviar Black 500GB LG 24x Corsair H50 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Samsung SyncMaster P2270 Steelseries 6Gv2 Corsair TX750 Thermaltake V9 Black Edition 
MouseMouse Pad
Razer Deathadder 2013 Edition Steelseries QcK 
  hide details  
Reply
post #7 of 16
Thread Starter 
Quote:
Originally Posted by tyuo9980 View Post
i mean the 2 points of the line.

length = sqrt [(x2-x1)^2 + (y2-y1)^2]

eg) split the picture into 4 quadrants. line 1's start and end points are -2,8 and 5,10 with each unit = 1 pixel.

= sqrt [(5+2)^2 + (10-8)^2]
= sqrt (7^2 + 2^2)
= sqrt (49 + 4)
= sqrt (52)
= ~7.211 pixel length.

this only applies to a straight line. since the ones you are trying to figure out are curved, this formula wont be very accurate.
What if I use calculus? Wait never mind I don't know the equation of the thing....I'll try what the other member posted up.
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
post #8 of 16
Thread Starter 
bump
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
post #9 of 16
Thread Starter 
bump again sigh
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750@ 3.8ghz 24/7 folding EVGA P55 SLI PNY GTS 250 1GB Corsair 4GB (2X2GB) DDR3 1600 
Hard DriveOSMonitorKeyboard
WD 320GB 7200RPM, 16MB Windows 7 64bit Ultimate Dell 19" Dell 
PowerCaseMouse
Corsair 400CX CM HAF 922 Dell 
  hide details  
Reply
post #10 of 16
If this is a one time thing seems like it would be faster to just do it manually than you learning how to create a program for it no?
Amelia
(13 items)
 
Professional
(13 items)
 
RCPC#1
(17 items)
 
CPUMotherboardGraphicsRAM
Phenom II X6 1100t MSI 890FX GD65 MSI Radeon HD5670 GSkill RipjawsX DDR3 PC3 12800 2x4GB CL8 
Hard DriveOptical DriveCoolingOS
WD Black 1TB SATA III Samsung BD Zalman 9900MAX Windows 7 64 Professional 
MonitorKeyboardPowerCase
AOC 22" LED Logitech Kingwin Lazer Platinum 500w Fractal Design R3 
Other
Samsung 470 SSD 128GB 
CPUMotherboardGraphicsRAM
AMD Phenom II X6 960T Asus M4A88T-VEVO Asus Strix R7 370 SuperTalent Perfomance 
RAMHard DriveHard DriveOptical Drive
GSkill Snipers Monster Daytona Seagate Barracuda 500GB 7,200 RPM 16Mb cache Memorex DVD/RW 
CoolingOSMonitorKeyboard
Corsair H60 Windows 8N IBM 9494 19" LCD IBM 
PowerCaseMouseMouse Pad
Corsair GS500 In Win H-Frame Wolfking OCZ Behemoth 
Audio
JBL Creature 
  hide details  
Reply
Amelia
(13 items)
 
Professional
(13 items)
 
RCPC#1
(17 items)
 
CPUMotherboardGraphicsRAM
Phenom II X6 1100t MSI 890FX GD65 MSI Radeon HD5670 GSkill RipjawsX DDR3 PC3 12800 2x4GB CL8 
Hard DriveOptical DriveCoolingOS
WD Black 1TB SATA III Samsung BD Zalman 9900MAX Windows 7 64 Professional 
MonitorKeyboardPowerCase
AOC 22" LED Logitech Kingwin Lazer Platinum 500w Fractal Design R3 
Other
Samsung 470 SSD 128GB 
CPUMotherboardGraphicsRAM
AMD Phenom II X6 960T Asus M4A88T-VEVO Asus Strix R7 370 SuperTalent Perfomance 
RAMHard DriveHard DriveOptical Drive
GSkill Snipers Monster Daytona Seagate Barracuda 500GB 7,200 RPM 16Mb cache Memorex DVD/RW 
CoolingOSMonitorKeyboard
Corsair H60 Windows 8N IBM 9494 19" LCD IBM 
PowerCaseMouseMouse Pad
Corsair GS500 In Win H-Frame Wolfking OCZ Behemoth 
Audio
JBL Creature 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › I need to make a program (for a specific task)...