slacky Posted April 3, 2013 Share Posted April 3, 2013 (edited) Well, I've played around to night, and created some fun functions, and I just feel I should show my latest development. When I get am stable I will add am to SLACKLIB. The first image represents the original image, the later two represents "FindContours", and then we have, two different "DetectEdges"-functions Both Contours and edges can be looked upon very similar, as you can extract the contour (outline) from the edges-area, at least in my second "DetectEdges"-function, which also might be the most useful one (last two pictures). Edited April 3, 2013 by slacky 1 Quote Link to comment Share on other sites More sharing options...
Janilabo Posted April 3, 2013 Share Posted April 3, 2013 Must say, those results look pretty good! Especially the one where it detects willows only! It sure seems like you have been busy today! keep em coming. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 5, 2013 Share Posted June 5, 2013 (edited) So how do these functions work? You got me interested...They remind me of some Photoshop filters... I'd imagine it involves distance grouping, color grouping(tol), then finding where two colors meet and etc. Here's something I did: And here's it in black: I looked in the SLACK library, didn't find those functions. Would love to know how you accomplished that. Edited June 5, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 5, 2013 Author Share Posted June 5, 2013 As soon as I get my Windows XP installation working 100% again, I can take the time to show you. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 5, 2013 Share Posted June 5, 2013 (edited) As soon as I get my Windows XP installation working 100% again, I can take the time to show you. Try using SCAR Portable. Try using windows 7 on a VM. Maybe your settings are wrong, look up the error/settings on google for Win XP. VM's are a bit flakey sometimes. I've dealt with plenty of Windows XP installations, and even on VM's. Are you using VMWare? Edited June 5, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 5, 2013 Author Share Posted June 5, 2013 I've spent a day (24 hours now) on cleaning up the register on my dualboot XP installation. I finally got it working perfectly (= I know XP almost as good as my backyard; been using XP the past 9 years, the two later years I've had it as a duaboot and in VBox. So there's no problem in fixing a corrupt installation, except the time it might take. Win7 and 8 is never an alternative for me, id rather see my self burn down in flames (= Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 5, 2013 Share Posted June 5, 2013 (edited) Gotta love the automated driver install, updates, and support past 2014 lols. It depends if your computer is new or not. I'd never put win7/8 on an older Dual core Pentium computer lol. Windows XP is better for that, but it can cause more pain to mess with because its a little bit older (sometimes)... Windows 8 is terrible, never go there. I've had to fix some License Key crap, and disk check issues with them....not to mention having NO START MENU... Edited June 5, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 5, 2013 Author Share Posted June 5, 2013 (edited) #From slacklib.scar //Copy the client area as bitmap from X->Y2 function XGetScreenArea(XS,YS,XE,YE: Integer): TSCARBitmap; begin Result := GetClient.CaptureEx(XS,YS,XE,YE); end; procedure XGetClientDimensions(var Width, Height: Integer); begin GetBoxSize(GetClient.ImageArea, Width, Height); end; //Get all pixels (2D-array) from an area defined by TBox.. function XGet2DPixels(Area:TBox): T2DIntArray; var BMP: TSCARBitmap; I: Integer; TPA: TPointArray; TIA: TIntArray; begin if ((Area.X1 <= Area.X2) and (Area.Y1 <= Area.Y2)) then begin BMP := XGetScreenArea(Area.X1,Area.Y1,Area.X2,Area.Y2); SetLength(Result, BMP.Width); for i:=0 to BMP.WIDTH-1 do begin TPA := TPAFromBox( Box(i, 0, i, BMP.HEIGHT - 1) ); TIA := BMP.GetPixels(TPA); Result[i] := TIA; end; BMP.Free; end; end; // Find the Edges in the client (colormode dependent). function XExtractEdges(var TPA:TPointArray; minDiff:Integer): Boolean; var W,H: Integer; begin Result := False; XGetClientDimensions(W, H); TPA := CXExtractEdges(XGet2DPixels(Box(0,0,W,H)), minDiff); if Length(TPA) > 0 then Result := True; end; // Find the Edges in the client (Only using brightness). function XExtractEdges2(var TPA:TPointArray; minDiff:Integer): Boolean; var W,H: Integer; begin Result := False; XGetClientDimensions(W, H); TPA := CXExtractEdges2(XGet2DPixels(Box(0,0,W,H)), minDiff); if Length(TPA) > 0 then Result := True; end; #From the unfinished XManipulation.pas: function CXExtractEdges(ImgArr: T2DIntArray; minDiff: Integer): TPointArray; Stdcall; var X,Y,Width,Height: Integer; begin Width := High(ImgArr); Height := High(ImgArr[0]); for X:=0 to Width do begin for Y:=0 to Height do begin if (X + 2 < Width) then begin if not(XSimilarColors(ImgArr[X][Y], ImgArr[X+2][Y], MinDiff)) then Push(Result, Point(X,Y)); end; if (Y + 2 < Height) then begin if not(XSimilarColors(ImgArr[X][Y], ImgArr[X][Y+2], MinDiff)) then Push(Result, Point(X,Y)); end; end; end; end; function CXExtractEdges2(ImgArr: T2DIntArray; minDiff: Integer): TPointArray; Stdcall; var X,Y,Width,Height: Integer; Color1,Color2: Byte; begin Width := High(ImgArr); Height := High(ImgArr[0]); for X:=0 to Width do begin for Y:=0 to Height do begin if (X + 2 < Width) then begin XColorToLum(ImgArr[X][Y], Color1); XColorToLum(ImgArr[X+2][Y], Color2); if (Abs(Color1 - Color2) > MinDiff) then Push(Result, Point(X,Y)); end; if (Y + 2 < Height) then begin XColorToLum(ImgArr[X][Y], Color1); XColorToLum(ImgArr[X][Y+2], Color2); if (Abs(Color1 - Color2) > MinDiff) then Push(Result, Point(X,Y)); end; end; end; end; Now that is the basic concept of the functions used to extract edges (It was only prototyped); Now the last file should be compiled, as it's resource hungry (loot of iterations). It also uses XColorToLum and XSimilarColors, which is found in slacklib, but can be replaced by scar functions, or just compiled with slacklib. XColorToLum = Grayscale color... (see color conversions in slacklib). So those functions returns a TPA of all edge/contrast points. The resulting points depends on the given coloralgorithm. I used LCH for best result, but sure I bet you can use SCARS HSL(CTS2), maybe even RGB-euclidean (CTS1)! Edited August 11, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 5, 2013 Share Posted June 5, 2013 (edited) Aha! And I was just trying to make a SimilarColors function like this, yesterday: RemoveSimilarColors(var Colors: TIntArray; Tol: Integer) with all looping hell Lols, yeah I glanced at your library yesterday too. Why not keep the outcome colored? I'm guessing all the color changing/algorithms effects the output greatly. I will definitely examine this in greater detail later and report back hehe. I forget what LCH stands for...Lightness, Color, Hue? lols...Someone should make a table with all these abbreviations, and color modes and shit. HSL, HSB, RGB, XYZ, should just include the whole alphabet. RGA(A) lols. Maybe try using this with SCAR's XYZ color mode (most accurate? human vision?). Thanks! I've taken photoshop classes, and web design. Should know all these color modes/models by now...we tend to only use some, and not even mess with the grayscaling/other things you can do (In Photoshop). Edited June 5, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 5, 2013 Author Share Posted June 5, 2013 (edited) The outcome is just a TPointArray, no colors are touched. The illustation-pictures is just me coloring the found points. XYZ, is a ok representation of the human vision, but to just use XYZ with any normal formula to compare colors wont be. Now; That is why we have LCH, LAB and LUV which is all build on top of XYZ, to make it simpler to compute colors in space similar to the human eye. So in other words: I don't trust that SCARs CTS3 is a good representation of the human vision. LCH is a 3-dimensional version of LAB which highlights Lightness, Chroma and Hue. It's similar to HSL, but HSL (Hue, Saturation, Lightness) builds on to of RGB-space. While LCH is a forumla on top of XYZ, so their outcome is slightly different. Edited September 12, 2014 by slacky Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 5, 2013 Share Posted June 5, 2013 (edited) For the First Detect Edge function (Illustrations), I'd love to see what that looks like in Color instead of Black-Green or Black-Blue. If you don't post it, maybe I'll try copying that function, or using a modified SLACKLIB. By outcome, I was sort of referring to the illustrations, reason for reference to colored. By the way, how did you color those illustrations, looks complicated if using canvas.pen or something...If you were using OSI with RS2's Debug functions (even set to one color) it wouldn't look like that...looks like photoshop to me... Or possibly some advanced drawing/canvas library? Maybe a python one. I don't trust that SCARs CTS3 is a good representation of the human vision. So SCAR doesn't use LCH, LAB and LUV to compute color difference in CTS3? ._. well this is what it says about CTS3 on the wiki...: The fourth and currently last algorithm uses the XYZ color space to compare colors based on an approximation to human visual perception. This is currently the most accurate way to do color comparisons, however the algorithm is very slow because it has to convert the RGB values to the XYZ color space which requires very large calculations. This algorithm also provides a modifier that can be changed to set the sensitivity of the calculations, though the default setting is sufficient is most circumstances. It is not advised to use this algorithm in time critical scripts. Doesn't say much. The link for XYZ on the wiki leads here: http://en.wikipedia.org/wiki/CIE_1931_color_space Edited June 5, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 5, 2013 Author Share Posted June 5, 2013 (edited) If you were using OSI with RS2's Debug functions (even set to one color) it wouldn't look like that...looks like photoshop to me...[/Quote]Why the fuck would I use OSI for that? I avoid all dependencies as long as I can manage. Just loop over the pixels and add a color, or even simpler for just ONE color... The reason it looks "smooth" is because the first versions of edge detection algo search in 45 degrees, resulting in fine/Brushstroke-like edges, but that version does not exist any more... All i did was put the points to an image: XGetClientDimensions(W,H) SomeBitmap := XGetScreenArea(0,0,W,H) bmp := TSCARBitmap.Create(''); bmp.SetSize(SomeBitmap.Width, SomeBitmap.Height); TPA := EdgeDetection(SomeBitmap, 105); //modified version to take Bitmap as param. Bmp.SetPixels(TPA, 15384483); DebugBitmap(BMP); Now this is with colors in a meaningful manner, the colored area are ALL the points given by the TPA from EdgeDetection: ------------------------- I do not know how scar compares colors with XYZ, and as a matter of fact, I'm not that interested in knowing: I have tested scars CTS(3) in a bunch of cases, and the results ain't that great. The space in XYZ is not meaningful to the eye by just taking the euclidean distance, or any similar method. Ether you need to understand the inner workings (knowledge in the area) and have a set of math-skills, or you need to use one of the predefined colorspaces which builds on top of XYZ, and that is expensive/uses much more time (LAB,LCH,LUV, etc). So: NO, SCAR does not Use LCH, LAB or LUV. Simba uses LAB. Edited September 4, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 6, 2013 Share Posted June 6, 2013 Curious as to what this can actually be applied to for something useful You can easily do color conversions in any color space you want if you port the space into a function with its math. SKy_Scripter did this all the time Honestly I find it unnecessary... what do you actually plan on accomplishing here? Not so say that you can't... but seriously? This is cool stuff don't get me wrong but any of the obvious uses (object detection) are far more suitable to do with standard practices. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 6, 2013 Share Posted June 6, 2013 (edited) Curious as to what this can actually be applied to for something useful It depends on the speed. Really need to test things out for any practical use. Be useful if we could remove the GROUND PIXELS from the color searches we make on Runescape? Theoretically. Edited June 6, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 6, 2013 Share Posted June 6, 2013 I don't see how that's any different from doing a Split TPA and then Length check... Removing ground pixels... for what purpose? I don't see that making anything possible that wasn't already. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 6, 2013 Share Posted June 6, 2013 (edited) Well I mean, if it works really fast. It looks like it would "minimize" the pixels we'd have to run our search functions on. If its precompiled in a library and runs at lets say 25ms to filter SCAR's bitmap it gets from RS2 or SMART... Theoretically SplitTPA is by Distance. And length. Yeah good. But it doesn't actually remove similar colors like in grass, or etc. Their both really similar in nature though.... Edited June 6, 2013 by LordJashin Quote Link to comment Share on other sites More sharing options...
slacky Posted June 6, 2013 Author Share Posted June 6, 2013 (edited) There is a reason as to why I abandoned this (in SCAR). SplitTPA is far to slow when theres a big area of connecting pixels. I planned to use the second for object recognition. The difference compared to just a SplitTPA and Length check is that it's not color very dependent. So lets say an object got 12 different colors, just FindColor + Clustering will be weak compared to feature extraction + Clustering... There will be close to no overlapping as well, and the whole object/shape could be extracted (not just parts)... I'm not going to talk about the whole plan as SplitTPA was not fast enough for this anyway. I'm using OpenCV for the same purpose in python, and I am able to do really good shape detection, with coordinates, very cool, and extremely useful (trees, ores, NPCs.. Just a few lines, and I got there shape and pos), and I can't say anything on the speed (blink of an eye)! Edit: Optimized and compiled version ExtractEdges (the one in the last image show above) uses ~5ms om my PC. Clustering the points (SplitTPA) takes over 20sec. Edited September 13, 2014 by slacky Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 6, 2013 Share Posted June 6, 2013 Thanks, you explained it beautifully right there! I was trying to explain that, I got stumped though lol. Yeah these functions are definitely great, especially since they run fast! But I also look forward to trying out similar things with just SCAR's functionality... OpenCV, nice. last comment for now. Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 7, 2013 Share Posted June 7, 2013 Honestly I think you're exceeding the required resources, at least for Runescape applications. This is the same reason I don't believe in switching off PS/delphi going into other languages or bothering to learn Java etc (well that one for other various reasons) Goodluck I hope your hard work unlocks new possibilities If you're really interested in this type of stuff though I'd try to talk to someone like TriLez over at tribot or Timer over at powebot (or whatever the fuck that shit is called now) (both of whom are inactive OSI developers) they explore different resources and methods like this daily like Java, OpenGL etc. Quote Link to comment Share on other sites More sharing options...
slacky Posted June 14, 2013 Author Share Posted June 14, 2013 (edited) I prefer to avoid hooking/injecting/reflecting it takes away all the fun (I just don't find it interesting), just reading the data can be done by anyone... I just find a bigger challenge and use in developing functions related to computer vision. "Honestly I think you're exceeding the required resources" - Maybe I am, not that it matters for most people. But I enjoy creating shit like this, just for the hack of it! :-) But then we have rule 37 which states: > There is no overkill. There is only 'open fire', and 'time to reload' Edited September 6, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 14, 2013 Share Posted June 14, 2013 I prefer to avoid hooking/injecting/reflecting it takes away all the fun (I just don't find it interesting), just reading the data can be done by anyone... I just find a bigger challenge in developing functions related to computer vision. "Honestly I think you're exceeding the required resources" - Maybe I am, not that it matters for most people. But I enjoy creating shit like this, just for the hack of it! :-) I agree, it helps you learn too. Also to appreciate applications like photoshop that have things that do a lot of this for you. Eventually I'm going to learn more on these subjects, and programming with image libraries, etc. There's books out there. Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 15, 2013 Share Posted June 15, 2013 I prefer to avoid hooking/injecting/reflecting it takes away all the fun (I just don't find it interesting), just reading the data can be done by anyone... I just find a bigger challenge in developing functions related to computer vision. "Honestly I think you're exceeding the required resources" - Maybe I am, not that it matters for most people. But I enjoy creating shit like this, just for the hack of it! :-) There's more to those bots than reading information. iBot, Tribot, and powerbot all utilized different color hybrid technologies in addition to things like opengl, injection, and reflection. Quote Link to comment Share on other sites More sharing options...
slacky Posted June 15, 2013 Author Share Posted June 15, 2013 (edited) Yeah, I get it But: Still not interested, on a side note, I can't stand Java (I find far to many reasons to dislike it). Edit: I find RuneScape a fine area to learn about computer vision, test different techniques relative to simple AI, not just for botting, but creating smarter, better bots, not just "working bots with hard-coded rules". In "real life" there is no such thing as hooking, and therefor I avoid it: EG: It can't be used in my RPI and Arduino robots to make am smarter, there is nothing to hook, but I can how ever read colors, and work with feature extraction. Edited September 13, 2014 by slacky Quote Link to comment Share on other sites More sharing options...
Michaeldesia Posted September 25 Share Posted September 25 В современном мире технологий Apple остаётся одной из самых популярных и узнаваемых марок. MacBook, выпущенные этой компанией, отличаются высоким качеством сборки, производительностью и стильным дизайном. Однако время не стоит на месте, и многие пользователи в какой-то момент думают о необходимости обновления собственных устройств. Тогда скупка MacBook становится отличным вариантом тем, кто хочет сложно выкинуть свой старенькый ноутбук, да и получить за него разумную цену. По какой причине стоит сдавать MacBook в скупку? 1. Экономия средств: Новый MacBook может стоить достаточно дорого. Продав меня называют Господом ветхий ноутбук, вы сможете существенно понизить расходы на покупку нового устройства. 2. Экологическая ответственность: Сдавая ноутбук на переработку или повторное использование, вы подсобляете сократить количество электрических отходов, что положительно сказывается на экологии. 3. Прыткая продажа: Скупка MacBook зачастую проходит быстрее, чем поиск покупателя на рынкее БУ. Вам не надо беспокоиться о размещении объявлений и безопасной сделке. 4. Проф оценка: Почти многие сервисы, специализирующиеся скупкой техники, предлагают профессиональную оценку вашего устройства, что позволяет получить максимальную стоимость. Как происходит процесс скупки? 1. Оценка состояния: Первым шагом является оценка состояния вашего MacBook. Это может включать проверку функциональности, состояния экрана, клавиатуры, корпуса и других компонент. 2. Определение цены: На базе состояния ноутбука, года выпуска и других параметров, для вас будет предложена цена. Почти многие сервисы предоставляют возможность предварительной он-лайн-оценки. 3. Заключение сделки: Если вас устраивает предложенная цена, вы можете заключить сделку. Обычно это происходит прытко, вам не нужно тратить время на длинные переговоры. 4. Получение средств: В большинстве случаев после завершения сделки деньги выплачиваются сразу, либо на ваши банковские реквизиты, или наличными. Что нужно учитывать при сдаче MacBook? 1. Физическое состояние: Чем превосходнее https://skupkamacbook.ru состояние устройства, тем вот выше его стоимость. Постарайтесь сохранить ноутбук в хорошем состоянии и, елико возможно, очистить его от собственной информации. 2. Модель и год выпуска: Новые и более мощные модели стоят дороже на вторичном рынке. Проверьте, какую цену имеют подобные модели. 3. Комплектация: Наличие оригинальной упаковки, зарядного устройства и прочих аксессуаров также может положительно сказаться на итоговой стоимости. 4. Выбор компании: Прежде чем сдать Свой MacBook, исследуйте несколько компаний, занимающихся скупкой техники. Сравните цены и условия, чтоб выбрать наиболее прибыльный вариант. Итог Скупка MacBook это включая удачный способ избавиться от устаревшего устройства, да и красивая возможность получить дополнительные средства при покупке нового ноутбука. До этого чем сдать Свой MacBook, стоит внимательно оценить его состояние и рассмотреть различные варианты скупки. Это окажет вам помощь сделать выгодное предложение и избежать лишних издержек. Пользуйтесь современными технологиями трепетно и экономно! Quote Link to comment Share on other sites More sharing options...
MichaelCax Posted October 7 Share Posted October 7 Are you a music enthusiast looking to elevate your sound? Look no further! Our music gear store has everything you need to bring your musical dreams to life. From high-quality guitars to powerful amplifiers and all the accessories in between, we've got you covered. Guitars for Every Taste and Style Whether you're an acoustic aficionado or an electric guitar wizard, our store offers a diverse range of guitars to suit every player. We carry top brands like Fender, Gibson, Ibanez, and more. Each guitar is meticulously crafted to deliver exceptional sound and playability. - Acoustic Guitars: Perfect for singer-songwriters and those who love the raw, unplugged sound. - Electric Guitars: Ideal for rock, blues, and jazz enthusiasts looking to add some flair to their performances. - Bass Guitars: Providing the deep, resonant tones crucial for any band’s rhythm section. Amplifiers That Elevate Your Sound A great guitar deserves an equally great amplifier. Our collection features a variety of amps that cater to different genres and playing environments. From practice amps to stage-ready powerhouses, you'll find the perfect match for your needs. - Tube Amps: Known for their warm and rich tones, perfect for achieving that classic rock sound. - Solid State Amps: Reliable and versatile, they offer a consistent performance ideal for any gig. - Modeling Amps: Advanced technology that mimics the sound of various amp types, giving you a wide range of tones from a single unit. Essential Accessories No musician's arsenal is complete without the right accessories. We stock everything from strings and picks to pedalboards and effects pedals. Our knowledgeable staff can help you find exactly what you need to enhance your playing experience. - Strings and Picks: High-quality materials for durability and superior sound. - Effects Pedals: From distortion to delay, our pedals can help you craft the perfect tone Bb Cornets - Pedalboards: Keep your effects organized and ready to use during performances. Why Shop With Us? - Expert Advice: Our team of musicians is passionate about helping you find the right gear to achieve your goals. - Quality Guarantee: We only stock products from trusted brands known for their reliability and superior craftsmanship. - Customer Satisfaction: Your happiness is our top priority. We offer hassle-free returns and excellent customer service. Visit our store today and experience the difference quality music gear can make. Elevate your sound and take your music to the next level. Whether you’re a beginner or a seasoned pro, we have the right equipment to help you shine. Quote Link to comment Share on other sites More sharing options...