TIEFileDragDrop is not documented for use with TImageEnMView so a brief overview is shown below:Ĭreate a AFileDrop: TIEFileDragDrop declaration.Ĭreate a TIEFileDragDrop class in FormCreate: AFileDrop := TIEFileDragDrop.Create(ImageEnMView1, DropFiles) Ĭreate a Private declaration DropFiles method The TIEFileDragDrop To TImageEnMView Demo shows how to drag and drop images from the windows shell (File Explorer) to TImageEnMView. I'll also try an approach with 0 connected seams.Ĭompiled with Delphi Seattle, but is expected to compile with Delphi 2010 or higher. However, I have a problem when there is simultaneous horizontal and vertical resizing.I need to create a new map to resolve vertical/horizontal seams crossing. Threads are collecting seams and real removal (and restore) is much faster. a bit (there were also some bugs in energy calculation) and created separate threads for horizontal and vertical seams calculation without removal. That calculate all possible 0 connected min seams on original imageĪnd then perform seam removal (this is also suggested in article's appendix). Original algorithm removes seam by seam, but there are some implementations There are some modifications that trades precision vs. Yes, very cool algorithm, but a little bit slow. Wow, it's impressive how much the seam can be reduced without noticably affecting the subject. Note7: To preprocess seams indexing, as suggested by article, we can use idle time in application, and start a thread immediately after image is loaded to create index maps. Note6: To force object removal, we put negative energy values for pixels in selection mask. Note5: There is no object protection, but it's not hard to implement:we can put a high energy value for pixels in selection mask. Note4: enlarging image is not implemented, (it actually should add seams and fill it with average pixel value left+right/2 in case of horizontal scaling). Note3: There is no backward scaling, because it requires rescaling from beginning, or saving seams into some undo buffer (index maps in article). Note1: I put black pixels on image border after scaling, however, real stuff is to use alpha channel and fill with zeros. Original article: Īttach/spetric/20162158835_seam_carving.zip I was experimenting with image energy and min-energy seams and this came out as a by-product. If there is an interest, I can upload the updated version. With trigonometric/ general ellipse method, polyline is less jagged, because of floating point (double) calculation of output points. This demo shows how to create a scan preview form with frame selection.īesides midpoint, I have implemented another algorithm (trigonometric/general ellipse), so you can switchīetween those two algorithms in any time to see the difference. Profile Join Active Topics Forum FAQ Searchįorum membership is Free! Click Join to sign-up Username:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |