Re: Pull Request Manager Campaign Round 2 (and Other Donation News)
On Saturday, 23 February 2019 at 11:29:45 UTC, Mike Parker wrote: Now that the forums are (mostly) back up, I can announce that round 2 of the PR Manager Campaign is underway. We're raising another $3000 to pay Nicholas Wilson for his efforts for the peioid February 15 to May 14. Overage from the first round was applied to this one and any recurring donations from the first round will go toward it as well. [...] I just donated for the Forum case, and wanted to donate also for the Pull Manager: however, for this case, the website asks for a phone number of mine (compulsory), which was not the case for the forum case. Can you please make the "phone number" non-compulsory?
Regionprops implementation for D
I am trying to learn dlang and decided to develop a regionprops library in pure d (https://github.com/aferust/regionpropsford). I borrowed some code and translated into d for performing routines like connected component labeling and convexhull. The library does not have any dependency except dlang standard library phobos. In theory, the library can be used with any image processing library allowing access to raw image data pointer. I have recently found out that dcv is dead. So, the library uses its own data type (Mat2D!T). Although it has been tested with dlib, you can test it with other libraries such as dcv. I admit that many code were written clumsily, however my test showed that it is fast and safe enough so far. Example usage with dlib: import std.stdio; import std.format; import dlib.image; import measure.regionprops; import measure.types; void main(){ auto img = loadImage("test.png"); auto _imgbin = otsuBinarization(img); auto imgbin = Mat2D!ubyte(_imgbin.data, _imgbin.height, _imgbin.width); // input binary pixels must be 0 for background and 255 for regions /* try RegionProps(imgbin, false) if your OS complains about max stack size limit. In this way labeling will be done using a non-recursive method. */ auto rp = new RegionProps(imgbin); rp.calculateProps(); /+ now you can access blob properties like: rp.regions[0].orientation rp.regions[0].majorAxisLength rp.regions[3].area +/ auto res = new Image!(PixelFormat.L8)(col_count, row_count); res.data[] = imgbin.data[]; foreach(i, region; rp.regions){ // mark the centroids res[region.centroid.x, region.centroid.y] = Color4f(0, 0, 0, 255); } saveImage(res, "result.png"); } I also provide a python binnding based on cython: usage with opencv: import numpy as np import cv2 import rprops imrgb = cv2.imread('test.png'); img_gray = cv2.cvtColor(imrgb, cv2.COLOR_BGR2GRAY) binary = img_gray > 200 # do your thresholding somehow # returns a list containing dicts: regions = rprops.regionpropsford(binary.astype(np.uint8)) print(regions[0]["Perimeter"]) avalable props (keys of dictionary obj representing a region): Perimeter AreaFromContour Orientation ConvexHull Area Moments MinorAxis Solidity ConvexArea Eccentricity ContourPixelList Centroid MajorAxis PixelList BoundingBox AspectRatio EquivalentDiameter Ellipse
Re: Pull Request Manager Campaign Round 2 (and Other Donation News)
On Monday, 11 March 2019 at 08:30:51 UTC, M.M. wrote: I just donated for the Forum case, and wanted to donate also for the Pull Manager: however, for this case, the website asks for a phone number of mine (compulsory), which was not the case for the forum case. Can you please make the "phone number" non-compulsory? That's not supposed to be there. Thanks for bringing it to my attention. It should be okay now.
Re: Regionprops implementation for D
On Monday, 11 March 2019 at 09:29:16 UTC, Ferhat Kurtulmuş wrote: I am trying to learn dlang and decided to develop a regionprops library in pure d (https://github.com/aferust/regionpropsford). I borrowed some code and translated into d for performing routines like connected component labeling and convexhull. The library does not have any dependency except dlang standard library phobos. In theory, the library can be used with any image processing library allowing access to raw image data pointer. I have recently found out that dcv is dead. So, the library uses its own data type (Mat2D!T). Although it has been tested with dlib, you can test it with other libraries such as dcv. I admit that many code were written clumsily, however my test showed that it is fast and safe enough so far. Nice work Ferhat! Some suggestions: - Add it to code.dlang.org (I can't find it) - Add a buildable example on your library code base. - Publish some pictures on github page to make the result clear :)
Re: Regionprops implementation for D
On Monday, 11 March 2019 at 09:29:16 UTC, Ferhat Kurtulmuş wrote: I am trying to learn dlang and decided to develop a regionprops library in pure d (https://github.com/aferust/regionpropsford). What is regionprops? What are the use cases for this library?
Re: Pull Request Manager Campaign Round 2 (and Other Donation News)
On Monday, 11 March 2019 at 09:35:53 UTC, Mike Parker wrote: On Monday, 11 March 2019 at 08:30:51 UTC, M.M. wrote: I just donated for the Forum case, and wanted to donate also for the Pull Manager: however, for this case, the website asks for a phone number of mine (compulsory), which was not the case for the forum case. Can you please make the "phone number" non-compulsory? That's not supposed to be there. Thanks for bringing it to my attention. It should be okay now. Great, thanks! It worked nicely...
Re: Regionprops implementation for D
On Monday, 11 March 2019 at 10:18:39 UTC, Dennis wrote: On Monday, 11 March 2019 at 09:29:16 UTC, Ferhat Kurtulmuş wrote: I am trying to learn dlang and decided to develop a regionprops library in pure d (https://github.com/aferust/regionpropsford). What is regionprops? What are the use cases for this library? Region Properties, AKA regionprops is a famous routine for calculating region (blob) properties/statistics in image processing/computer vision. It firstly appeared in image processing toolbox of Matlab, then some image processing libraries such as scikit-image (Python) and GNU/Octave made its own implementations using the same name. The process starts with labeling discrete binary regions for 8-connected objects, and calculates properties of these regions like area, centroid, perimeter, bounding box etc.
Re: Regionprops implementation for D
On Monday, 11 March 2019 at 09:41:59 UTC, Andrea Fontana wrote: On Monday, 11 March 2019 at 09:29:16 UTC, Ferhat Kurtulmuş wrote: [...] Nice work Ferhat! Some suggestions: - Add it to code.dlang.org (I can't find it) - Add a buildable example on your library code base. - Publish some pictures on github page to make the result clear :) I will do it, thank you for appreciation!
Re: LDC 1.15.0-beta1
On Sunday, 10 March 2019 at 11:41:36 UTC, kinke wrote: On Sunday, 10 March 2019 at 02:05:37 UTC, Manu wrote: Can you explain what this means: * Fix: functions annotated with `pragma(inline, true)` are implicitly cross-module-inlined again. `pragma(inline, true)` functions have only been inlined in the same compilation unit since LDC v1.1 (without explicit `-enable-cross-module-inlining`). Now they are inlined across compilation units again, as before v1.1 (and independent from the -O level). E.g., this means that you don't need LTO to get rid of calls to std.math trampolines for LLVM intrinsics such as: pragma(inline, true) real fabs(real x) @safe pure nothrow @nogc { return llvm_fabs(x); } Thank you! For a while we've been forced to use `dub --combined` to have inlining (don't know why) but it used to work indeed. Very nice that we can build separately again.
Gossip protocol for DLang 1.0.0 released.
A Apache V2 gossip protocol implementation for D programming language. Dub repository: https://code.dlang.org/packages/hunt-gossip Github repository: https://github.com/huntlabs/hunt-gossip Test sample code: https://github.com/huntlabs/hunt-gossip/blob/master/test/source/app.d
Re: Regionprops implementation for D
On Monday, 11 March 2019 at 09:41:59 UTC, Andrea Fontana wrote: On Monday, 11 March 2019 at 09:29:16 UTC, Ferhat Kurtulmuş wrote: [...] Nice work Ferhat! Some suggestions: - Add it to code.dlang.org (I can't find it) - Add a buildable example on your library code base. - Publish some pictures on github page to make the result clear :) it is now on: https://code.dlang.org/packages/regionpropsford
DConf 2019 Submissions and Early-Bird Discount
The DConf 2019 submission deadline has passed. There's still time to send something in if you missed it. We won't be reviewing submissions until this coming weekend, so anything that comes in before then won't be turned away. https://dconf.org/2019/index.html That also means the early-bird discount is ending soon. If you're planning to attend, you'll save 15% on the registration fee if you register by Sunday. From Monday, the regular fee goes into effect. https://dconf.org/2019/registration.html For those of you have already registered, we've still got slots available for the tours on May 6 & 7. Email me at aldac...@gmail.com if you want to participate.
Re: DIP 1000--Scoped Pointers--Superseded
On Thursday, 7 March 2019 at 14:24:29 UTC, Mike Parker wrote: The implementation supersedes the DIP. I think the question a lot of people have in mind is "Is there any plan to formally organize a discussion about the future of scoped pointers?" More specifically, are you planning a new DIP discussing the semantics of scope and return scope, ideally one that would take into account previous feedback, address concerns that DIP-1000 had originally inspired, and include an analysis of the pros and cons of -dip1000's implementation, as reported by its current users? Less formally, what I mean is that a lot of people had concerns at the time DIP-1000 was discussed; many of these concerns (including mine) weren't really addressed, and Walter's reaction gave the impression that he didn't understand them, and as a result, considered them unimportant, which led to a lot of frustration (including, if I remember correctly, Dicebot stepping down as DIP manager) and a general break in communication between Walter and the community. So, considering how important scoped pointers are to the language (betterC, webasm, video games, C++ interop, competing with Rust), I think (and I realize this is a lot to ask) that this is an area where Walter needs to bite the bullet and make a sustained effort to interact with the community and address DIP-1000's problems, whether by starting another DIP or through some other mean. If nothing else, we should probably have a "Who here uses -dip1000, and does it work for you?" thread.
Re: DIP 1000--Scoped Pointers--Superseded
On Monday, 11 March 2019 at 22:57:33 UTC, Olivier FAURE wrote: On Thursday, 7 March 2019 at 14:24:29 UTC, Mike Parker wrote: The implementation supersedes the DIP. I think the question a lot of people have in mind is "Is there any plan to formally organize a discussion about the future of scoped pointers?" More specifically, are you planning a new DIP discussing the semantics of scope and return scope, ideally one that would take into account previous feedback, address concerns that DIP-1000 had originally inspired, and include an analysis of the pros and cons of -dip1000's implementation, as reported by its current users? Less formally, what I mean is that a lot of people had concerns at the time DIP-1000 was discussed; many of these concerns (including mine) weren't really addressed, and Walter's reaction gave the impression that he didn't understand them, and as a result, considered them unimportant, which led to a lot of frustration (including, if I remember correctly, Dicebot stepping down as DIP manager) and a general break in communication between Walter and the community. So, considering how important scoped pointers are to the language (betterC, webasm, video games, C++ interop, competing with Rust), I think (and I realize this is a lot to ask) that this is an area where Walter needs to bite the bullet and make a sustained effort to interact with the community and address DIP-1000's problems, whether by starting another DIP or through some other mean. If nothing else, we should probably have a "Who here uses -dip1000, and does it work for you?" thread. There will be a section of the Dlang foundation meeting at Dconf about this. I'm not very happy about the state of documentation and specification of DIP1000 and even less happy about the way it has been handled, both initially and the subsequent updates. Anyway there will be plenty of high bandwidth time to discuss this then.