sebgg Posted October 18, 2011 Author Share Posted October 18, 2011 I'm wrong and I stand corrected. Thank you for setting me strait. What you are asking for is very interesting. What is the color for the background? well thats always a set color, and it depends what the user set it as, but usually black (default is black) ( the program checks before each protein is measured) seb GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
sebgg Posted October 18, 2011 Author Share Posted October 18, 2011 (edited) Okay, why dont you show what you have, so people stop wasting yours and their time making suggestions you have already implimented. basically this is solved, i mean i know its not possible to change the direction of pixelsearch in the way i like. and each analysis now takes <10 seconds on the heap of shit of a computer im working on at the moment. (normally < 3seconds) so in cutting the top and bottom of the search area off i did save some time, but i dont think there is any more to be saved from pixelsearch. seb edit: and i will upload the latest version once i re-write the instruction manual as ive managed to remove a whole bunch of steps which are now automated. Edited October 18, 2011 by sebgg GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
JohnOne Posted October 18, 2011 Share Posted October 18, 2011 You only need pixelsearch once to find the top or bottom of the object. If you code is taking 10 seconds on any computer to map the edges of it you are doing something seriously wrong. Post your code and I'm sure someone will help you optimize it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
sebgg Posted October 18, 2011 Author Share Posted October 18, 2011 (edited) You only need pixelsearch once to find the top or bottom of the object. If you code is taking 10 seconds on any computer to map the edges of it you are doing something seriously wrong. Post your code and I'm sure someone will help you optimize it.You only need pixelsearch once to find the top or bottom of the object. If you code is taking 10 seconds on any computer to map the edges of it you are doing something seriously wrong. Post your code and I'm sure someone will help you optimize it. So the code is posted in my sig (or at least the bit which measures area hasnt changed) Doing each face doesent take 10 seconds, it takes a fraction of a second, but i do it for multiple faces, hence the increased time. I dont do multiple pixelsearches. i do 1 for top 1 for bottom. then for every pixel in that square i do pixelgetcolor as its faster. but if you know a way to map edges and work out the area inside without that im all ears. that would inc speed alot i imagine. not sure how to map edges but i can probably work something out. edit that out, dont think thats possible as the perimeter tells you very little about area (hope someone proves me wrong on this one) Seb Edited October 18, 2011 by sebgg GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
sebgg Posted October 18, 2011 Author Share Posted October 18, 2011 come to think of it, will it be faster just to measure the area which isnt protein, if i know the size of the box? (as proteins normally takes up more than half the screen) GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
JohnOne Posted October 18, 2011 Share Posted October 18, 2011 How about posing an image of what you are working with, and the code to perform the task? You code in that forums is rife with bugs and wont even start, plus it seems you need some third party application installed. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
FastFrench Posted October 21, 2011 Share Posted October 21, 2011 (edited) Hello, I'm the author of this FastFind dll. Someone suggested to use it in your case, and actually that is the solution for you to optimize it greatly. Granted, FastFind won't help you if you're doing a single pixelsearch. But if you have to do many pixelsearch or PixelGetColor in the same "SnapShot", then FastFind will dramatically increase the perfs. I can understand that you don't want to use any specific, and respect this contrain. But you can't say it won't help to improve the speed :by design, Autoit PixelSearch and PixelGetColor use Win32 API to access video memory. Those operations are VERY slow.FastFind split this into two parts : first you're doing a snapshot, where you copy the video memory into your normal main RAM. Then all operations are done in this main RAM, and are much much faster.Of course, if you take a new SnapShot for each PixelSearch or GetPixel operation, you won't have much speed increase (but still in that case, FastFind provides higher level searches, to help finding complex patterns). So, It takes about 65ms to take a fullscreen SnapShot (worst case). Then, a FFGetPixel takes 27µs, where the native Autoit GetPixelColor takes 19ms. 700 times faster on this atomic operation, worth a try don't you think ? Edited October 21, 2011 by FastFrench Link to comment Share on other sites More sharing options...
JakeMomo Posted September 14, 2019 Share Posted September 14, 2019 Not a diamond, but maybe this is helpful. It searches columns. $box[4] = [100, 110, 200, 210] $color = 0x000000 ; enter color of your choice For $b = $box[0] to $box[2] $p = PixelSearch ($b, $box[1], $b, $box[3], $color) Next Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now