It is currently Thu Jun 27, 2024 10:02 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: pm_create_a_depthmap_image.py (Test)
PostPosted: Thu Mar 04, 2021 9:08 pm  (#1) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Hello guys! Can anyone with Linux test this plugin I just wrote. It creates a simple Depth map and It's working in Windows though.

Instructions
1. Open the image you want to work with.
2. Create a selection of the object you want to use for 3D
3. Run the plugin and Export the image as : example_depth.jpg
you need to use the "_depth" after the name and before the extension.


Image


Attachments:
pm_create_a_depthmap_image.zip [1.37 KiB]
Downloaded 118 times

_________________
https://www.deviantart.com/pocholo17
Image
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Fri Mar 05, 2021 7:21 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
I guess it works here in Linux. No idea what to do with the image created however......

Attachment:
test_depth.jpg
test_depth.jpg [ 156.32 KiB | Viewed 2049 times ]


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sat Mar 13, 2021 6:13 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Mar 08, 2021
Posts: 329
Location: NorthEast USA
racer-x wrote:
I guess it works here in Linux. No idea what to do with the image created however......

Attachment:
test_depth.jpg


Racer:
I have Linux Mint. Are you using 2.8 or 2.10 ?
I seem to be having either errors or not appearing at all while using 2.8
Thank you

_________________
Image
-----------
GIMP 2.10.25 (AppImage) / G'mic-Qt for GIMP 2.8 Linux 64bits 2.9.8 / Linux Mint 19.3
(LeftyLeo/James)


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sat Mar 13, 2021 7:12 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
Running Linux Mint 20.1 and Gimp 2.10.22. Gimp 2.8 is very old, you really should move up to 2.10x.


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sun Mar 14, 2021 4:41 am  (#5) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2435
@leftyleo

Not going to work with Gimp 2.8 - the parameters are set up for Gimp 2.10 syntax.

fails here:

  File "/media/rich/Data/gimp-2.8-port/plug-ins/pm_create_a_depthmap_image.py", line 46, in pm_create_a_depthmap_image
    grayLayer = pdb.gimp_layer_new(img, img.width, img.height, RGB, "Gray selection", 100, LAYER_MODE_NORMAL)
NameError: global name 'LAYER_MODE_NORMAL' is not defined


Not difficult to fix, however it does use the gmic plugin and the gmic plugin also has a very comprehensive depth map filter in the Stereoscopic 3D section.

_________________
Image


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sun Mar 14, 2021 7:03 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Mar 08, 2021
Posts: 329
Location: NorthEast USA
Thank you all
I am on Mint 19.3 and just loaded up to GIMP 2.10 and gmic but still having problems..
I will go to an appropriate thread for that

This is a really interesting filter. I have some Halloween images i would try and bw/color with
the depth it might look kool
Similar to making a b/w image with only one object in color


Attachments:
File comment: black/white background with lily in color
lilly_pad_013_11.jpg
lilly_pad_013_11.jpg [ 319.53 KiB | Viewed 1926 times ]

_________________
Image
-----------
GIMP 2.10.25 (AppImage) / G'mic-Qt for GIMP 2.8 Linux 64bits 2.9.8 / Linux Mint 19.3
(LeftyLeo/James)
Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sun Mar 14, 2021 9:06 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Mar 08, 2021
Posts: 329
Location: NorthEast USA
rich2005 wrote:
@leftyleo

Not going to work with Gimp 2.8 - the parameters are set up for Gimp 2.10 syntax.

fails here:

  File "/media/rich/Data/gimp-2.8-port/plug-ins/pm_create_a_depthmap_image.py", line 46, in pm_create_a_depthmap_image
    grayLayer = pdb.gimp_layer_new(img, img.width, img.height, RGB, "Gray selection", 100, LAYER_MODE_NORMAL)
NameError: global name 'LAYER_MODE_NORMAL' is not defined


Not difficult to fix, however it does use the gmic plugin and the gmic plugin also has a very comprehensive depth map filter in the Stereoscopic 3D section.

-----
That is correct - I am in 2.10.14 now and i got Diego's A and B working just fine
but GIMP doesnt recognize this plug-in stored in the same folder path

_________________
Image
-----------
GIMP 2.10.25 (AppImage) / G'mic-Qt for GIMP 2.8 Linux 64bits 2.9.8 / Linux Mint 19.3
(LeftyLeo/James)


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sun Mar 14, 2021 9:24 am  (#8) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2435
Should work: This in my (k)ubuntu 18.04 (same as Mint 19) and Gimp 2.10.14

Attachment:
21014.jpg
21014.jpg [ 142.04 KiB | Viewed 1909 times ]


Usual suspects:
Is the plugin executable ?
Does gimp_gmic_qt work and is it updated ?

_________________
Image


Top
 Post subject: Re: pm_create_a_depthmap_image.py (Test)
PostPosted: Sun Mar 14, 2021 9:50 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Mar 08, 2021
Posts: 329
Location: NorthEast USA
rich2005 wrote:
Should work: This in my (k)ubuntu 18.04 (same as Mint 19) and Gimp 2.10.14

Attachment:
21014.jpg


Usual suspects:
Is the plugin executable ?
Does gimp_gmic_qt work and is it updated ?


[ face palm ] -- no exec flag
thank you for pointing out the obvious for me :yes

_________________
Image
-----------
GIMP 2.10.25 (AppImage) / G'mic-Qt for GIMP 2.8 Linux 64bits 2.9.8 / Linux Mint 19.3
(LeftyLeo/James)


Top
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Create Seamless Hexagon Pattern from Image - within seconds

0

No new posts Jewelry Text Test

8

No new posts Attachment(s) Tree Bark text plugin (test)

5

No new posts Attachment(s) Creating TIF images to generate TV broadcast test signals

0



* Login  



Powered by phpBB3 © phpBB Group